]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
rcu: Avoid clobbering early boot callbacks
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 21 Jan 2015 07:42:38 +0000 (23:42 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 26 Feb 2015 20:01:30 +0000 (12:01 -0800)
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>
kernel/rcu/tree.c

index fcfdbe53bb7012d3ecd2f8c2fcf43cc82248fe64..92fd3eab5823df8dfd160401ec710471a89c5fec 100644 (file)
@@ -3583,7 +3583,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
        rdp->qlen_last_fqs_check = 0;
        rdp->n_force_qs_snap = rsp->n_force_qs;
        rdp->blimit = blimit;
-       init_callback_list(rdp);  /* Re-enable callbacks on this CPU. */
+       if (!rdp->nxtlist)
+               init_callback_list(rdp);  /* Re-enable callbacks on this CPU. */
        rdp->dynticks->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
        rcu_sysidle_init_percpu_data(rdp->dynticks);
        atomic_set(&rdp->dynticks->dynticks,