Skip to content

Commit

Permalink
[SCSI] fcoe: use kthread_create_on_node
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and James Bottomley committed Oct 2, 2011
1 parent 05a2a17 commit 5c609ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5c609ff

Please sign in to comment.