Skip to content

Commit 4b4399b

Browse files
qiangzh3paulmckrcu
authored andcommitted
rcu: Create per-cpu rcuc kthreads only when rcutree.use_softirq=0
The per-CPU "rcuc" kthreads are used only by kernels booted with rcutree.use_softirq=0, but they are nevertheless unconditionally created by kernels built with CONFIG_RCU_BOOST=y. This results in "rcuc" kthreads being created that are never actually used. This commit therefore refrains from creating these kthreads unless the kernel is actually booted with rcutree.use_softirq=0. Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Zqiang <qiang1.zhang@intel.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent eae9f14 commit 4b4399b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/rcu/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2894,7 +2894,7 @@ static int __init rcu_spawn_core_kthreads(void)
28942894

28952895
for_each_possible_cpu(cpu)
28962896
per_cpu(rcu_data.rcu_cpu_has_work, cpu) = 0;
2897-
if (!IS_ENABLED(CONFIG_RCU_BOOST) && use_softirq)
2897+
if (use_softirq)
28982898
return 0;
28992899
WARN_ONCE(smpboot_register_percpu_thread(&rcu_cpu_thread_spec),
29002900
"%s: Could not start rcuc kthread, OOM is now expected behavior\n", __func__);

0 commit comments

Comments
 (0)