From: Paul E. McKenney Date: Thu, 19 Apr 2018 16:40:32 +0000 (-0700) Subject: rcu: Clear request other than RCU_GP_FLAG_INIT at GP end X-Git-Tag: v4.18-rc1~169^2~1^2^3~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a824a287f6eaec65f1cf7aedfd5f6b69d2d3858f;p=thirdparty%2Fkernel%2Flinux.git rcu: Clear request other than RCU_GP_FLAG_INIT at GP end Once the grace period has ended, any RCU_GP_FLAG_FQS requests are irrelevant: The grace period has ended, so there is no longer any point in forcing quiescent states in order to try to make it end sooner. This commit therefore causes rcu_gp_cleanup() to clear any bits other than RCU_GP_FLAG_INIT from ->gp_flags at the end of the grace period. Signed-off-by: Paul E. McKenney Tested-by: Nicholas Piggin --- diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index c7b1e6b2a3dae..25dbbc753fef1 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2181,6 +2181,7 @@ static void rcu_gp_cleanup(struct rcu_state *rsp) READ_ONCE(rsp->gpnum), TPS("newreq")); } + WRITE_ONCE(rsp->gp_flags, rsp->gp_flags & RCU_GP_FLAG_INIT); raw_spin_unlock_irq_rcu_node(rnp); }