rcu_prepare_kthreads() is called when a CPU hotplug event happens. We can also
spawn the nocb kthreads from this function. This is preparation for the next
patch which remove the redundant check for rcu_scheduler_fully_active. This
commit moves the spawning of nocb kthreads to rcu_prepare_kthreads().

Signed-off-by: Pranith Kumar <[email protected]>
---
 kernel/rcu/tree.c        | 1 -
 kernel/rcu/tree_plugin.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index afd54e2..4dc449c 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3453,7 +3453,6 @@ static int rcu_cpu_notify(struct notifier_block *self,
        case CPU_UP_PREPARE_FROZEN:
                rcu_prepare_cpu(cpu);
                rcu_prepare_kthreads(cpu);
-               rcu_spawn_all_nocb_kthreads(cpu);
                break;
        case CPU_ONLINE:
        case CPU_DOWN_FAILED:
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 4d42791..9a50e1d 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1488,6 +1488,8 @@ static void rcu_prepare_kthreads(int cpu)
        /* Fire up the incoming CPU's kthread and leaf rcu_node kthread. */
        if (rcu_scheduler_fully_active)
                rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
+
+       rcu_spawn_all_nocb_kthreads(cpu);
 }
 
 #else /* #ifdef CONFIG_RCU_BOOST */
-- 
2.0.0.rc2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to