aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_plugin.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-06-16 18:53:18 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-09-29 00:36:33 -0400
commit1f288094807861ec1e48c428d2c49ccf7aaf3767 (patch)
treef8f1217bcf0a720d6ae17304b1bcb3ddbecb42be /kernel/rcutree_plugin.h
parenta102a9ece5489e1718cd7543aa079082450ac3a2 (diff)
rcu: Use kthread_create_on_node()
Commit a26ac2455ffc (move TREE_RCU from softirq to kthread) added per-CPU kthreads. However, kthread creation uses kthread_create(), which can put the kthread's stack and task struct on the wrong NUMA node. Therefore, use kthread_create_on_node() instead of kthread_create() so that the stacks and task structs are placed on the correct NUMA node. A similar change was carried out in commit 94dcf29a11b3 (kthread: use kthread_create_on_node()). Also change rcutorture's priority-boost-test kthread creation. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Tejun Heo <tj@kernel.org> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Andrew Morton <akpm@linux-foundation.org> CC: Andi Kleen <ak@linux.intel.com> CC: Ingo Molnar <mingo@elte.hu> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r--kernel/rcutree_plugin.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 8aafbb80b8b0..7b850cdc0aee 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -1560,7 +1560,10 @@ static int __cpuinit rcu_spawn_one_cpu_kthread(int cpu)
1560 if (!rcu_scheduler_fully_active || 1560 if (!rcu_scheduler_fully_active ||
1561 per_cpu(rcu_cpu_kthread_task, cpu) != NULL) 1561 per_cpu(rcu_cpu_kthread_task, cpu) != NULL)
1562 return 0; 1562 return 0;
1563 t = kthread_create(rcu_cpu_kthread, (void *)(long)cpu, "rcuc%d", cpu); 1563 t = kthread_create_on_node(rcu_cpu_kthread,
1564 (void *)(long)cpu,
1565 cpu_to_node(cpu),
1566 "rcuc%d", cpu);
1564 if (IS_ERR(t)) 1567 if (IS_ERR(t))
1565 return PTR_ERR(t); 1568 return PTR_ERR(t);
1566 if (cpu_online(cpu)) 1569 if (cpu_online(cpu))