[SCSI] fcoe: use kthread_create_on_node
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 28 Sep 2011 04:37:52 +0000 (21:37 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 2 Oct 2011 17:53:40 +0000 (12:53 -0500)
Since fcoe_percpu_thread_create() creates percpu kthread, it makes sense
to use kthread_create_on_node() to get proper NUMA affinity for kthread
stack.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/fcoe/fcoe.c

index c30fa27402d9eb1fb73b9aac5d37a1c22e0d0fa7..010432596eafd693ee9e72ed7854f91bb7fe6fd2 100644 (file)
@@ -1113,8 +1113,9 @@ static void fcoe_percpu_thread_create(unsigned int cpu)
 
        p = &per_cpu(fcoe_percpu, cpu);
 
-       thread = kthread_create(fcoe_percpu_receive_thread,
-                               (void *)p, "fcoethread/%d", cpu);
+       thread = kthread_create_on_node(fcoe_percpu_receive_thread,
+                                       (void *)p, cpu_to_node(cpu),
+                                       "fcoethread/%d", cpu);
 
        if (likely(!IS_ERR(thread))) {
                kthread_bind(thread, cpu);