rcu/nocb: Make rcu_core() callbacks acceleration (de-)offloading safe
authorFrederic Weisbecker <frederic@kernel.org>
Tue, 19 Oct 2021 00:08:10 +0000 (02:08 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 8 Dec 2021 00:24:44 +0000 (16:24 -0800)
commitb3bb02fe5a2b538ae53eda1fe591dd6c81a91ad4
tree96583dd9618ca6f834ad082d48b721ee6720ce44
parent24ee940d89277602147ce1b8b4fd87b01b9a6660
rcu/nocb: Make rcu_core() callbacks acceleration (de-)offloading safe

When callbacks are offloaded, the NOCB kthreads handle the callbacks
progression on behalf of rcu_core().

However during the (de-)offloading process, the kthread may not be
entirely up to the task. As a result some callbacks grace period
sequence number may remain stale for a while because rcu_core() won't
take care of them either.

Fix this with forcing callbacks acceleration from rcu_core() as long
as the offloading process isn't complete.

Reported-and-tested-by: Valentin Schneider <valentin.schneider@arm.com>
Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Neeraj Upadhyay <neeraju@codeaurora.org>
Cc: Uladzislau Rezki <urezki@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c