From: Paul E. McKenney Date: Mon, 26 Jul 2021 18:57:39 +0000 (-0700) Subject: rcu: Comment rcu_gp_init() code waiting for CPU-hotplug operations X-Git-Tag: v6.6.17~8957^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebc88ad491362e6a4fae5bfb1c23c06c876f70be;p=platform%2Fkernel%2Flinux-rpi.git rcu: Comment rcu_gp_init() code waiting for CPU-hotplug operations Near the beginning of rcu_gp_init() is a per-rcu_node loop that waits for CPU-hotplug operations that might have started before the new grace period did. This commit adds a comment explaining that this wait does not exclude CPU-hotplug operations. Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 0bfebec..e6e1b92 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1775,6 +1775,8 @@ static noinline_for_stack bool rcu_gp_init(void) */ WRITE_ONCE(rcu_state.gp_state, RCU_GP_ONOFF); rcu_for_each_leaf_node(rnp) { + // Wait for CPU-hotplug operations that might have + // started before this grace period did. smp_mb(); // Pair with barriers used when updating ->ofl_seq to odd values. firstseq = READ_ONCE(rnp->ofl_seq); if (firstseq & 0x1)