Skip to content

Commit 1bd3742

Browse files
paulmckingomolnar
authored andcommitted
tools/memory-model: Flag "cumulativity" and "propagation" tests
This commit flags WRC+pooncerelease+rmbonceonce+Once.litmus as being forbidden by smp_store_release() A-cumulativity and IRIW+mbonceonces+OnceOnce.litmus as being forbidden by the LKMM propagation rule. Suggested-by: Andrea Parri <andrea.parri@amarulasolutions.com> Reported-by: Paolo Bonzini <pbonzini@redhat.com> [ paulmck: Updated wording as suggested by Alan Stern. ] Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will.deacon@arm.com> Cc: akiyks@gmail.com Cc: boqun.feng@gmail.com Cc: dhowells@redhat.com Cc: j.alglave@ucl.ac.uk Cc: linux-arch@vger.kernel.org Cc: luc.maranget@inria.fr Cc: npiggin@gmail.com Cc: parri.andrea@gmail.com Link: http://lkml.kernel.org/r/1526340837-12222-11-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 15553dc commit 1bd3742

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎tools/memory-model/litmus-tests/IRIW+mbonceonces+OnceOnce.litmus‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ C IRIW+mbonceonces+OnceOnce
77
* between each pairs of reads. In other words, is smp_mb() sufficient to
88
* cause two different reading processes to agree on the order of a pair
99
* of writes, where each write is to a different variable by a different
10-
* process?
10+
* process? This litmus test exercises LKMM's "propagation" rule.
1111
*)
1212

1313
{}

‎tools/memory-model/litmus-tests/README‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ IRIW+mbonceonces+OnceOnce.litmus
2323
between each pairs of reads. In other words, is smp_mb()
2424
sufficient to cause two different reading processes to agree on
2525
the order of a pair of writes, where each write is to a different
26-
variable by a different process?
26+
variable by a different process? This litmus test is forbidden
27+
by LKMM's propagation rule.
2728

2829
IRIW+poonceonces+OnceOnce.litmus
2930
Test of independent reads from independent writes with nothing
@@ -119,8 +120,10 @@ S+wmbonceonce+poacquireonce.litmus
119120

120121
WRC+poonceonces+Once.litmus
121122
WRC+pooncerelease+rmbonceonce+Once.litmus
122-
These two are members of an extension of the MP litmus-test class
123-
in which the first write is moved to a separate process.
123+
These two are members of an extension of the MP litmus-test
124+
class in which the first write is moved to a separate process.
125+
The second is forbidden because smp_store_release() is
126+
A-cumulative in LKMM.
124127

125128
Z6.0+pooncelock+pooncelock+pombonce.litmus
126129
Is the ordering provided by a spin_unlock() and a subsequent

‎tools/memory-model/litmus-tests/WRC+pooncerelease+rmbonceonce+Once.litmus‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ C WRC+pooncerelease+rmbonceonce+Once
55
*
66
* This litmus test is an extension of the message-passing pattern, where
77
* the first write is moved to a separate process. Because it features
8-
* a release and a read memory barrier, it should be forbidden.
8+
* a release and a read memory barrier, it should be forbidden. More
9+
* specifically, this litmus test is forbidden because smp_store_release()
10+
* is A-cumulative in LKMM.
911
*)
1012

1113
{}

0 commit comments

Comments
 (0)