aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-01-21 02:42:38 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-02-26 15:01:30 -0500
commit39c8d313c3c546a414cc51b4f6571c2f8cc06407 (patch)
tree0458ddbd0009594e20d0f5b3252395c73abe1836 /kernel/rcu/tree.c
parent59f792d1ef214592ae9b86238fa8fd00f5929b76 (diff)
rcu: Avoid clobbering early boot callbacks
When a CPU comes online, it initializes its callback list. This is a bad thing if this is the first time that the CPU has come online and if that CPU has early boot callbacks. This commit therefore avoid initializing the callback list if there are callbacks present, in which case the initial call_rcu() did the initialization for us. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index fcfdbe53bb70..92fd3eab5823 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3583,7 +3583,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
3583 rdp->qlen_last_fqs_check = 0; 3583 rdp->qlen_last_fqs_check = 0;
3584 rdp->n_force_qs_snap = rsp->n_force_qs; 3584 rdp->n_force_qs_snap = rsp->n_force_qs;
3585 rdp->blimit = blimit; 3585 rdp->blimit = blimit;
3586 init_callback_list(rdp); /* Re-enable callbacks on this CPU. */ 3586 if (!rdp->nxtlist)
3587 init_callback_list(rdp); /* Re-enable callbacks on this CPU. */
3587 rdp->dynticks->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE; 3588 rdp->dynticks->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
3588 rcu_sysidle_init_percpu_data(rdp->dynticks); 3589 rcu_sysidle_init_percpu_data(rdp->dynticks);
3589 atomic_set(&rdp->dynticks->dynticks, 3590 atomic_set(&rdp->dynticks->dynticks,