aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-07-13 15:00:53 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-09-16 13:08:01 -0400
commit9386c0b75dda05f535a10ea1abf1817fe292c81c (patch)
tree85bd2cdd5f2f4c11b94230bce3a1ebb220cfc181 /kernel/rcu/tree.c
parentf4aa84ba24872e3a8e59b58bc8533cae95597f2e (diff)
rcu: Rationalize kthread spawning
Currently, RCU spawns kthreads from several different early_initcall() functions. Although this has served RCU well for quite some time, as more kthreads are added a more deterministic approach is required. This commit therefore causes all of RCU's early-boot kthreads to be spawned from a single early_initcall() function. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 1b70cb6fbe3c..9be47f43903b 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3489,7 +3489,7 @@ static int rcu_pm_notify(struct notifier_block *self,
3489} 3489}
3490 3490
3491/* 3491/*
3492 * Spawn the kthread that handles this RCU flavor's grace periods. 3492 * Spawn the kthreads that handle each RCU flavor's grace periods.
3493 */ 3493 */
3494static int __init rcu_spawn_gp_kthread(void) 3494static int __init rcu_spawn_gp_kthread(void)
3495{ 3495{
@@ -3498,6 +3498,7 @@ static int __init rcu_spawn_gp_kthread(void)
3498 struct rcu_state *rsp; 3498 struct rcu_state *rsp;
3499 struct task_struct *t; 3499 struct task_struct *t;
3500 3500
3501 rcu_scheduler_fully_active = 1;
3501 for_each_rcu_flavor(rsp) { 3502 for_each_rcu_flavor(rsp) {
3502 t = kthread_run(rcu_gp_kthread, rsp, "%s", rsp->name); 3503 t = kthread_run(rcu_gp_kthread, rsp, "%s", rsp->name);
3503 BUG_ON(IS_ERR(t)); 3504 BUG_ON(IS_ERR(t));
@@ -3507,6 +3508,7 @@ static int __init rcu_spawn_gp_kthread(void)
3507 raw_spin_unlock_irqrestore(&rnp->lock, flags); 3508 raw_spin_unlock_irqrestore(&rnp->lock, flags);
3508 rcu_spawn_nocb_kthreads(rsp); 3509 rcu_spawn_nocb_kthreads(rsp);
3509 } 3510 }
3511 rcu_spawn_boost_kthreads();
3510 return 0; 3512 return 0;
3511} 3513}
3512early_initcall(rcu_spawn_gp_kthread); 3514early_initcall(rcu_spawn_gp_kthread);