]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/memory-model: docs/README: Update introduction of locking.txt
authorAkira Yokosawa <akiyks@gmail.com>
Fri, 14 Mar 2025 11:10:30 +0000 (20:10 +0900)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 22 Apr 2025 18:21:46 +0000 (11:21 -0700)
Commit 9bc931e9e161 ("tools/memory-model: Add locking.txt and
glossary.txt to README") failed to mention the relation of the "Locking"
section in recipes.txt and locking.txt.

The latter is a detailed version of the former intended to be read on
its own.

Reword the description in README and add notes in locking.txt and
recipes.txt to clarify their relationship.

[ paulmck: Wordsmithing. ]

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Andrea Parri <parri.andrea@gmail.com>
tools/memory-model/Documentation/README
tools/memory-model/Documentation/locking.txt
tools/memory-model/Documentation/recipes.txt

index 9999c1effdb65ae7501bec2c8809d3da5094d745..88870b0bceea8d94767dfe73b7618fb82a99564a 100644 (file)
@@ -23,8 +23,11 @@ o    You are familiar with the Linux-kernel concurrency primitives
        that you need, and just want to get started with LKMM litmus
        tests:  litmus-tests.txt
 
-o      You would like to access lock-protected shared variables without
-       having their corresponding locks held:  locking.txt
+o      You need to locklessly access shared variables that are otherwise
+       protected by a lock: locking.txt
+
+       This locking.txt file expands on the "Locking" section in
+       recipes.txt, but is self-contained.
 
 o      You are familiar with Linux-kernel concurrency, and would
        like a detailed intuitive understanding of LKMM, including
index 65c898c64a93afd4754e2ff2ff5bdb0cccfb91af..d6dc3cc34ab6523d6c51476c60f27204cce9a45e 100644 (file)
@@ -1,3 +1,8 @@
+[!] Note:
+       This file expands on the "Locking" section of recipes.txt,
+       focusing on locklessly accessing shared variables that are
+       otherwise protected by a lock.
+
 Locking
 =======
 
index 03f58b11c2525c0e35dfadf714ab2495154c5908..52115ee5f3939aa71634d72973783bed31596afc 100644 (file)
@@ -61,6 +61,10 @@ usual) some things to be careful of:
 Locking
 -------
 
+[!] Note:
+       locking.txt expands on this section, providing more detail on
+       locklessly accessing lock-protected shared variables.
+
 Locking is well-known and straightforward, at least if you don't think
 about it too hard.  And the basic rule is indeed quite simple: Any CPU that
 has acquired a given lock sees any changes previously seen or made by any