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 2171b7ff5eSAndrea ParriIRIW+fencembonceonces+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 5071b7ff5eSAndrea ParriLB+fencembonceonce+ctrlonceonce.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 9171b7ff5eSAndrea ParriMP+fencewmbonceonce+fencermbonceonce.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 9871b7ff5eSAndrea ParriR+fencembonceonces.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 10671b7ff5eSAndrea ParriSB+fencembonceonces.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 114b4648189SPaul E. McKenneySB+rfionceonce-poonceonces.litmus 115b4648189SPaul E. McKenney This litmus test demonstrates that LKMM is not fully multicopy 116b4648189SPaul E. McKenney atomic. (Neither is it other multicopy atomic.) This litmus test 117b4648189SPaul E. McKenney also demonstrates the "locations" debugging aid, which designates 118b4648189SPaul E. McKenney additional registers and locations to be printed out in the dump 119b4648189SPaul E. McKenney of final states in the herd7 output. Without the "locations" 120b4648189SPaul E. McKenney statement, only those registers and locations mentioned in the 121b4648189SPaul E. McKenney "exists" clause will be printed. 122b4648189SPaul E. McKenney 1231c27b644SPaul E. McKenneyS+poonceonces.litmus 1241c27b644SPaul E. McKenney As below, but without the smp_wmb() and acquire load. 1251c27b644SPaul E. McKenney 12671b7ff5eSAndrea ParriS+fencewmbonceonce+poacquireonce.litmus 1271c27b644SPaul E. McKenney Can a smp_wmb(), instead of a release, and an acquire order 1281c27b644SPaul E. McKenney a prior store against a subsequent store? 1291c27b644SPaul E. McKenney 1301c27b644SPaul E. McKenneyWRC+poonceonces+Once.litmus 13171b7ff5eSAndrea ParriWRC+pooncerelease+fencermbonceonce+Once.litmus 1321bd37420SPaul E. McKenney These two are members of an extension of the MP litmus-test 1331bd37420SPaul E. McKenney class in which the first write is moved to a separate process. 1341bd37420SPaul E. McKenney The second is forbidden because smp_store_release() is 1351bd37420SPaul E. McKenney A-cumulative in LKMM. 1361c27b644SPaul E. McKenney 1371c27b644SPaul E. McKenneyZ6.0+pooncelock+pooncelock+pombonce.litmus 1381c27b644SPaul E. McKenney Is the ordering provided by a spin_unlock() and a subsequent 1391c27b644SPaul E. McKenney spin_lock() sufficient to make ordering apparent to accesses 1401c27b644SPaul E. McKenney by a process not holding the lock? 1411c27b644SPaul E. McKenney 1421c27b644SPaul E. McKenneyZ6.0+pooncelock+poonceLock+pombonce.litmus 1431c27b644SPaul E. McKenney As above, but with smp_mb__after_spinlock() immediately 1441c27b644SPaul E. McKenney following the spin_lock(). 1451c27b644SPaul E. McKenney 14671b7ff5eSAndrea ParriZ6.0+pooncerelease+poacquirerelease+fencembonceonce.litmus 1471c27b644SPaul E. McKenney Is the ordering provided by a release-acquire chain sufficient 1481c27b644SPaul E. McKenney to make ordering apparent to accesses by a process that does 1491c27b644SPaul E. McKenney not participate in that release-acquire chain? 1501c27b644SPaul E. McKenney 1511c27b644SPaul E. McKenneyA great many more litmus tests are available here: 1521c27b644SPaul E. McKenney 1531c27b644SPaul E. McKenney https://github.com/paulmckrcu/litmus 154