1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/Documentation/RCU/Design/Memory-Ordering
Frederic Weisbecker 9a7e73c9be rcu: Remove superfluous full memory barrier upon first EQS snapshot
When the grace period kthread checks the extended quiescent state
counter of a CPU, full ordering is necessary to ensure that either:

* If the GP kthread observes the remote target in an extended quiescent
  state, then that target must observe all accesses prior to the current
  grace period, including the current grace period sequence number, once
  it exits that extended quiescent state.

or:

* If the GP kthread observes the remote target NOT in an extended
  quiescent state, then the target further entering in an extended
  quiescent state must observe all accesses prior to the current
  grace period, including the current grace period sequence number, once
  it enters that extended quiescent state.

This ordering is enforced through a full memory barrier placed right
before taking the first EQS snapshot. However this is superfluous
because the snapshot is taken while holding the target's rnp lock which
provides the necessary ordering through its chain of
smp_mb__after_unlock_lock().

Remove the needless explicit barrier before the snapshot and put a
comment about the implicit barrier newly relied upon here.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2024-06-28 06:43:34 -07:00
..
rcu_node-lock.svg documentation: RCU grace-period memory ordering guarantees 2017-10-09 14:23:36 -07:00
Tree-RCU-Memory-Ordering.rst rcu: Remove superfluous full memory barrier upon first EQS snapshot 2024-06-28 06:43:34 -07:00
TreeRCU-callback-invocation.svg rcu: Rename rcu_check_callbacks() to rcu_sched_clock_irq() 2019-01-25 15:35:21 -08:00
TreeRCU-callback-registry.svg rcu: Remove references to rcu_migrate_callbacks() from diagrams 2023-10-04 17:46:29 +02:00
TreeRCU-dyntick.svg documentation: RCU grace-period memory ordering guarantees 2017-10-09 14:23:36 -07:00
TreeRCU-gp-cleanup.svg doc: Update memory-ordering documentation for ->gp-seq 2018-07-12 15:38:51 -07:00
TreeRCU-gp-fqs.svg rcu: Standardize explicit CPU-hotplug calls 2023-10-04 22:29:45 +02:00
TreeRCU-gp-init-1.svg doc: Update memory-ordering documentation for ->gp-seq 2018-07-12 15:38:51 -07:00
TreeRCU-gp-init-2.svg documentation: RCU grace-period memory ordering guarantees 2017-10-09 14:23:36 -07:00
TreeRCU-gp-init-3.svg doc: Update memory-ordering documentation for ->gp-seq 2018-07-12 15:38:51 -07:00
TreeRCU-gp.svg Merge branches 'rcu/torture', 'rcu/fixes', 'rcu/docs', 'rcu/refscale', 'rcu/tasks' and 'rcu/stall' into rcu/next 2023-10-23 15:24:11 +02:00
TreeRCU-hotplug.svg rcu: Standardize explicit CPU-hotplug calls 2023-10-04 22:29:45 +02:00
TreeRCU-qs.svg Documentation: Rename rcu_node_context_switch() to rcu_note_context_switch() 2019-10-29 02:48:29 -07:00