kthread: use kthread_create_on_node()
ksoftirqd, kworker, migration, and pktgend kthreads can be created with kthread_create_on_node(), to get proper NUMA affinities for their stack and task_struct. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Reviewed-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Tejun Heo <tj@kernel.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: David Howells <dhowells@redhat.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
207205a2ba
commit
94dcf29a11
@@ -3761,7 +3761,10 @@ static int __init pktgen_create_thread(int cpu)
|
||||
list_add_tail(&t->th_list, &pktgen_threads);
|
||||
init_completion(&t->start_done);
|
||||
|
||||
p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu);
|
||||
p = kthread_create_on_node(pktgen_thread_worker,
|
||||
t,
|
||||
cpu_to_node(cpu),
|
||||
"kpktgend_%d", cpu);
|
||||
if (IS_ERR(p)) {
|
||||
pr_err("kernel_thread() failed for cpu %d\n", t->cpu);
|
||||
list_del(&t->th_list);
|
||||
|
Reference in New Issue
Block a user