Merge tag 's390-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[linux-2.6-microblaze.git] / tools / memory-model / README
index 0f2c366..2b87f39 100644 (file)
@@ -20,13 +20,17 @@ that litmus test to be exercised within the Linux kernel.
 REQUIREMENTS
 ============
 
-Version 7.49 of the "herd7" and "klitmus7" tools must be downloaded
-separately:
+Version 7.52 or higher of the "herd7" and "klitmus7" tools must be
+downloaded separately:
 
   https://github.com/herd/herdtools7
 
 See "herdtools7/INSTALL.md" for installation instructions.
 
+Note that although these tools usually provide backwards compatibility,
+this is not absolutely guaranteed.  Therefore, if a later version does
+not work, please try using the exact version called out above.
+
 
 ==================
 BASIC USAGE: HERD7
@@ -221,8 +225,29 @@ The Linux-kernel memory model has the following limitations:
                additional call_rcu() process to the site of the
                emulated rcu-barrier().
 
-       e.      Sleepable RCU (SRCU) is not modeled.  It can be
-               emulated, but perhaps not simply.
+       e.      Although sleepable RCU (SRCU) is now modeled, there
+               are some subtle differences between its semantics and
+               those in the Linux kernel.  For example, the kernel
+               might interpret the following sequence as two partially
+               overlapping SRCU read-side critical sections:
+
+                        1  r1 = srcu_read_lock(&my_srcu);
+                        2  do_something_1();
+                        3  r2 = srcu_read_lock(&my_srcu);
+                        4  do_something_2();
+                        5  srcu_read_unlock(&my_srcu, r1);
+                        6  do_something_3();
+                        7  srcu_read_unlock(&my_srcu, r2);
+
+               In contrast, LKMM will interpret this as a nested pair of
+               SRCU read-side critical sections, with the outer critical
+               section spanning lines 1-7 and the inner critical section
+               spanning lines 3-5.
+
+               This difference would be more of a concern had anyone
+               identified a reasonable use case for partially overlapping
+               SRCU read-side critical sections.  For more information,
+               please see: https://paulmck.livejournal.com/40593.html
 
        f.      Reader-writer locking is not modeled.  It can be
                emulated in litmus tests using atomic read-modify-write