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 261bd37420SPaul E. McKenney variable by a different process? This litmus test is forbidden 271bd37420SPaul E. McKenney by LKMM's propagation rule. 281c27b644SPaul E. McKenney 291c27b644SPaul E. McKenneyIRIW+poonceonces+OnceOnce.litmus 301c27b644SPaul E. McKenney Test of independent reads from independent writes with nothing 311c27b644SPaul E. McKenney between each pairs of reads. In other words, is anything at all 321c27b644SPaul E. McKenney needed to cause two different reading processes to agree on the 331c27b644SPaul E. McKenney order of a pair of writes, where each write is to a different 3462155147SPaul E. McKenney variable by a different process? 351c27b644SPaul E. McKenney 36ff1fe5e0SPaul E. McKenneyISA2+pooncelock+pooncelock+pombonce.litmus 37ff1fe5e0SPaul E. McKenney Tests whether the ordering provided by a lock-protected S 38ff1fe5e0SPaul E. McKenney litmus test is visible to an external process whose accesses are 39ff1fe5e0SPaul E. McKenney separated by smp_mb(). This addition of an external process to 40ff1fe5e0SPaul E. McKenney S is otherwise known as ISA2. 41ff1fe5e0SPaul E. McKenney 421c27b644SPaul E. McKenneyISA2+poonceonces.litmus 431c27b644SPaul E. McKenney As below, but with store-release replaced with WRITE_ONCE() 441c27b644SPaul E. McKenney and load-acquire replaced with READ_ONCE(). 451c27b644SPaul E. McKenney 461c27b644SPaul E. McKenneyISA2+pooncerelease+poacquirerelease+poacquireonce.litmus 471c27b644SPaul E. McKenney Can a release-acquire chain order a prior store against 481c27b644SPaul E. McKenney a later load? 491c27b644SPaul E. McKenney 501c27b644SPaul E. McKenneyLB+ctrlonceonce+mbonceonce.litmus 511c27b644SPaul E. McKenney Does a control dependency and an smp_mb() suffice for the 521c27b644SPaul E. McKenney load-buffering litmus test, where each process reads from one 531c27b644SPaul E. McKenney of two variables then writes to the other? 541c27b644SPaul E. McKenney 551c27b644SPaul E. McKenneyLB+poacquireonce+pooncerelease.litmus 561c27b644SPaul E. McKenney Does a release-acquire pair suffice for the load-buffering 571c27b644SPaul E. McKenney litmus test, where each process reads from one of two variables then 581c27b644SPaul E. McKenney writes to the other? 591c27b644SPaul E. McKenney 601c27b644SPaul E. McKenneyLB+poonceonces.litmus 611c27b644SPaul E. McKenney As above, but with store-release replaced with WRITE_ONCE() 621c27b644SPaul E. McKenney and load-acquire replaced with READ_ONCE(). 631c27b644SPaul E. McKenney 641c27b644SPaul E. McKenneyMP+onceassign+derefonce.litmus 651c27b644SPaul E. McKenney As below, but with rcu_assign_pointer() and an rcu_dereference(). 661c27b644SPaul E. McKenney 6715553dcbSLuc MarangetMP+polockmbonce+poacquiresilsil.litmus 6815553dcbSLuc Maranget Protect the access with a lock and an smp_mb__after_spinlock() 6915553dcbSLuc Maranget in one process, and use an acquire load followed by a pair of 7015553dcbSLuc Maranget spin_is_locked() calls in the other process. 7115553dcbSLuc Maranget 7215553dcbSLuc MarangetMP+polockonce+poacquiresilsil.litmus 7315553dcbSLuc Maranget Protect the access with a lock in one process, and use an 7415553dcbSLuc Maranget acquire load followed by a pair of spin_is_locked() calls 7515553dcbSLuc Maranget in the other process. 7615553dcbSLuc Maranget 771c27b644SPaul E. McKenneyMP+polocks.litmus 781c27b644SPaul E. McKenney As below, but with the second access of the writer process 791c27b644SPaul E. McKenney and the first access of reader process protected by a lock. 801c27b644SPaul E. McKenney 811c27b644SPaul E. McKenneyMP+poonceonces.litmus 821c27b644SPaul E. McKenney As below, but without the smp_rmb() and smp_wmb(). 831c27b644SPaul E. McKenney 841c27b644SPaul E. McKenneyMP+pooncerelease+poacquireonce.litmus 851c27b644SPaul E. McKenney As below, but with a release-acquire chain. 861c27b644SPaul E. McKenney 871c27b644SPaul E. McKenneyMP+porevlocks.litmus 881c27b644SPaul E. McKenney As below, but with the first access of the writer process 891c27b644SPaul E. McKenney and the second access of reader process protected by a lock. 901c27b644SPaul E. McKenney 911c27b644SPaul E. McKenneyMP+wmbonceonce+rmbonceonce.litmus 921c27b644SPaul E. McKenney Does a smp_wmb() (between the stores) and an smp_rmb() (between 931c27b644SPaul E. McKenney the loads) suffice for the message-passing litmus test, where one 941c27b644SPaul E. McKenney process writes data and then a flag, and the other process reads 951c27b644SPaul E. McKenney the flag and then the data. (This is similar to the ISA2 tests, 961c27b644SPaul E. McKenney but with two processes instead of three.) 971c27b644SPaul E. McKenney 981c27b644SPaul E. McKenneyR+mbonceonces.litmus 991c27b644SPaul E. McKenney This is the fully ordered (via smp_mb()) version of one of 1001c27b644SPaul E. McKenney the classic counterintuitive litmus tests that illustrates the 1011c27b644SPaul E. McKenney effects of store propagation delays. 1021c27b644SPaul E. McKenney 1031c27b644SPaul E. McKenneyR+poonceonces.litmus 1041c27b644SPaul E. McKenney As above, but without the smp_mb() invocations. 1051c27b644SPaul E. McKenney 1061c27b644SPaul E. McKenneySB+mbonceonces.litmus 1071c27b644SPaul E. McKenney This is the fully ordered (again, via smp_mb() version of store 1081c27b644SPaul E. McKenney buffering, which forms the core of Dekker's mutual-exclusion 1091c27b644SPaul E. McKenney algorithm. 1101c27b644SPaul E. McKenney 1111c27b644SPaul E. McKenneySB+poonceonces.litmus 1121c27b644SPaul E. McKenney As above, but without the smp_mb() invocations. 1131c27b644SPaul E. McKenney 1141c27b644SPaul E. McKenneyS+poonceonces.litmus 1151c27b644SPaul E. McKenney As below, but without the smp_wmb() and acquire load. 1161c27b644SPaul E. McKenney 1171c27b644SPaul E. McKenneyS+wmbonceonce+poacquireonce.litmus 1181c27b644SPaul E. McKenney Can a smp_wmb(), instead of a release, and an acquire order 1191c27b644SPaul E. McKenney a prior store against a subsequent store? 1201c27b644SPaul E. McKenney 1211c27b644SPaul E. McKenneyWRC+poonceonces+Once.litmus 1221c27b644SPaul E. McKenneyWRC+pooncerelease+rmbonceonce+Once.litmus 1231bd37420SPaul E. McKenney These two are members of an extension of the MP litmus-test 1241bd37420SPaul E. McKenney class in which the first write is moved to a separate process. 1251bd37420SPaul E. McKenney The second is forbidden because smp_store_release() is 1261bd37420SPaul E. McKenney A-cumulative in LKMM. 1271c27b644SPaul E. McKenney 1281c27b644SPaul E. McKenneyZ6.0+pooncelock+pooncelock+pombonce.litmus 1291c27b644SPaul E. McKenney Is the ordering provided by a spin_unlock() and a subsequent 1301c27b644SPaul E. McKenney spin_lock() sufficient to make ordering apparent to accesses 1311c27b644SPaul E. McKenney by a process not holding the lock? 1321c27b644SPaul E. McKenney 1331c27b644SPaul E. McKenneyZ6.0+pooncelock+poonceLock+pombonce.litmus 1341c27b644SPaul E. McKenney As above, but with smp_mb__after_spinlock() immediately 1351c27b644SPaul E. McKenney following the spin_lock(). 1361c27b644SPaul E. McKenney 1371c27b644SPaul E. McKenneyZ6.0+pooncerelease+poacquirerelease+mbonceonce.litmus 1381c27b644SPaul E. McKenney Is the ordering provided by a release-acquire chain sufficient 1391c27b644SPaul E. McKenney to make ordering apparent to accesses by a process that does 1401c27b644SPaul E. McKenney not participate in that release-acquire chain? 1411c27b644SPaul E. McKenney 1421c27b644SPaul E. McKenneyA great many more litmus tests are available here: 1431c27b644SPaul E. McKenney 1441c27b644SPaul E. McKenney https://github.com/paulmckrcu/litmus 145