linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README
@ 2024-06-21  4:08 Akira Yokosawa
  2024-06-21  4:10 ` [PATCH lkmm 1/2] " Akira Yokosawa
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Akira Yokosawa @ 2024-06-21  4:08 UTC (permalink / raw)
  To: Paul E. McKenney, Marco Elver
  Cc: Will Deacon, Peter Zijlstra, Boqun Feng, Nicholas Piggin,
	David Howells, Jade Alglave, Luc Maranget, Daniel Lustig,
	Joel Fernandes, linux-kernel, linux-arch, Andrea Parri,
	Alan Stern, Akira Yokosawa

Hi all,

[+CC: Marco, as Patch 1/2 includes update related to access-marking.txt.]

Looks to me like Andrea's herd-representation.txt has stabilized.
Patch 1/2 fills missing pieces in docs/README.

While skimming through documents, I noticed a typo in simple.txt.
Patch 2/2 fixes it.

        Thanks, Akira
--
Akira Yokosawa (2):
  tools/memory-model: Add locking.txt and glossary.txt to README
  tools/memory-model: simple.txt: Fix dangling 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: 662b960d12d280476c4b09070ed6c4b808ee91da
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH lkmm 1/2] tools/memory-model: Add locking.txt and glossary.txt to README
  2024-06-21  4:08 [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README Akira Yokosawa
@ 2024-06-21  4:10 ` Akira Yokosawa
  2024-06-21  4:12 ` [PATCH lkmm 2/2] tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt Akira Yokosawa
  2024-06-21  8:23 ` [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README Andrea Parri
  2 siblings, 0 replies; 5+ messages in thread
From: Akira Yokosawa @ 2024-06-21  4:10 UTC (permalink / raw)
  To: Paul E. McKenney, Marco Elver
  Cc: Will Deacon, Peter Zijlstra, Boqun Feng, Nicholas Piggin,
	David Howells, Jade Alglave, Luc Maranget, Daniel Lustig,
	Joel Fernandes, linux-kernel, linux-arch, Andrea Parri,
	Alan Stern, Akira Yokosawa

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.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Marco Elver <elver@google.com>
---
 tools/memory-model/Documentation/README | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/memory-model/Documentation/README b/tools/memory-model/Documentation/README
index 44e7dae73b29..08be2140a0fa 100644
--- a/tools/memory-model/Documentation/README
+++ b/tools/memory-model/Documentation/README
@@ -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.
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH lkmm 2/2] tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt
  2024-06-21  4:08 [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README Akira Yokosawa
  2024-06-21  4:10 ` [PATCH lkmm 1/2] " Akira Yokosawa
@ 2024-06-21  4:12 ` Akira Yokosawa
  2024-06-21  8:23 ` [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README Andrea Parri
  2 siblings, 0 replies; 5+ messages in thread
From: Akira Yokosawa @ 2024-06-21  4:12 UTC (permalink / raw)
  To: Paul E. McKenney, Marco Elver
  Cc: Will Deacon, Peter Zijlstra, Boqun Feng, Nicholas Piggin,
	David Howells, Jade Alglave, Luc Maranget, Daniel Lustig,
	Joel Fernandes, linux-kernel, linux-arch, Andrea Parri,
	Alan Stern, Akira Yokosawa

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

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
It might well be a name existed in LKMM's dev phase, but I'm not sure.

 tools/memory-model/Documentation/simple.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/memory-model/Documentation/simple.txt b/tools/memory-model/Documentation/simple.txt
index 4c789ec8334f..21f06c1d1b70 100644
--- a/tools/memory-model/Documentation/simple.txt
+++ b/tools/memory-model/Documentation/simple.txt
@@ -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.
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README
  2024-06-21  4:08 [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README Akira Yokosawa
  2024-06-21  4:10 ` [PATCH lkmm 1/2] " Akira Yokosawa
  2024-06-21  4:12 ` [PATCH lkmm 2/2] tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt Akira Yokosawa
@ 2024-06-21  8:23 ` Andrea Parri
  2024-06-21  9:34   ` Akira Yokosawa
  2 siblings, 1 reply; 5+ messages in thread
From: Andrea Parri @ 2024-06-21  8:23 UTC (permalink / raw)
  To: Akira Yokosawa
  Cc: Paul E. McKenney, Marco Elver, Will Deacon, Peter Zijlstra,
	Boqun Feng, Nicholas Piggin, David Howells, Jade Alglave,
	Luc Maranget, Daniel Lustig, Joel Fernandes, linux-kernel,
	linux-arch, Alan Stern

On Fri, Jun 21, 2024 at 01:08:24PM +0900, Akira Yokosawa wrote:
> Hi all,
> 
> [+CC: Marco, as Patch 1/2 includes update related to access-marking.txt.]
> 
> Looks to me like Andrea's herd-representation.txt has stabilized.
> Patch 1/2 fills missing pieces in docs/README.
> 
> While skimming through documents, I noticed a typo in simple.txt.
> Patch 2/2 fixes it.
> 
>         Thanks, Akira
> --
> Akira Yokosawa (2):
>   tools/memory-model: Add locking.txt and glossary.txt to README
>   tools/memory-model: simple.txt: Fix dangling reference to
>     recipes-pairs.txt

For the series,

Acked-by: Andrea Parri <parri.andrea@gmail.com>

I do get some "trailing whitespace" warning, for patch #1, you might
want to clean up when applying/reposting the series.

  Andrea

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README
  2024-06-21  8:23 ` [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README Andrea Parri
@ 2024-06-21  9:34   ` Akira Yokosawa
  0 siblings, 0 replies; 5+ messages in thread
From: Akira Yokosawa @ 2024-06-21  9:34 UTC (permalink / raw)
  To: Andrea Parri
  Cc: Paul E. McKenney, Marco Elver, Will Deacon, Peter Zijlstra,
	Boqun Feng, Nicholas Piggin, David Howells, Jade Alglave,
	Luc Maranget, Daniel Lustig, Joel Fernandes, linux-kernel,
	linux-arch, Alan Stern, Akira Yokosawa

On Fri, 21 Jun 2024 10:23:28 +0200, Andrea Parri wrote:
> On Fri, Jun 21, 2024 at 01:08:24PM +0900, Akira Yokosawa wrote:
>> Hi all,
>>
>> [+CC: Marco, as Patch 1/2 includes update related to access-marking.txt.]
>>
>> Looks to me like Andrea's herd-representation.txt has stabilized.
>> Patch 1/2 fills missing pieces in docs/README.
>>
>> While skimming through documents, I noticed a typo in simple.txt.
>> Patch 2/2 fixes it.
>>
>>         Thanks, Akira
>> --
>> Akira Yokosawa (2):
>>   tools/memory-model: Add locking.txt and glossary.txt to README
>>   tools/memory-model: simple.txt: Fix dangling reference to
>>     recipes-pairs.txt
> 
> For the series,
> 
> Acked-by: Andrea Parri <parri.andrea@gmail.com>

Thank you!

> 
> I do get some "trailing whitespace" warning, for patch #1, you might
> want to clean up when applying/reposting the series.

Ugh, I failed to setup a pre-commit hook for this repo.  :-/

Will send a v2 in a couple of days.

        Thanks, Akira

> 
>   Andrea


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-21  9:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-21  4:08 [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README Akira Yokosawa
2024-06-21  4:10 ` [PATCH lkmm 1/2] " Akira Yokosawa
2024-06-21  4:12 ` [PATCH lkmm 2/2] tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt Akira Yokosawa
2024-06-21  8:23 ` [PATCH lkmm 0/2] tools/memory-model: Add locking.txt and glossary.txt to README Andrea Parri
2024-06-21  9:34   ` Akira Yokosawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).