Messages in this thread Patch in this message | | | Date | Mon, 29 Oct 2012 16:27:23 -0400 | From | Steven Rostedt <> | Subject | [PATCH 12/32] rcu: Restart tick if we enqueue a callback in a nohz/cpuset CPU |
| |
From: Frederic Weisbecker <fweisbec@gmail.com>
If we enqueue an rcu callback, we need the CPU tick to stay alive until we take care of those by completing the appropriate grace period.
Thus, when we call_rcu(), send a self IPI that checks rcu_needs_cpu() so that we restore a periodic tick behaviour that can take care of everything.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Alessio Igor Bogani <abogani@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Avi Kivity <avi@redhat.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Christoph Lameter <cl@linux.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Geoff Levand <geoff@infradead.org> Cc: Gilad Ben Yossef <gilad@benyossef.com> Cc: Hakan Akkan <hakanakkan@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Kevin Hilman <khilman@ti.com> Cc: Max Krasnyansky <maxk@qualcomm.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Sven-Thorsten Dietrich <thebigcorporation@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> --- kernel/rcutree.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 21664a3..7dce432 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -2081,6 +2081,13 @@ static void invoke_rcu_core(void) static void __call_rcu_core(struct rcu_state *rsp, struct rcu_data *rdp, struct rcu_head *head, unsigned long flags) { + /* Restart the timer if needed to handle the callbacks */ + if (cpuset_adaptive_nohz()) { + /* Make updates on nxtlist visible to self IPI */ + barrier(); + smp_cpuset_update_nohz(smp_processor_id()); + } + /* * If called from an extended quiescent state, invoke the RCU * core in order to force a re-evaluation of RCU's idleness. -- 1.7.10.4
| |