]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rcu/tree: Force quiescent state on callback overload
authorNeeraj Upadhyay <neeraju@codeaurora.org>
Sun, 21 Jun 2020 18:37:27 +0000 (00:07 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:51 +0000 (10:07 +0100)
commit11539276e399611cbb9c24f3ad960de62cd706dc
tree85f1f9695efd5bf771af618aa4e0bae58a2884f3
parent3aee0ca521f01640bcf2e6d1de01d27f0bc686e0
rcu/tree: Force quiescent state on callback overload

[ Upstream commit 9c39245382de4d52a122641952900709d4a9950b ]

On callback overload, it is necessary to quickly detect idle CPUs,
and rcu_gp_fqs_check_wake() checks for this condition.  Unfortunately,
the code following the call to this function does not repeat this check,
which means that in reality no actual quiescent-state forcing, instead
only a couple of quick and pointless wakeups at the beginning of the
grace period.

This commit therefore adds a check for the RCU_GP_FLAG_OVLD flag in
the post-wakeup "if" statement in rcu_gp_fqs_loop().

Fixes: 1fca4d12f4637 ("rcu: Expedite first two FQS scans under callback-overload conditions")
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/rcu/tree.c