11c27b644SPaul E. McKenneyThis directory contains the following litmus tests: 21c27b644SPaul E. McKenney 31c27b644SPaul E. McKenneyCoRR+poonceonce+Once.litmus 41c27b644SPaul E. McKenney Test of read-read coherence, that is, whether or not two 51c27b644SPaul E. McKenney successive reads from the same variable are ordered. 61c27b644SPaul E. McKenney 71c27b644SPaul E. McKenneyCoRW+poonceonce+Once.litmus 81c27b644SPaul E. McKenney Test of read-write coherence, that is, whether or not a read 91c27b644SPaul E. McKenney from a given variable followed by a write to that same variable 101c27b644SPaul E. McKenney are ordered. 111c27b644SPaul E. McKenney 121c27b644SPaul E. McKenneyCoWR+poonceonce+Once.litmus 131c27b644SPaul E. McKenney Test of write-read coherence, that is, whether or not a write 141c27b644SPaul E. McKenney to a given variable followed by a read from that same variable 151c27b644SPaul E. McKenney are ordered. 161c27b644SPaul E. McKenney 171c27b644SPaul E. McKenneyCoWW+poonceonce.litmus 181c27b644SPaul E. McKenney Test of write-write coherence, that is, whether or not two 191c27b644SPaul E. McKenney successive writes to the same variable are ordered. 201c27b644SPaul E. McKenney 211c27b644SPaul E. McKenneyIRIW+mbonceonces+OnceOnce.litmus 221c27b644SPaul E. McKenney Test of independent reads from independent writes with smp_mb() 231c27b644SPaul E. McKenney between each pairs of reads. In other words, is smp_mb() 241c27b644SPaul E. McKenney sufficient to cause two different reading processes to agree on 251c27b644SPaul E. McKenney the order of a pair of writes, where each write is to a different 2662155147SPaul E. McKenney variable by a different process? 271c27b644SPaul E. McKenney 281c27b644SPaul E. McKenneyIRIW+poonceonces+OnceOnce.litmus 291c27b644SPaul E. McKenney Test of independent reads from independent writes with nothing 301c27b644SPaul E. McKenney between each pairs of reads. In other words, is anything at all 311c27b644SPaul E. McKenney needed to cause two different reading processes to agree on the 321c27b644SPaul E. McKenney order of a pair of writes, where each write is to a different 3362155147SPaul E. McKenney variable by a different process? 341c27b644SPaul E. McKenney 35ff1fe5e0SPaul E. McKenneyISA2+pooncelock+pooncelock+pombonce.litmus 36ff1fe5e0SPaul E. McKenney Tests whether the ordering provided by a lock-protected S 37ff1fe5e0SPaul E. McKenney litmus test is visible to an external process whose accesses are 38ff1fe5e0SPaul E. McKenney separated by smp_mb(). This addition of an external process to 39ff1fe5e0SPaul E. McKenney S is otherwise known as ISA2. 40ff1fe5e0SPaul E. McKenney 411c27b644SPaul E. McKenneyISA2+poonceonces.litmus 421c27b644SPaul E. McKenney As below, but with store-release replaced with WRITE_ONCE() 431c27b644SPaul E. McKenney and load-acquire replaced with READ_ONCE(). 441c27b644SPaul E. McKenney 451c27b644SPaul E. McKenneyISA2+pooncerelease+poacquirerelease+poacquireonce.litmus 461c27b644SPaul E. McKenney Can a release-acquire chain order a prior store against 471c27b644SPaul E. McKenney a later load? 481c27b644SPaul E. McKenney 491c27b644SPaul E. McKenneyLB+ctrlonceonce+mbonceonce.litmus 501c27b644SPaul E. McKenney Does a control dependency and an smp_mb() suffice for the 511c27b644SPaul E. McKenney load-buffering litmus test, where each process reads from one 521c27b644SPaul E. McKenney of two variables then writes to the other? 531c27b644SPaul E. McKenney 541c27b644SPaul E. McKenneyLB+poacquireonce+pooncerelease.litmus 551c27b644SPaul E. McKenney Does a release-acquire pair suffice for the load-buffering 561c27b644SPaul E. McKenney litmus test, where each process reads from one of two variables then 571c27b644SPaul E. McKenney writes to the other? 581c27b644SPaul E. McKenney 591c27b644SPaul E. McKenneyLB+poonceonces.litmus 601c27b644SPaul E. McKenney As above, but with store-release replaced with WRITE_ONCE() 611c27b644SPaul E. McKenney and load-acquire replaced with READ_ONCE(). 621c27b644SPaul E. McKenney 631c27b644SPaul E. McKenneyMP+onceassign+derefonce.litmus 641c27b644SPaul E. McKenney As below, but with rcu_assign_pointer() and an rcu_dereference(). 651c27b644SPaul E. McKenney 661c27b644SPaul E. McKenneyMP+polocks.litmus 671c27b644SPaul E. McKenney As below, but with the second access of the writer process 681c27b644SPaul E. McKenney and the first access of reader process protected by a lock. 691c27b644SPaul E. McKenney 701c27b644SPaul E. McKenneyMP+poonceonces.litmus 711c27b644SPaul E. McKenney As below, but without the smp_rmb() and smp_wmb(). 721c27b644SPaul E. McKenney 731c27b644SPaul E. McKenneyMP+pooncerelease+poacquireonce.litmus 741c27b644SPaul E. McKenney As below, but with a release-acquire chain. 751c27b644SPaul E. McKenney 761c27b644SPaul E. McKenneyMP+porevlocks.litmus 771c27b644SPaul E. McKenney As below, but with the first access of the writer process 781c27b644SPaul E. McKenney and the second access of reader process protected by a lock. 791c27b644SPaul E. McKenney 801c27b644SPaul E. McKenneyMP+wmbonceonce+rmbonceonce.litmus 811c27b644SPaul E. McKenney Does a smp_wmb() (between the stores) and an smp_rmb() (between 821c27b644SPaul E. McKenney the loads) suffice for the message-passing litmus test, where one 831c27b644SPaul E. McKenney process writes data and then a flag, and the other process reads 841c27b644SPaul E. McKenney the flag and then the data. (This is similar to the ISA2 tests, 851c27b644SPaul E. McKenney but with two processes instead of three.) 861c27b644SPaul E. McKenney 871c27b644SPaul E. McKenneyR+mbonceonces.litmus 881c27b644SPaul E. McKenney This is the fully ordered (via smp_mb()) version of one of 891c27b644SPaul E. McKenney the classic counterintuitive litmus tests that illustrates the 901c27b644SPaul E. McKenney effects of store propagation delays. 911c27b644SPaul E. McKenney 921c27b644SPaul E. McKenneyR+poonceonces.litmus 931c27b644SPaul E. McKenney As above, but without the smp_mb() invocations. 941c27b644SPaul E. McKenney 951c27b644SPaul E. McKenneySB+mbonceonces.litmus 961c27b644SPaul E. McKenney This is the fully ordered (again, via smp_mb() version of store 971c27b644SPaul E. McKenney buffering, which forms the core of Dekker's mutual-exclusion 981c27b644SPaul E. McKenney algorithm. 991c27b644SPaul E. McKenney 1001c27b644SPaul E. McKenneySB+poonceonces.litmus 1011c27b644SPaul E. McKenney As above, but without the smp_mb() invocations. 1021c27b644SPaul E. McKenney 1031c27b644SPaul E. McKenneyS+poonceonces.litmus 1041c27b644SPaul E. McKenney As below, but without the smp_wmb() and acquire load. 1051c27b644SPaul E. McKenney 1061c27b644SPaul E. McKenneyS+wmbonceonce+poacquireonce.litmus 1071c27b644SPaul E. McKenney Can a smp_wmb(), instead of a release, and an acquire order 1081c27b644SPaul E. McKenney a prior store against a subsequent store? 1091c27b644SPaul E. McKenney 1101c27b644SPaul E. McKenneyWRC+poonceonces+Once.litmus 1111c27b644SPaul E. McKenneyWRC+pooncerelease+rmbonceonce+Once.litmus 1121c27b644SPaul E. McKenney These two are members of an extension of the MP litmus-test class 1131c27b644SPaul E. McKenney in which the first write is moved to a separate process. 1141c27b644SPaul E. McKenney 1151c27b644SPaul E. McKenneyZ6.0+pooncelock+pooncelock+pombonce.litmus 1161c27b644SPaul E. McKenney Is the ordering provided by a spin_unlock() and a subsequent 1171c27b644SPaul E. McKenney spin_lock() sufficient to make ordering apparent to accesses 1181c27b644SPaul E. McKenney by a process not holding the lock? 1191c27b644SPaul E. McKenney 1201c27b644SPaul E. McKenneyZ6.0+pooncelock+poonceLock+pombonce.litmus 1211c27b644SPaul E. McKenney As above, but with smp_mb__after_spinlock() immediately 1221c27b644SPaul E. McKenney following the spin_lock(). 1231c27b644SPaul E. McKenney 1241c27b644SPaul E. McKenneyZ6.0+pooncerelease+poacquirerelease+mbonceonce.litmus 1251c27b644SPaul E. McKenney Is the ordering provided by a release-acquire chain sufficient 1261c27b644SPaul E. McKenney to make ordering apparent to accesses by a process that does 1271c27b644SPaul E. McKenney not participate in that release-acquire chain? 1281c27b644SPaul E. McKenney 1291c27b644SPaul E. McKenneyA great many more litmus tests are available here: 1301c27b644SPaul E. McKenney 1311c27b644SPaul E. McKenney https://github.com/paulmckrcu/litmus 132