xref: /linux/tools/memory-model/Documentation/README (revision 95bf3760eb9ceeb93febdc280695347b1e0a89c1)
1ab8bcad6SPaul E. McKenneyIt has been said that successful communication requires first identifying
2ab8bcad6SPaul E. McKenneywhat your audience knows and then building a bridge from their current
3ab8bcad6SPaul E. McKenneyknowledge to what they need to know.  Unfortunately, the expected
4ab8bcad6SPaul E. McKenneyLinux-kernel memory model (LKMM) audience might be anywhere from novice
5ab8bcad6SPaul E. McKenneyto expert both in kernel hacking and in understanding LKMM.
6ab8bcad6SPaul E. McKenney
7ab8bcad6SPaul E. McKenneyThis document therefore points out a number of places to start reading,
8ab8bcad6SPaul E. McKenneydepending on what you know and what you would like to learn.  Please note
9ab8bcad6SPaul E. McKenneythat the documents later in this list assume that the reader understands
10ab8bcad6SPaul E. McKenneythe material provided by documents earlier in this list.
11ab8bcad6SPaul E. McKenney
129bc931e9SAkira YokosawaIf LKMM-specific terms lost you, glossary.txt might help you.
139bc931e9SAkira Yokosawa
14ab8bcad6SPaul E. McKenneyo	You are new to Linux-kernel concurrency: simple.txt
15ab8bcad6SPaul E. McKenney
16ebb477cbSPaul E. McKenneyo	You have some background in Linux-kernel concurrency, and would
17ebb477cbSPaul E. McKenney	like an overview of the types of low-level concurrency primitives
18ebb477cbSPaul E. McKenney	that the Linux kernel provides:  ordering.txt
19ebb477cbSPaul E. McKenney
20ebb477cbSPaul E. McKenney	Here, "low level" means atomic operations to single variables.
21ebb477cbSPaul E. McKenney
22ab8bcad6SPaul E. McKenneyo	You are familiar with the Linux-kernel concurrency primitives
23ab8bcad6SPaul E. McKenney	that you need, and just want to get started with LKMM litmus
24ab8bcad6SPaul E. McKenney	tests:  litmus-tests.txt
25ab8bcad6SPaul E. McKenney
26*13a9a113SAkira Yokosawao	You need to locklessly access shared variables that are otherwise
27*13a9a113SAkira Yokosawa	protected by a lock: locking.txt
28*13a9a113SAkira Yokosawa
29*13a9a113SAkira Yokosawa	This locking.txt file expands on the "Locking" section in
30*13a9a113SAkira Yokosawa	recipes.txt, but is self-contained.
319bc931e9SAkira Yokosawa
32ab8bcad6SPaul E. McKenneyo	You are familiar with Linux-kernel concurrency, and would
33ab8bcad6SPaul E. McKenney	like a detailed intuitive understanding of LKMM, including
34ab8bcad6SPaul E. McKenney	situations involving more than two threads:  recipes.txt
35ab8bcad6SPaul E. McKenney
36ebb477cbSPaul E. McKenneyo	You would like a detailed understanding of what your compiler can
37ebb477cbSPaul E. McKenney	and cannot do to control dependencies:  control-dependencies.txt
38ebb477cbSPaul E. McKenney
399bc931e9SAkira Yokosawao	You would like to mark concurrent normal accesses to shared
409bc931e9SAkira Yokosawa	variables so that intentional "racy" accesses can be properly
419bc931e9SAkira Yokosawa	documented, especially when you are responding to complaints
429bc931e9SAkira Yokosawa	from KCSAN:  access-marking.txt
439bc931e9SAkira Yokosawa
44ab8bcad6SPaul E. McKenneyo	You are familiar with Linux-kernel concurrency and the use of
45ab8bcad6SPaul E. McKenney	LKMM, and would like a quick reference:  cheatsheet.txt
46ab8bcad6SPaul E. McKenney
47ab8bcad6SPaul E. McKenneyo	You are familiar with Linux-kernel concurrency and the use
48ab8bcad6SPaul E. McKenney	of LKMM, and would like to learn about LKMM's requirements,
49e8adbac0SAndrea Parri	rationale, and implementation:	explanation.txt and
50e8adbac0SAndrea Parri	herd-representation.txt
51ab8bcad6SPaul E. McKenney
52ab8bcad6SPaul E. McKenneyo	You are interested in the publications related to LKMM, including
53ab8bcad6SPaul E. McKenney	hardware manuals, academic literature, standards-committee
54ab8bcad6SPaul E. McKenney	working papers, and LWN articles:  references.txt
55ab8bcad6SPaul E. McKenney
56ab8bcad6SPaul E. McKenney
57ab8bcad6SPaul E. McKenney====================
58ab8bcad6SPaul E. McKenneyDESCRIPTION OF FILES
59ab8bcad6SPaul E. McKenney====================
60ab8bcad6SPaul E. McKenney
61ab8bcad6SPaul E. McKenneyREADME
62ab8bcad6SPaul E. McKenney	This file.
63ab8bcad6SPaul E. McKenney
64520c637bSPaul E. McKenneyaccess-marking.txt
65520c637bSPaul E. McKenney	Guidelines for marking intentionally concurrent accesses to
66520c637bSPaul E. McKenney	shared memory.
67520c637bSPaul E. McKenney
68ab8bcad6SPaul E. McKenneycheatsheet.txt
69ab8bcad6SPaul E. McKenney	Quick-reference guide to the Linux-kernel memory model.
70ab8bcad6SPaul E. McKenney
71ebb477cbSPaul E. McKenneycontrol-dependencies.txt
72ebb477cbSPaul E. McKenney	Guide to preventing compiler optimizations from destroying
73ebb477cbSPaul E. McKenney	your control dependencies.
74ebb477cbSPaul E. McKenney
75ab8bcad6SPaul E. McKenneyexplanation.txt
76ab8bcad6SPaul E. McKenney	Detailed description of the memory model.
77ab8bcad6SPaul E. McKenney
789bc931e9SAkira Yokosawaglossary.txt
799bc931e9SAkira Yokosawa	Brief definitions of LKMM-related terms.
809bc931e9SAkira Yokosawa
81e8adbac0SAndrea Parriherd-representation.txt
82e8adbac0SAndrea Parri	The (abstract) representation of the Linux-kernel concurrency
83e8adbac0SAndrea Parri	primitives in terms of events.
84e8adbac0SAndrea Parri
85ab8bcad6SPaul E. McKenneylitmus-tests.txt
86ab8bcad6SPaul E. McKenney	The format, features, capabilities, and limitations of the litmus
87ab8bcad6SPaul E. McKenney	tests that LKMM can evaluate.
88ab8bcad6SPaul E. McKenney
899bc931e9SAkira Yokosawalocking.txt
909bc931e9SAkira Yokosawa	Rules for accessing lock-protected shared variables outside of
919bc931e9SAkira Yokosawa	their corresponding critical sections.
929bc931e9SAkira Yokosawa
93ebb477cbSPaul E. McKenneyordering.txt
94ebb477cbSPaul E. McKenney	Overview of the Linux kernel's low-level memory-ordering
95ebb477cbSPaul E. McKenney	primitives by category.
96ebb477cbSPaul E. McKenney
97ab8bcad6SPaul E. McKenneyrecipes.txt
98ab8bcad6SPaul E. McKenney	Common memory-ordering patterns.
99ab8bcad6SPaul E. McKenney
100ab8bcad6SPaul E. McKenneyreferences.txt
101ab8bcad6SPaul E. McKenney	Background information.
102ab8bcad6SPaul E. McKenney
103ab8bcad6SPaul E. McKenneysimple.txt
104ab8bcad6SPaul E. McKenney	Starting point for someone new to Linux-kernel concurrency.
105ab8bcad6SPaul E. McKenney	And also a reminder of the simpler approaches to concurrency!
106