Skip to contentSkip to conversation

tools/memory-model: Add locking.txt and glossary.txt to README

PATCH Applied Akira Yokosawa 2 participants 4 messages Jun 25, 2024

Subsystems (2)
lore
Share & tools
lore

Akira Yokosawa

author reviewer
#0 lore raw

v2 cover tools/memory-model: Add locking.txt and glossary.txt to README

Hi all,

Here is a v2 series with the trailing white space fixed and Acked-by's from Andrea applied.

Please find v1 at [1] if you need to.

[1]: https://lore.kernel.org/[email protected]/

Thanks, Akira
--
Akira Yokosawa (2):
tools/memory-model: Add locking.txt and glossary.txt to README tools/memory-model: simple.txt: Fix stale reference to
recipes-pairs.txt

 tools/memory-model/Documentation/README     | 17 +++++++++++++++++
 tools/memory-model/Documentation/simple.txt |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)

base-commit: 5bdd17ab5a7259d2da562eab63abab3a6d95adcd

Signature · 1 line
2.34.1
author reviewer
#1 lore raw

PATCH v2 1/2 tools/memory-model: Add locking.txt and glossary.txt to README

locking.txt and glossary.txt have been in LKMM's documentation for quite a while.

Add them in README's introduction of docs and the list of docs at the bottom. Add access-marking.txt in the former as well.

---
v2:
Removed trailing white space (Andrea).

--

 tools/memory-model/Documentation/README | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
tools/memory-model/Documentation/README +17 -0
index 44e7dae73b29..9999c1effdb6 100644
@@ -9,6 +9,8 @@ depending on what you know and what you would like to learn.  Please note
 that the documents later in this list assume that the reader understands
 the material provided by documents earlier in this list.
 
+If LKMM-specific terms lost you, glossary.txt might help you.
+
 o	You are new to Linux-kernel concurrency: simple.txt
 
 o	You have some background in Linux-kernel concurrency, and would
@@ -21,6 +23,9 @@ 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 are familiar with Linux-kernel concurrency, and would
 	like a detailed intuitive understanding of LKMM, including
 	situations involving more than two threads:  recipes.txt
@@ -28,6 +33,11 @@ o	You are familiar with Linux-kernel concurrency, and would
 o	You would like a detailed understanding of what your compiler can
 	and cannot do to control dependencies:  control-dependencies.txt
 
+o	You would like to mark concurrent normal accesses to shared
+	variables so that intentional "racy" accesses can be properly
+	documented, especially when you are responding to complaints
+	from KCSAN:  access-marking.txt
+
 o	You are familiar with Linux-kernel concurrency and the use of
 	LKMM, and would like a quick reference:  cheatsheet.txt
 
@@ -62,6 +72,9 @@ control-dependencies.txt
 explanation.txt
 	Detailed description of the memory model.
 
+glossary.txt
+	Brief definitions of LKMM-related terms.
+
 herd-representation.txt
 	The (abstract) representation of the Linux-kernel concurrency
 	primitives in terms of events.
@@ -70,6 +83,10 @@ litmus-tests.txt
 	The format, features, capabilities, and limitations of the litmus
 	tests that LKMM can evaluate.
 
+locking.txt
+	Rules for accessing lock-protected shared variables outside of
+	their corresponding critical sections.
+
 ordering.txt
 	Overview of the Linux kernel's low-level memory-ordering
 	primitives by category.
Signature · 1 line
2.34.1
author reviewer
#2 lore raw

PATCH v2 2/2 tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt

In reply to Akira Yokosawa

There has never been recipes-paris.txt at least since v5.11. Fix the typo.

---
v2:
No change.

--

 tools/memory-model/Documentation/simple.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/memory-model/Documentation/simple.txt +1 -1
index 4c789ec8334f..21f06c1d1b70 100644
@@ -266,5 +266,5 @@ More complex use cases
 ======================
 
 If the alternatives above do not do what you need, please look at the
-recipes-pairs.txt file to peel off the next layer of the memory-ordering
+recipes.txt file to peel off the next layer of the memory-ordering
 onion.
Signature · 1 line
2.34.1
maintainer Applied
#3 lore raw
In reply to Akira Yokosawa
Quoted 10 lines · Akira Yokosawa

Hi all,

Here is a v2 series with the trailing white space fixed and Acked-by's from Andrea applied.

Please find v1 at [1] if you need to.

[1]: https://lore.kernel.org/[email protected]/

Thanks, Akira

Queued for further review, thank you all!

Thanx, Paul

Quoted 15 lines

--
Akira Yokosawa (2):
tools/memory-model: Add locking.txt and glossary.txt to README tools/memory-model: simple.txt: Fix stale reference to
recipes-pairs.txt

 tools/memory-model/Documentation/README     | 17 +++++++++++++++++
 tools/memory-model/Documentation/simple.txt |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)

base-commit: 5bdd17ab5a7259d2da562eab63abab3a6d95adcd

Signature · 1 line
2.34.1