Documentation/litmus-tests: Demonstrate unordered failing cmpxchg
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 1 Feb 2024 19:17:54 +0000 (11:17 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 6 May 2024 21:28:54 +0000 (14:28 -0700)
commit293f5bc2717b2178978c0d9ce9584da552279c3b
tree8a8a5f52e527f156738b2eeade44ec6b81f22fa3
parentd2c470c491719130e9af2e80c1bd7223ac61ee93
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>
Documentation/litmus-tests/README
Documentation/litmus-tests/atomic/cmpxchg-fail-ordered-1.litmus [new file with mode: 0644]
Documentation/litmus-tests/atomic/cmpxchg-fail-ordered-2.litmus [new file with mode: 0644]
Documentation/litmus-tests/atomic/cmpxchg-fail-unordered-1.litmus [new file with mode: 0644]
Documentation/litmus-tests/atomic/cmpxchg-fail-unordered-2.litmus [new file with mode: 0644]