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 6615553dcbSLuc MarangetMP+polockmbonce+poacquiresilsil.litmus 6715553dcbSLuc Maranget Protect the access with a lock and an smp_mb__after_spinlock() 6815553dcbSLuc Maranget in one process, and use an acquire load followed by a pair of 6915553dcbSLuc Maranget spin_is_locked() calls in the other process. 7015553dcbSLuc Maranget 7115553dcbSLuc MarangetMP+polockonce+poacquiresilsil.litmus 7215553dcbSLuc Maranget Protect the access with a lock in one process, and use an 7315553dcbSLuc Maranget acquire load followed by a pair of spin_is_locked() calls 7415553dcbSLuc Maranget in the other process. 7515553dcbSLuc Maranget 761c27b644SPaul E. McKenneyMP+polocks.litmus 771c27b644SPaul E. McKenney As below, but with the second access of the writer process 781c27b644SPaul E. McKenney and the first access of reader process protected by a lock. 791c27b644SPaul E. McKenney 801c27b644SPaul E. McKenneyMP+poonceonces.litmus 811c27b644SPaul E. McKenney As below, but without the smp_rmb() and smp_wmb(). 821c27b644SPaul E. McKenney 831c27b644SPaul E. McKenneyMP+pooncerelease+poacquireonce.litmus 841c27b644SPaul E. McKenney As below, but with a release-acquire chain. 851c27b644SPaul E. McKenney 861c27b644SPaul E. McKenneyMP+porevlocks.litmus 871c27b644SPaul E. McKenney As below, but with the first access of the writer process 881c27b644SPaul E. McKenney and the second access of reader process protected by a lock. 891c27b644SPaul E. McKenney 901c27b644SPaul E. McKenneyMP+wmbonceonce+rmbonceonce.litmus 911c27b644SPaul E. McKenney Does a smp_wmb() (between the stores) and an smp_rmb() (between 921c27b644SPaul E. McKenney the loads) suffice for the message-passing litmus test, where one 931c27b644SPaul E. McKenney process writes data and then a flag, and the other process reads 941c27b644SPaul E. McKenney the flag and then the data. (This is similar to the ISA2 tests, 951c27b644SPaul E. McKenney but with two processes instead of three.) 961c27b644SPaul E. McKenney 971c27b644SPaul E. McKenneyR+mbonceonces.litmus 981c27b644SPaul E. McKenney This is the fully ordered (via smp_mb()) version of one of 991c27b644SPaul E. McKenney the classic counterintuitive litmus tests that illustrates the 1001c27b644SPaul E. McKenney effects of store propagation delays. 1011c27b644SPaul E. McKenney 1021c27b644SPaul E. McKenneyR+poonceonces.litmus 1031c27b644SPaul E. McKenney As above, but without the smp_mb() invocations. 1041c27b644SPaul E. McKenney 1051c27b644SPaul E. McKenneySB+mbonceonces.litmus 1061c27b644SPaul E. McKenney This is the fully ordered (again, via smp_mb() version of store 1071c27b644SPaul E. McKenney buffering, which forms the core of Dekker's mutual-exclusion 1081c27b644SPaul E. McKenney algorithm. 1091c27b644SPaul E. McKenney 1101c27b644SPaul E. McKenneySB+poonceonces.litmus 1111c27b644SPaul E. McKenney As above, but without the smp_mb() invocations. 1121c27b644SPaul E. McKenney 1131c27b644SPaul E. McKenneyS+poonceonces.litmus 1141c27b644SPaul E. McKenney As below, but without the smp_wmb() and acquire load. 1151c27b644SPaul E. McKenney 1161c27b644SPaul E. McKenneyS+wmbonceonce+poacquireonce.litmus 1171c27b644SPaul E. McKenney Can a smp_wmb(), instead of a release, and an acquire order 1181c27b644SPaul E. McKenney a prior store against a subsequent store? 1191c27b644SPaul E. McKenney 1201c27b644SPaul E. McKenneyWRC+poonceonces+Once.litmus 1211c27b644SPaul E. McKenneyWRC+pooncerelease+rmbonceonce+Once.litmus 1221c27b644SPaul E. McKenney These two are members of an extension of the MP litmus-test class 1231c27b644SPaul E. McKenney in which the first write is moved to a separate process. 1241c27b644SPaul E. McKenney 1251c27b644SPaul E. McKenneyZ6.0+pooncelock+pooncelock+pombonce.litmus 1261c27b644SPaul E. McKenney Is the ordering provided by a spin_unlock() and a subsequent 1271c27b644SPaul E. McKenney spin_lock() sufficient to make ordering apparent to accesses 1281c27b644SPaul E. McKenney by a process not holding the lock? 1291c27b644SPaul E. McKenney 1301c27b644SPaul E. McKenneyZ6.0+pooncelock+poonceLock+pombonce.litmus 1311c27b644SPaul E. McKenney As above, but with smp_mb__after_spinlock() immediately 1321c27b644SPaul E. McKenney following the spin_lock(). 1331c27b644SPaul E. McKenney 1341c27b644SPaul E. McKenneyZ6.0+pooncerelease+poacquirerelease+mbonceonce.litmus 1351c27b644SPaul E. McKenney Is the ordering provided by a release-acquire chain sufficient 1361c27b644SPaul E. McKenney to make ordering apparent to accesses by a process that does 1371c27b644SPaul E. McKenney not participate in that release-acquire chain? 1381c27b644SPaul E. McKenney 1391c27b644SPaul E. McKenneyA great many more litmus tests are available here: 1401c27b644SPaul E. McKenney 1411c27b644SPaul E. McKenney https://github.com/paulmckrcu/litmus 142