18c2ecf20Sopenharmony_ci============ 28c2ecf20Sopenharmony_ciLITMUS TESTS 38c2ecf20Sopenharmony_ci============ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciEach subdirectory contains litmus tests that are typical to describe the 68c2ecf20Sopenharmony_cisemantics of respective kernel APIs. 78c2ecf20Sopenharmony_ciFor more information about how to "run" a litmus test or how to generate 88c2ecf20Sopenharmony_cia kernel test module based on a litmus test, please see 98c2ecf20Sopenharmony_citools/memory-model/README. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciatomic (/atomic derectory) 138c2ecf20Sopenharmony_ci-------------------------- 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciAtomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus 168c2ecf20Sopenharmony_ci Test that an atomic RMW followed by a smp_mb__after_atomic() is 178c2ecf20Sopenharmony_ci stronger than a normal acquire: both the read and write parts of 188c2ecf20Sopenharmony_ci the RMW are ordered before the subsequential memory accesses. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciAtomic-RMW-ops-are-atomic-WRT-atomic_set.litmus 218c2ecf20Sopenharmony_ci Test that atomic_set() cannot break the atomicity of atomic RMWs. 228c2ecf20Sopenharmony_ci NOTE: Require herd7 7.56 or later which supports "(void)expr". 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ciRCU (/rcu directory) 268c2ecf20Sopenharmony_ci-------------------- 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciMP+onceassign+derefonce.litmus (under tools/memory-model/litmus-tests/) 298c2ecf20Sopenharmony_ci Demonstrates the use of rcu_assign_pointer() and rcu_dereference() to 308c2ecf20Sopenharmony_ci ensure that an RCU reader will not see pre-initialization garbage. 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciRCU+sync+read.litmus 338c2ecf20Sopenharmony_ciRCU+sync+free.litmus 348c2ecf20Sopenharmony_ci Both the above litmus tests demonstrate the RCU grace period guarantee 358c2ecf20Sopenharmony_ci that an RCU read-side critical section can never span a grace period. 36