]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rcu/nocb: Allow de-offloading rdp leader
authorFrederic Weisbecker <frederic@kernel.org>
Tue, 23 Feb 2021 00:10:06 +0000 (01:10 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 6 Apr 2021 23:07:13 +0000 (16:07 -0700)
commit0fd94dfc1a89bd8a7ce00ae6f77d42bdf5003912
tree003d7e9ec6a021ffcfdd5b42f6393c1e591282f4
parentf75044a4bcfd04bc14b9b458a7819c2ce2dff967
rcu/nocb: Allow de-offloading rdp leader

The only thing that prevented an rdp leader from being de-offloaded was
the nocb_bypass_timer that used to lock the nocb_lock of the rdp leader.

If an rdp gets de-offloaded, it will subtlely ignore rcu_nocb_lock()
calls and do its job in the timer unsafely.  Worse yet:  If it gets
re-offloaded in the middle of the timer, rcu_nocb_unlock() would try to
unlock, leaving it imbalanced.

Now that the nocb_bypass_timer doesn't use the nocb_lock anymore,
de-offloading the rdp leader is now safe.  This commit therefore allows
the rdp leader to be de-offloaded.

Reported-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Neeraj Upadhyay <neeraju@codeaurora.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree_plugin.h