tools/memory-model: Expand the cheatsheet.txt notion of relaxed

This commit adds a key entry enumerating the various types of relaxed
operations.  While in the area, it also renames the relaxed rows.

[ paulmck: Apply Boqun Feng feedback. ]
Acked-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
Paul E. McKenney 2020-08-04 11:35:56 -07:00
parent 0b8c06b75e
commit 0ce0c78eff

View File

@ -3,9 +3,9 @@
C Self R W RMW Self R W DR DW RMW SV C Self R W RMW Self R W DR DW RMW SV
-- ---- - - --- ---- - - -- -- --- -- -- ---- - - --- ---- - - -- -- --- --
Store, e.g., WRITE_ONCE() Y Y Relaxed store Y Y
Load, e.g., READ_ONCE() Y Y Y Y Relaxed load Y Y Y Y
Unsuccessful RMW operation Y Y Y Y Relaxed RMW operation Y Y Y Y
rcu_dereference() Y Y Y Y rcu_dereference() Y Y Y Y
Successful *_acquire() R Y Y Y Y Y Y Successful *_acquire() R Y Y Y Y Y Y
Successful *_release() C Y Y Y W Y Successful *_release() C Y Y Y W Y
@ -17,14 +17,19 @@ smp_mb__before_atomic() CP Y Y Y a a a a Y
smp_mb__after_atomic() CP a a Y Y Y Y Y Y smp_mb__after_atomic() CP a a Y Y Y Y Y Y
Key: C: Ordering is cumulative Key: Relaxed: A relaxed operation is either READ_ONCE(), WRITE_ONCE(),
P: Ordering propagates a *_relaxed() RMW operation, an unsuccessful RMW
R: Read, for example, READ_ONCE(), or read portion of RMW operation, a non-value-returning RMW operation such
W: Write, for example, WRITE_ONCE(), or write portion of RMW as atomic_inc(), or one of the atomic*_read() and
Y: Provides ordering atomic*_set() family of operations.
a: Provides ordering given intervening RMW atomic operation C: Ordering is cumulative
DR: Dependent read (address dependency) P: Ordering propagates
DW: Dependent write (address, data, or control dependency) R: Read, for example, READ_ONCE(), or read portion of RMW
RMW: Atomic read-modify-write operation W: Write, for example, WRITE_ONCE(), or write portion of RMW
SELF: Orders self, as opposed to accesses before and/or after Y: Provides ordering
SV: Orders later accesses to the same variable a: Provides ordering given intervening RMW atomic operation
DR: Dependent read (address dependency)
DW: Dependent write (address, data, or control dependency)
RMW: Atomic read-modify-write operation
SELF: Orders self, as opposed to accesses before and/or after
SV: Orders later accesses to the same variable