Skip to content

Commit ebc88ad

Browse files
committed
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 <[email protected]>
1 parent 3ac8587 commit ebc88ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/rcu/tree.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,8 @@ static noinline_for_stack bool rcu_gp_init(void)
17751775
*/
17761776
WRITE_ONCE(rcu_state.gp_state, RCU_GP_ONOFF);
17771777
rcu_for_each_leaf_node(rnp) {
1778+
// Wait for CPU-hotplug operations that might have
1779+
// started before this grace period did.
17781780
smp_mb(); // Pair with barriers used when updating ->ofl_seq to odd values.
17791781
firstseq = READ_ONCE(rnp->ofl_seq);
17801782
if (firstseq & 0x1)

0 commit comments

Comments
 (0)