summaryrefslogtreecommitdiff
path: root/Documentation/litmus-tests/README
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2024-02-01 11:17:54 -0800
committerPaul E. McKenney <paulmck@kernel.org>2024-05-06 14:28:54 -0700
commit293f5bc2717b2178978c0d9ce9584da552279c3b (patch)
tree8a8a5f52e527f156738b2eeade44ec6b81f22fa3 /Documentation/litmus-tests/README
parentd2c470c491719130e9af2e80c1bd7223ac61ee93 (diff)
downloadlinux-293f5bc2717b2178978c0d9ce9584da552279c3b.tar.gz
linux-293f5bc2717b2178978c0d9ce9584da552279c3b.tar.bz2
linux-293f5bc2717b2178978c0d9ce9584da552279c3b.zip
Documentation/litmus-tests: Demonstrate unordered failing cmpxchg
This commit adds four litmus tests showing that a failing cmpxchg() operation is unordered unless followed by an smp_mb__after_atomic() operation. Suggested-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Will Deacon <will@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: David Howells <dhowells@redhat.com> Cc: Jade Alglave <j.alglave@ucl.ac.uk> Cc: Luc Maranget <luc.maranget@inria.fr> Cc: "Paul E. McKenney" <paulmck@kernel.org> Cc: Akira Yokosawa <akiyks@gmail.com> Cc: Daniel Lustig <dlustig@nvidia.com> Cc: Joel Fernandes <joel@joelfernandes.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: <linux-arch@vger.kernel.org> Cc: <linux-doc@vger.kernel.org> Acked-by: Andrea Parri <parri.andrea@gmail.com>
Diffstat (limited to 'Documentation/litmus-tests/README')
-rw-r--r--Documentation/litmus-tests/README16
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/litmus-tests/README b/Documentation/litmus-tests/README
index 26ca56df0212..6c666f3422ea 100644
--- a/Documentation/litmus-tests/README
+++ b/Documentation/litmus-tests/README
@@ -21,6 +21,22 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
Test that atomic_set() cannot break the atomicity of atomic RMWs.
NOTE: Require herd7 7.56 or later which supports "(void)expr".
+cmpxchg-fail-ordered-1.litmus
+ Demonstrate that a failing cmpxchg() operation acts as a full barrier
+ when followed by smp_mb__after_atomic().
+
+cmpxchg-fail-ordered-2.litmus
+ Demonstrate that a failing cmpxchg() operation acts as an acquire
+ operation when followed by smp_mb__after_atomic().
+
+cmpxchg-fail-unordered-1.litmus
+ Demonstrate that a failing cmpxchg() operation does not act as a
+ full barrier.
+
+cmpxchg-fail-unordered-2.litmus
+ Demonstrate that a failing cmpxchg() operation does not act as an
+ acquire operation.
+
locking (/locking directory)
----------------------------