1*4882a593Smuzhiyun============ 2*4882a593SmuzhiyunLITMUS TESTS 3*4882a593Smuzhiyun============ 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunEach subdirectory contains litmus tests that are typical to describe the 6*4882a593Smuzhiyunsemantics of respective kernel APIs. 7*4882a593SmuzhiyunFor more information about how to "run" a litmus test or how to generate 8*4882a593Smuzhiyuna kernel test module based on a litmus test, please see 9*4882a593Smuzhiyuntools/memory-model/README. 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun 12*4882a593Smuzhiyunatomic (/atomic derectory) 13*4882a593Smuzhiyun-------------------------- 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunAtomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus 16*4882a593Smuzhiyun Test that an atomic RMW followed by a smp_mb__after_atomic() is 17*4882a593Smuzhiyun stronger than a normal acquire: both the read and write parts of 18*4882a593Smuzhiyun the RMW are ordered before the subsequential memory accesses. 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunAtomic-RMW-ops-are-atomic-WRT-atomic_set.litmus 21*4882a593Smuzhiyun Test that atomic_set() cannot break the atomicity of atomic RMWs. 22*4882a593Smuzhiyun NOTE: Require herd7 7.56 or later which supports "(void)expr". 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun 25*4882a593SmuzhiyunRCU (/rcu directory) 26*4882a593Smuzhiyun-------------------- 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunMP+onceassign+derefonce.litmus (under tools/memory-model/litmus-tests/) 29*4882a593Smuzhiyun Demonstrates the use of rcu_assign_pointer() and rcu_dereference() to 30*4882a593Smuzhiyun ensure that an RCU reader will not see pre-initialization garbage. 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunRCU+sync+read.litmus 33*4882a593SmuzhiyunRCU+sync+free.litmus 34*4882a593Smuzhiyun Both the above litmus tests demonstrate the RCU grace period guarantee 35*4882a593Smuzhiyun that an RCU read-side critical section can never span a grace period. 36