mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
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 <paulmck@kernel.org>
This commit is contained in:
parent
3ac8587852
commit
ebc88ad491
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue