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