Documentation: LKMM: Move MP+onceassign+derefonce to new litmus-tests/rcu/
Subsystems (2)
PATCH v2 1/4 Documentation: LKMM: Move MP+onceassign+derefonce to new litmus-tests/rcu/
Move MP+onceassign+derefonce to the new Documentation/litmus-tests/rcu/ directory.
More RCU-related litmus tests would be added here.
---
Cc: [email protected]
Documentation/litmus-tests/README | 9 +++++++++
.../litmus-tests/rcu}/MP+onceassign+derefonce.litmus | 0
tools/memory-model/litmus-tests/README | 3 ---
3 files changed, 9 insertions(+), 3 deletions(-)
create mode 100644 Documentation/litmus-tests/README
rename {tools/memory-model/litmus-tests => Documentation/litmus-tests/rcu}/MP+onceassign+derefonce.litmus (100%)Documentation/litmus-tests/README new file +9 -0
@@ -0,0 +1,9 @@ +============ +LITMUS TESTS +============ + +RCU (/rcu directory) +-------------------- +MP+onceassign+derefonce.litmus + Demonstrates that rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage.
Documentation/litmus-tests/rcu/MP+onceassign+derefonce.litmus renamed from tools/memory-model/litmus-tests/MP+onceassign+derefonce.litmus +0 -0
tools/memory-model/litmus-tests/README +0 -3
@@ -63,9 +63,6 @@ LB+poonceonces.litmus As above, but with store-release replaced with WRITE_ONCE() and load-acquire replaced with READ_ONCE(). -MP+onceassign+derefonce.litmus - As below, but with rcu_assign_pointer() and an rcu_dereference(). - MP+polockmbonce+poacquiresilsil.litmus Protect the access with a lock and an smp_mb__after_spinlock() in one process, and use an acquire load followed by a pair of
Signature · 1 line
2.25.1.696.g5e7596f4ac-goog
PATCH v2 2/4 Documentation: LKMM: Add litmus test for RCU GP guarantee where updater frees object
This adds an example for the important RCU grace period guarantee, which shows an RCU reader can never span a grace period.
--- .../litmus-tests/rcu/RCU+sync+free.litmus | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/litmus-tests/rcu/RCU+sync+free.litmus
Documentation/litmus-tests/rcu/RCU+sync+free.litmus new file +42 -0
@@ -0,0 +1,42 @@ +C RCU+sync+free + +(* + * Result: Never + * + * This litmus test demonstrates that an RCU reader can never see a write that + * follows a grace period, if it did not see writes that precede that grace + * period. + * + * This is a typical pattern of RCU usage, where the write before the grace + * period assigns a pointer, and the writes following the grace period destroy + * the object that the pointer used to point to. + * + * This is one implication of the RCU grace-period guarantee, which says (among + * other things) that an RCU read-side critical section cannot span a grace period. + *) + +{ +int x = 1; +int *y = &x; +int z = 1; +} + +P0(int *x, int *z, int **y) +{ + int *r0; + int r1; + + rcu_read_lock(); + r0 = rcu_dereference(*y); + r1 = READ_ONCE(*r0); + rcu_read_unlock(); +} + +P1(int *x, int *z, int **y) +{ + rcu_assign_pointer(*y, z); + synchronize_rcu(); + WRITE_ONCE(*x, 0); +} + +exists (0:r0=x /\ 0:r1=0)
Signature · 1 line
2.25.1.696.g5e7596f4ac-goog
PATCH v2 3/4 Documentation: LKMM: Add litmus test for RCU GP guarantee where reader stores
In reply to Joel Fernandes (Google)This adds an example for the important RCU grace period guarantee, which shows an RCU reader can never span a grace period.
--- Documentation/litmus-tests/README | 5 +++ .../litmus-tests/rcu/RCU+sync+read.litmus | 37 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 Documentation/litmus-tests/rcu/RCU+sync+read.litmus
Documentation/litmus-tests/README +5 -0
@@ -7,3 +7,8 @@ RCU (/rcu directory) MP+onceassign+derefonce.litmus Demonstrates that rcu_assign_pointer() and rcu_dereference() to ensure that an RCU reader will not see pre-initialization garbage. + +RCU+sync+read.litmus +RCU+sync+free.litmus + Both the above litmus tests demonstrate the RCU grace period guarantee + that an RCU read-side critical section can never span a grace period.
Documentation/litmus-tests/rcu/RCU+sync+read.litmus new file +37 -0
@@ -0,0 +1,37 @@ +C RCU+sync+read + +(* + * Result: Never + * + * This litmus test demonstrates that after a grace period, an RCU updater always + * sees all stores done in prior RCU read-side critical sections. Such + * read-side critical sections would have ended before the grace period ended. + * + * This is one implication of the RCU grace-period guarantee, which says (among + * other things) that an RCU read-side critical section cannot span a grace period. + *) + +{ +int x = 0; +int y = 0; +} + +P0(int *x, int *y) +{ + rcu_read_lock(); + WRITE_ONCE(*x, 1); + WRITE_ONCE(*y, 1); + rcu_read_unlock(); +} + +P1(int *x, int *y) +{ + int r0; + int r1; + + r0 = READ_ONCE(*x); + synchronize_rcu(); + r1 = READ_ONCE(*y); +} + +exists (1:r0=1 /\ 1:r1=0)
Signature · 1 line
2.25.1.696.g5e7596f4ac-goog
PATCH v2 4/4 MAINTAINERS: Update maintainers for new Documentaion/litmus-tests/
In reply to Joel Fernandes (Google)Also add me as Reviewer for LKMM. Previously a patch to do this was Acked but somewhere along the line got lost. Add myself in this patch.
--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
@@ -9699,6 +9699,7 @@ M: Luc Maranget <[email protected]> M: "Paul E. McKenney" <[email protected]> R: Akira Yokosawa <[email protected]> R: Daniel Lustig <[email protected]> +R: Joel Fernandes <[email protected]> L: [email protected] L: [email protected] S: Supported
@@ -9709,6 +9710,7 @@ F: Documentation/atomic_t.txt F: Documentation/core-api/atomic_ops.rst F: Documentation/core-api/refcount-vs-atomic.rst F: Documentation/memory-barriers.txt +F: Documentation/litmus-tests/ LIS3LV02D ACCELEROMETER DRIVER M: Eric Piel <[email protected]>
Signature · 1 line
2.25.1.696.g5e7596f4ac-goog
Re: [PATCH v2 4/4] MAINTAINERS: Update maintainers for new Documentaion/litmus-tests/
Quoted 4 lines · Joel Fernandes (Google)
Also add me as Reviewer for LKMM. Previously a patch to do this was Acked but somewhere along the line got lost. Add myself in this patch.
Signed-off-by Joel Fernandes (Google) <[email protected]>
Regards,
Boqun
Quoted 27 lines
--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +2
-0@@ -9699,6 +9699,7 @@ M: Luc Maranget <[email protected]> M: "Paul E. McKenney" <[email protected]> R: Akira Yokosawa <[email protected]> R: Daniel Lustig <[email protected]> +R: Joel Fernandes <[email protected]> L: [email protected] L: [email protected] S: Supported@@ -9709,6 +9710,7 @@ F: Documentation/atomic_t.txt F: Documentation/core-api/atomic_ops.rst F: Documentation/core-api/refcount-vs-atomic.rst F: Documentation/memory-barriers.txt +F: Documentation/litmus-tests/ LIS3LV02D ACCELEROMETER DRIVER M: Eric Piel <[email protected]>Signature · 1 line
2.25.1.696.g5e7596f4ac-goog
Re: [PATCH v2 4/4] MAINTAINERS: Update maintainers for new Documentaion/litmus-tests/
In reply to Joel Fernandes (Google)Quoted 4 lines · Joel Fernandes (Google)
Also add me as Reviewer for LKMM. Previously a patch to do this was Acked but somewhere along the line got lost. Add myself in this patch.
Signed-off-by Joel Fernandes (Google) <[email protected]>
For the entire series:
Thanks,
Andrea
Quoted 27 lines
--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +2
-0@@ -9699,6 +9699,7 @@ M: Luc Maranget <[email protected]> M: "Paul E. McKenney" <[email protected]> R: Akira Yokosawa <[email protected]> R: Daniel Lustig <[email protected]> +R: Joel Fernandes <[email protected]> L: [email protected] L: [email protected] S: Supported@@ -9709,6 +9710,7 @@ F: Documentation/atomic_t.txt F: Documentation/core-api/atomic_ops.rst F: Documentation/core-api/refcount-vs-atomic.rst F: Documentation/memory-barriers.txt +F: Documentation/litmus-tests/ LIS3LV02D ACCELEROMETER DRIVER M: Eric Piel <[email protected]>Signature · 1 line
2.25.1.696.g5e7596f4ac-goog
Re: [PATCH v2 4/4] MAINTAINERS: Update maintainers for new Documentaion/litmus-tests/
Quoted 9 lines · Andrea Parri
Quoted 4 lines · Joel Fernandes (Google)
Also add me as Reviewer for LKMM. Previously a patch to do this was Acked but somewhere along the line got lost. Add myself in this patch.
Signed-off-by Joel Fernandes (Google) <[email protected]>For the entire series:
Acked-by Andrea Parri <[email protected]>
Queued and pushed with your ack and Boqun's on this patch, thank you all!
Thanx, Paul
Quoted 31 lines
Thanks,
AndreaQuoted 27 lines
--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +2
-0@@ -9699,6 +9699,7 @@ M: Luc Maranget <[email protected]> M: "Paul E. McKenney" <[email protected]> R: Akira Yokosawa <[email protected]> R: Daniel Lustig <[email protected]> +R: Joel Fernandes <[email protected]> L: [email protected] L: [email protected] S: Supported@@ -9709,6 +9710,7 @@ F: Documentation/atomic_t.txt F: Documentation/core-api/atomic_ops.rst F: Documentation/core-api/refcount-vs-atomic.rst F: Documentation/memory-barriers.txt +F: Documentation/litmus-tests/ LIS3LV02D ACCELEROMETER DRIVER M: Eric Piel <[email protected]>Signature · 1 line
2.25.1.696.g5e7596f4ac-goog
Akira Yokosawa
reviewerHi Joel,
Sorry for the late response but I've noticed some glitches.
Quoted 2 lines · Joel Fernandes (Google)
Move MP+onceassign+derefonce to the new
Documentation/litmus-tests/rcu/directory.
MP+onceassign+derefonce.litmus is called out in tools/memory-model/Documentation/recipes.txt as a representative example of RCU related litmus test.
So I think it should be kept under tools/memory-model/litmus-tests.
Further RCU-related litmus tests can be added under Documentation/litmus-tests/.
IIUC, this change is not picked up by tip tree yet. So we have time to respin the series targeting v5.9.
Quoted 9 lines
More RCU-related litmus tests would be added here.
Signed-off-by Joel Fernandes (Google) <[email protected]>---
Cc: [email protected]Documentation/litmus-tests/README | 9 +++++++++
Please note that later patches to add atomic litmus tests under Documentation/litmus-tests/ by Boqun put README as Documentation/litums-tests/atomic/README.
This patch's location of RCU's README as Documentation/litmus-tests/README looks asymmetric to me.
I'm OK with either merging atomic's README with the top-level one or moving RCU's README to under Documentation/litmus-tests/rcu.
Joel, Boqum, can you sort out the location of README?
Thanks, Akira
Quoted 40 lines
.../litmus-tests/rcu}/MP+onceassign+derefonce.litmus | 0 tools/memory-model/litmus-tests/README | 3 --- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 Documentation/litmus-tests/README rename {tools/memory-model/litmus-tests => Documentation/litmus-tests/rcu}/MP+onceassign+derefonce.litmus (100%)Documentation/litmus-tests/README new file +9
-0@@ -0,0 +1,9 @@ +============ +LITMUS TESTS +============ + +RCU (/rcu directory) +-------------------- +MP+onceassign+derefonce.litmus + Demonstrates that rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage.Documentation/litmus-tests/rcu/MP+onceassign+derefonce.litmus renamed from tools/memory-model/litmus-tests/MP+onceassign+derefonce.litmus +0
-0tools/memory-model/litmus-tests/README +0
-3@@ -63,9 +63,6 @@ LB+poonceonces.litmus As above, but with store-release replaced with WRITE_ONCE() and load-acquire replaced with READ_ONCE(). -MP+onceassign+derefonce.litmus - As below, but with rcu_assign_pointer() and an rcu_dereference(). - MP+polockmbonce+poacquiresilsil.litmus Protect the access with a lock and an smp_mb__after_spinlock() in one process, and use an acquire load followed by a pair of
Akira Yokosawa
reviewercover tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
Quoted 33 lines · Akira Yokosawa
Hi Joel,
Sorry for the late response but I've noticed some glitches.
Quoted 2 lines · Joel Fernandes (Google)
Move MP+onceassign+derefonce to the new
Documentation/litmus-tests/rcu/directory.MP+onceassign+derefonce.litmus is called out in
tools/memory-model/Documentation/recipes.txtas a representative example of RCU related litmus test.So I think it should be kept under
tools/memory-model/litmus-tests.Further RCU-related litmus tests can be added under
Documentation/litmus-tests/.IIUC, this change is not picked up by tip tree yet. So we have time to respin the series targeting v5.9.
Quoted 9 lines
More RCU-related litmus tests would be added here.
Signed-off-by Joel Fernandes (Google) <[email protected]>---
Cc: [email protected]Documentation/litmus-tests/README | 9 +++++++++Please note that later patches to add atomic litmus tests under
Documentation/litmus-tests/by Boqun put README asDocumentation/litums-tests/atomic/README.
Quoted 7 lines
This patch's location of RCU's README as
Documentation/litmus-tests/READMElooks asymmetric to me.I'm OK with either merging atomic's README with the top-level one or moving RCU's README to under
Documentation/litmus-tests/rcu.Joel, Boqum, can you sort out the location of README?
So something like this?
Patch 1/3 is an independent typo fix in recipes.txt. Patch 2/3 reverts the MP+onceassign+derefonce relocation. Patch 3/3 merges atomic's README into the top-level one.
This is relative to -rcu's lkmm branch.
Thoughts?
Thanks, Akira
--
Akira Yokosawa (3):
tools/memory-model: Fix reference to litmus test in recipes.txt Revert "Documentation: LKMM: Move MP+onceassign+derefonce to new
litmus-tests/rcu/"
Documentation/litmus-tests: Merge atomic's README into top-level one
Documentation/litmus-tests/README | 22 ++++++++++++++++---
Documentation/litmus-tests/atomic/README | 16 --------------
tools/memory-model/Documentation/recipes.txt | 2 +-
.../MP+onceassign+derefonce.litmus | 0
tools/memory-model/litmus-tests/README | 3 +++
5 files changed, 23 insertions(+), 20 deletions(-)
delete mode 100644 Documentation/litmus-tests/atomic/README
rename {Documentation/litmus-tests/rcu => tools/memory-model/litmus-tests}/MP+onceassign+derefonce.litmus (100%)Signature · 1 line
2.17.1
Akira Yokosawa
reviewerPATCH 1/3 tools/memory-model: Fix reference to litmus test in recipes.txt
From c171026a697d401ea5d2ad6656d0481944604b14 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 13:37:14 +0900
Subject: [PATCH 1/3] tools/memory-model: Fix reference to litmus test in recipes.txt
The name of litmus test doesn't match the one described below. Fix the name of litmus test.
--- tools/memory-model/Documentation/recipes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/memory-model/Documentation/recipes.txt +1 -1
@@ -126,7 +126,7 @@ However, it is not necessarily the case that accesses ordered by locking will be seen as ordered by CPUs not holding that lock. Consider this example: - /* See Z6.0+pooncerelease+poacquirerelease+fencembonceonce.litmus. */ + /* See Z6.0+pooncelock+pooncelock+pombonce.litmus. */ void CPU0(void) { spin_lock(&mylock);
Signature · 1 line
2.17.1
Akira Yokosawa
reviewerPATCH 2/3 Revert "Documentation: LKMM: Move MP+onceassign+derefonce to new litmus-tests/rcu/"
In reply to Akira YokosawaFrom 898051fee51913f5b9bd01cab98beb8944ec50b2 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 13:43:34 +0900
Subject: [PATCH 2/3] Revert "Documentation: LKMM: Move MP+onceassign+derefonce to new litmus-tests/rcu/"
This reverts commit a5cca3485d9206a9dbbc6f47d2a537e69b53cd82.
MP+onceassign+derefonce.litmus is called out from tools/memory-model/Documentation/recipes.txt.
It should be in the same directory as the other representative tests to help readers inspect it.
---
Documentation/litmus-tests/README | 3 ---
.../memory-model/litmus-tests}/MP+onceassign+derefonce.litmus | 0
tools/memory-model/litmus-tests/README | 3 +++
3 files changed, 3 insertions(+), 3 deletions(-)
rename {Documentation/litmus-tests/rcu => tools/memory-model/litmus-tests}/MP+onceassign+derefonce.litmus (100%)Documentation/litmus-tests/README +0 -3
@@ -4,9 +4,6 @@ LITMUS TESTS RCU (/rcu directory) -------------------- -MP+onceassign+derefonce.litmus - Demonstrates that rcu_assign_pointer() and rcu_dereference() to - ensure that an RCU reader will not see pre-initialization garbage. RCU+sync+read.litmus RCU+sync+free.litmus
tools/memory-model/litmus-tests/MP+onceassign+derefonce.litmus renamed from Documentation/litmus-tests/rcu/MP+onceassign+derefonce.litmus +0 -0
tools/memory-model/litmus-tests/README +3 -0
@@ -63,6 +63,9 @@ LB+poonceonces.litmus As above, but with store-release replaced with WRITE_ONCE() and load-acquire replaced with READ_ONCE(). +MP+onceassign+derefonce.litmus + As below, but with rcu_assign_pointer() and an rcu_dereference(). + MP+polockmbonce+poacquiresilsil.litmus Protect the access with a lock and an smp_mb__after_spinlock() in one process, and use an acquire load followed by a pair of
Signature · 1 line
2.17.1
Akira Yokosawa
reviewerPATCH 3/3 Documentation/litmus-tests: Merge atomic's README into top-level one
In reply to Akira YokosawaFrom 1aa2c25f0ad16382a5bc597cdbdcc817645e01cd Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 15:12:57 +0900
Subject: [PATCH 3/3] Documentation/litmus-tests: Merge atomic's README into top-level one
Where Documentation/litmus-tests/README lists RCU litmus tests, Documentation/litmus-tests/atomic/README lists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction.
--- Documentation/litmus-tests/README | 19 +++++++++++++++++++ Documentation/litmus-tests/atomic/README | 16 ---------------- 2 files changed, 19 insertions(+), 16 deletions(-) delete mode 100644 Documentation/litmus-tests/atomic/README
Documentation/litmus-tests/README +19 -0
@@ -2,6 +2,25 @@ LITMUS TESTS ============ +Each subdirectory contains litmus tests that are typical to describe the +semantics of respective kernel APIs. +For more information about how to "run" a litmus test or how to generate +a kernel test module based on a litmus test, please see +tools/memory-model/README. + + +atomic (/atomic derectory) +-------------------------- + +Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus + Test that an atomic RMW followed by a smp_mb__after_atomic() is + stronger than a normal acquire: both the read and write parts of + the RMW are ordered before the subsequential memory accesses. + +Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus + Test that atomic_set() cannot break the atomicity of atomic RMWs. + + RCU (/rcu directory) --------------------
Documentation/litmus-tests/atomic/README deleted +0 -16
@@ -1,16 +0,0 @@ -This directory contains litmus tests that are typical to describe the semantics -of our atomic APIs. For more information about how to "run" a litmus test or -how to generate a kernel test module based on a litmus test, please see -tools/memory-model/README. - -============ -LITMUS TESTS -============ - -Atomic-RMW+mb__after_atomic-is-stronger-than-acquire - Test that an atomic RMW followed by a smp_mb__after_atomic() is - stronger than a normal acquire: both the read and write parts of - the RMW are ordered before the subsequential memory accesses. - -Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus - Test that atomic_set() cannot break the atomicity of atomic RMWs.
Signature · 1 line
2.17.1
Re: [PATCH 0/3] tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
In reply to Akira YokosawaQuoted 5 lines
Akira Yokosawa (3):
tools/memory-model: Fix reference to litmus test in recipes.txt Revert "Documentation: LKMM: Move MP+onceassign+derefonce to new
litmus-tests/rcu/"
Documentation/litmus-tests: Merge atomic's README into top-level one
For the series:
Thanks,
Andrea
Quoted 14 lines
Documentation/litmus-tests/README | 22 ++++++++++++++++--- Documentation/litmus-tests/atomic/README | 16 -------------- tools/memory-model/Documentation/recipes.txt | 2 +- .../MP+onceassign+derefonce.litmus | 0 tools/memory-model/litmus-tests/README | 3 +++ 5 files changed, 23 insertions(+), 20 deletions(-) delete mode 100644 Documentation/litmus-tests/atomic/README rename {Documentation/litmus-tests/rcu => tools/memory-model/litmus-tests}/MP+onceassign+derefonce.litmus (100%)Signature · 1 line
2.17.1
Paul E. McKenney
maintainerRe: [PATCH 0/3] tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
In reply to Akira YokosawaQuoted 44 lines · Akira Yokosawa
Quoted 33 lines · Akira Yokosawa
Hi Joel,
Sorry for the late response but I've noticed some glitches.
Quoted 2 lines · Joel Fernandes (Google)
Move MP+onceassign+derefonce to the new
Documentation/litmus-tests/rcu/directory.MP+onceassign+derefonce.litmus is called out in
tools/memory-model/Documentation/recipes.txtas a representative example of RCU related litmus test.So I think it should be kept under
tools/memory-model/litmus-tests.Further RCU-related litmus tests can be added under
Documentation/litmus-tests/.IIUC, this change is not picked up by tip tree yet. So we have time to respin the series targeting v5.9.
Quoted 9 lines
More RCU-related litmus tests would be added here.
Signed-off-by Joel Fernandes (Google) <[email protected]>---
Cc: [email protected]Documentation/litmus-tests/README | 9 +++++++++Please note that later patches to add atomic litmus tests under
Documentation/litmus-tests/by Boqun put README asDocumentation/litums-tests/atomic/README.Quoted 7 lines
This patch's location of RCU's README as
Documentation/litmus-tests/READMElooks asymmetric to me.I'm OK with either merging atomic's README with the top-level one or moving RCU's README to under
Documentation/litmus-tests/rcu.Joel, Boqum, can you sort out the location of README?
So something like this?
Quoted 7 lines
Patch 1/3 is an independent typo fix in recipes.txt. Patch 2/3 reverts the MP+onceassign+derefonce relocation. Patch 3/3 merges atomic's README into the top-level one.
This is relative to -rcu's lkmm branch.
Thoughts?
Looks plausible to me, and thank you for reviewing this.
Joel, thoughts?
Thanx, Paul
Quoted 21 lines
Thanks, Akira
--
Akira Yokosawa (3):
tools/memory-model: Fix reference to litmus test in recipes.txt Revert "Documentation: LKMM: Move MP+onceassign+derefonce to new
litmus-tests/rcu/"
Documentation/litmus-tests: Merge atomic's README into top-level oneDocumentation/litmus-tests/README | 22 ++++++++++++++++--- Documentation/litmus-tests/atomic/README | 16 -------------- tools/memory-model/Documentation/recipes.txt | 2 +- .../MP+onceassign+derefonce.litmus | 0 tools/memory-model/litmus-tests/README | 3 +++ 5 files changed, 23 insertions(+), 20 deletions(-) delete mode 100644 Documentation/litmus-tests/atomic/README rename {Documentation/litmus-tests/rcu => tools/memory-model/litmus-tests}/MP+onceassign+derefonce.litmus (100%)Signature · 1 line
2.17.1
Joel Fernandes
Acked-byRe: [PATCH 0/3] tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
Quoted 49 lines · Paul E. McKenney
Quoted 48 lines · Akira Yokosawa
Quoted 33 lines · Akira Yokosawa
Hi Joel,
Sorry for the late response but I've noticed some glitches.
Quoted 2 lines · Joel Fernandes (Google)
Move MP+onceassign+derefonce to the new
Documentation/litmus-tests/rcu/directory.MP+onceassign+derefonce.litmus is called out in
tools/memory-model/Documentation/recipes.txtas a representative example of RCU related litmus test.So I think it should be kept under
tools/memory-model/litmus-tests.Further RCU-related litmus tests can be added under
Documentation/litmus-tests/.IIUC, this change is not picked up by tip tree yet. So we have time to respin the series targeting v5.9.
Quoted 9 lines
More RCU-related litmus tests would be added here.
Signed-off-by Joel Fernandes (Google) <[email protected]>---
Cc: [email protected]Documentation/litmus-tests/README | 9 +++++++++Please note that later patches to add atomic litmus tests under
Documentation/litmus-tests/by Boqun put README asDocumentation/litums-tests/atomic/README.Quoted 7 lines
This patch's location of RCU's README as
Documentation/litmus-tests/READMElooks asymmetric to me.I'm OK with either merging atomic's README with the top-level one or moving RCU's README to under
Documentation/litmus-tests/rcu.Joel, Boqum, can you sort out the location of README?
So something like this?
Patch 1/3 is an independent typo fix in recipes.txt. Patch 2/3 reverts the MP+onceassign+derefonce relocation. Patch 3/3 merges atomic's README into the top-level one.
Quoted 7 lines
Quoted 3 lines
This is relative to -rcu's lkmm branch.
Thoughts?
Looks plausible to me, and thank you for reviewing this.
Joel, thoughts?
Sorry for the delays (OSPM conference in progress). I'm Ok with moving it back to tools/memory-model/.
I think on top of this patch, I'd like to add a reference to the to the litmus test in tools/memory-model/ from Documentation/rcu/.
Just to mention my rationale for Documentation/litmus-tests/rcu/, I was basically looking for a central place for RCU related litmus tests in the kernel sources and the idea of this new directory came up.
For Akira's series,
And could we add the following patch on top of Akira's series so we still maintain a reference to the moved RCU test?
---8<-----------------------
From 52fdb57551cc769d8bd690f4f2b22de36ddece99 Mon Sep 17 00:00:00 2001
From: "Joel Fernandes (Google)" <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH] docs: litmus-tests: Clarify about the RCU pre-initialization
test
Since this test was moved to tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.
--- Documentation/litmus-tests/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/litmus-tests/README +4 -2
@@ -11,7 +11,6 @@ tools/memory-model/README. atomic (/atomic derectory) -------------------------- - Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus Test that an atomic RMW followed by a smp_mb__after_atomic() is stronger than a normal acquire: both the read and write parts of
@@ -23,8 +22,11 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- - RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee that an RCU read-side critical section can never span a grace period. + +MP+onceassign+derefonce.litmus (moved to tools/memory-model/litmus-tests/) + Demonstrates that rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage.
Signature · 1 line
2.26.2.645.ge9eca65c58-goog
Akira Yokosawa
reviewerRe: [PATCH 0/3] tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
Quoted 56 lines · Joel Fernandes
Quoted 55 lines · Paul E. McKenney
Quoted 44 lines · Akira Yokosawa
Quoted 33 lines · Akira Yokosawa
Hi Joel,
Sorry for the late response but I've noticed some glitches.
Quoted 2 lines · Joel Fernandes (Google)
Move MP+onceassign+derefonce to the new
Documentation/litmus-tests/rcu/directory.MP+onceassign+derefonce.litmus is called out in
tools/memory-model/Documentation/recipes.txtas a representative example of RCU related litmus test.So I think it should be kept under
tools/memory-model/litmus-tests.Further RCU-related litmus tests can be added under
Documentation/litmus-tests/.IIUC, this change is not picked up by tip tree yet. So we have time to respin the series targeting v5.9.
Quoted 9 lines
More RCU-related litmus tests would be added here.
Signed-off-by Joel Fernandes (Google) <[email protected]>---
Cc: [email protected]Documentation/litmus-tests/README | 9 +++++++++Please note that later patches to add atomic litmus tests under
Documentation/litmus-tests/by Boqun put README asDocumentation/litums-tests/atomic/README.Quoted 7 lines
This patch's location of RCU's README as
Documentation/litmus-tests/READMElooks asymmetric to me.I'm OK with either merging atomic's README with the top-level one or moving RCU's README to under
Documentation/litmus-tests/rcu.Joel, Boqum, can you sort out the location of README?
So something like this?
Quoted 7 lines
Patch 1/3 is an independent typo fix in recipes.txt. Patch 2/3 reverts the MP+onceassign+derefonce relocation. Patch 3/3 merges atomic's README into the top-level one.
This is relative to -rcu's lkmm branch.
Thoughts?
Looks plausible to me, and thank you for reviewing this.
Quoted 7 lines
Quoted 1 line
Joel, thoughts?
Sorry for the delays (OSPM conference in progress). I'm Ok with moving it back to
tools/memory-model/.I think on top of this patch, I'd like to add a reference to the to the litmus test in
tools/memory-model/fromDocumentation/rcu/.
Sounds reasonable to me. But for most people, it never changes its location. Please find inline comments below.
Quoted 7 lines
Just to mention my rationale for
Documentation/litmus-tests/rcu/, I was basically looking for a central place for RCU related litmus tests in the kernel sources and the idea of this new directory came up.For Akira's series,
Thank you!
Quoted 32 lines
And could we add the following patch on top of Akira's series so we still maintain a reference to the moved RCU test?> ---8<-----------------------
From
52fdb57551cc769d8bd690f4f2b22de36ddece99Mon Sep 17 00:00:00 2001
From: "Joel Fernandes (Google)" <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH] docs: litmus-tests: Clarify about the RCU pre-initialization
testSince this test was moved to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Signed-off-by Joel Fernandes (Google) <[email protected]>--- Documentation/litmus-tests/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/litmus-tests/README +0
-1@@ -11,7 +11,6 @@ tools/memory-model/README. atomic (/atomic derectory) -------------------------- - Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus Test that an atomic RMW followed by a smp_mb__after_atomic() is stronger than a normal acquire: both the read and write parts of
Documentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 26
Quoted 4 lines
Documentation/litmus-tests/README +0
-1@@ -23,8 +22,11 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- -
I loosely followed the convention of ReST documents in putting these empty lines. But I don't mind if they are removed.
Documentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 30
Quoted 6 lines
Documentation/litmus-tests/README +2
-0RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee that an RCU read-side critical section can never span a grace period. + +MP+onceassign+derefonce.litmus (moved to tools/memory-model/litmus-tests/)
As I said above, for those who don't follow developments in the lkmm branch, MP+onceassign+derefonce.litmus stays in tools/memory-model/litmus-tests/. So,
+MP+onceassign+derefonce.litmus (under tools/memory-model/litmus-tests/)
looks better to me.
Thanks, Akira
Quoted 3 lines
Documentation/litmus-tests/README +2
-0+ Demonstrates that rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage.
Re: [PATCH 0/3] tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
On Tue, May 12, 2020 at 08:50:45PM +0900, Akira Yokosawa wrote:
[...]
Quoted 67 lines
Quoted 2 lines
I think on top of this patch, I'd like to add a reference to the to the litmus test in
tools/memory-model/fromDocumentation/rcu/.Sounds reasonable to me. But for most people, it never changes its location. Please find inline comments below.
Quoted 7 lines
Just to mention my rationale for
Documentation/litmus-tests/rcu/, I was basically looking for a central place for RCU related litmus tests in the kernel sources and the idea of this new directory came up.For Akira's series,
Thank you!
Quoted 32 lines
And could we add the following patch on top of Akira's series so we still maintain a reference to the moved RCU test?> ---8<-----------------------
From
52fdb57551cc769d8bd690f4f2b22de36ddece99Mon Sep 17 00:00:00 2001
From: "Joel Fernandes (Google)" <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH] docs: litmus-tests: Clarify about the RCU pre-initialization
testSince this test was moved to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Signed-off-by Joel Fernandes (Google) <[email protected]>--- Documentation/litmus-tests/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/litmus-tests/README +0
-1@@ -11,7 +11,6 @@ tools/memory-model/README. atomic (/atomic derectory) -------------------------- - Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus Test that an atomic RMW followed by a smp_mb__after_atomic() is stronger than a normal acquire: both the read and write parts ofDocumentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 26
Quoted 4 lines
Documentation/litmus-tests/README +0
-1@@ -23,8 +22,11 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- -I loosely followed the convention of ReST documents in putting these empty lines. But I don't mind if they are removed.
Documentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 30
Quoted 6 lines
Documentation/litmus-tests/README +2
-0RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee that an RCU read-side critical section can never span a grace period. + +MP+onceassign+derefonce.litmus (moved to tools/memory-model/litmus-tests/)As I said above, for those who don't follow developments in the lkmm branch, MP+onceassign+derefonce.litmus stays in
tools/memory-model/litmus-tests/. So,
Quoted 3 lines
+MP+onceassign+derefonce.litmus (under
tools/memory-model/litmus-tests/)looks better to me.
Yes it stays under tools/.. but is referenced here. Sounds like you agree and the only change from my follow-up patch that you want is to change "moved to" to "under".
If so, Paul do you mind applying my patch and fixing this up? Or do you want to apply Akira's 3-patch series first and then have me send you another one on top?
thanks,
- Joel
Paul E. McKenney
maintainerRe: [PATCH 0/3] tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
Quoted 73 lines · Joel Fernandes
On Tue, May 12, 2020 at 08:50:45PM +0900, Akira Yokosawa wrote:
[...]Quoted 67 lines
Quoted 2 lines
I think on top of this patch, I'd like to add a reference to the to the litmus test in
tools/memory-model/fromDocumentation/rcu/.Sounds reasonable to me. But for most people, it never changes its location. Please find inline comments below.
Quoted 7 lines
Just to mention my rationale for
Documentation/litmus-tests/rcu/, I was basically looking for a central place for RCU related litmus tests in the kernel sources and the idea of this new directory came up.For Akira's series,
Thank you!
Quoted 32 lines
And could we add the following patch on top of Akira's series so we still maintain a reference to the moved RCU test?> ---8<-----------------------
From
52fdb57551cc769d8bd690f4f2b22de36ddece99Mon Sep 17 00:00:00 2001
From: "Joel Fernandes (Google)" <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH] docs: litmus-tests: Clarify about the RCU pre-initialization
testSince this test was moved to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Signed-off-by Joel Fernandes (Google) <[email protected]>--- Documentation/litmus-tests/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/litmus-tests/README +0
-1@@ -11,7 +11,6 @@ tools/memory-model/README. atomic (/atomic derectory) -------------------------- - Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus Test that an atomic RMW followed by a smp_mb__after_atomic() is stronger than a normal acquire: both the read and write parts ofDocumentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 26
Quoted 4 lines
Documentation/litmus-tests/README +0
-1@@ -23,8 +22,11 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- -I loosely followed the convention of ReST documents in putting these empty lines. But I don't mind if they are removed.
Documentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 30
Quoted 6 lines
Documentation/litmus-tests/README +2
-0RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee that an RCU read-side critical section can never span a grace period. + +MP+onceassign+derefonce.litmus (moved to tools/memory-model/litmus-tests/)As I said above, for those who don't follow developments in the lkmm branch, MP+onceassign+derefonce.litmus stays in
tools/memory-model/litmus-tests/. So,Quoted 3 lines
+MP+onceassign+derefonce.litmus (under
tools/memory-model/litmus-tests/)looks better to me.
Quoted 7 lines
Yes it stays under
tools/.. but is referenced here. Sounds like you agree and the only change from my follow-up patch that you want is to change "moved to" to "under".If so, Paul do you mind applying my patch and fixing this up? Or do you want to apply Akira's 3-patch series first and then have me send you another one on top?
Let's get something that you, Akira, and Alan are good with, then I will apply that, either on top of or in place of the current commits (just tell me which).
Thanx, Paul
Akira Yokosawa
reviewerRe: [PATCH 0/3] tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
Quoted 78 lines · Paul E. McKenney
Quoted 77 lines · Joel Fernandes
On Tue, May 12, 2020 at 08:50:45PM +0900, Akira Yokosawa wrote:
[...]Quoted 67 lines
Quoted 2 lines
I think on top of this patch, I'd like to add a reference to the to the litmus test in
tools/memory-model/fromDocumentation/rcu/.Sounds reasonable to me. But for most people, it never changes its location. Please find inline comments below.
Quoted 7 lines
Just to mention my rationale for
Documentation/litmus-tests/rcu/, I was basically looking for a central place for RCU related litmus tests in the kernel sources and the idea of this new directory came up.For Akira's series,
Thank you!
Quoted 32 lines
And could we add the following patch on top of Akira's series so we still maintain a reference to the moved RCU test?> ---8<-----------------------
From
52fdb57551cc769d8bd690f4f2b22de36ddece99Mon Sep 17 00:00:00 2001
From: "Joel Fernandes (Google)" <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH] docs: litmus-tests: Clarify about the RCU pre-initialization
testSince this test was moved to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Signed-off-by Joel Fernandes (Google) <[email protected]>--- Documentation/litmus-tests/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/litmus-tests/README +0
-1@@ -11,7 +11,6 @@ tools/memory-model/README. atomic (/atomic derectory) -------------------------- - Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus Test that an atomic RMW followed by a smp_mb__after_atomic() is stronger than a normal acquire: both the read and write parts ofDocumentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 26
Quoted 4 lines
Documentation/litmus-tests/README +0
-1@@ -23,8 +22,11 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- -I loosely followed the convention of ReST documents in putting these empty lines. But I don't mind if they are removed.
Documentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 30
Quoted 6 lines
Documentation/litmus-tests/README +2
-0RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee that an RCU read-side critical section can never span a grace period. + +MP+onceassign+derefonce.litmus (moved to tools/memory-model/litmus-tests/)As I said above, for those who don't follow developments in the lkmm branch, MP+onceassign+derefonce.litmus stays in
tools/memory-model/litmus-tests/. So,Quoted 3 lines
+MP+onceassign+derefonce.litmus (under
tools/memory-model/litmus-tests/)looks better to me.
Yes it stays under
tools/.. but is referenced here. Sounds like you agree and the only change from my follow-up patch that you want is to change "moved to" to "under".
Quoted 7 lines
Quoted 3 lines
If so, Paul do you mind applying my patch and fixing this up? Or do you want to apply Akira's 3-patch series first and then have me send you another one on top?
Let's get something that you, Akira, and Alan are good with, then I will apply that, either on top of or in place of the current commits (just tell me which).
OK.
I'm submitting a patch [4/3] with Alan's suggested-by and Joel's and my co-developed-by tags.
The explanation under tools/memory-model/litmus-tests/README also need the same rewording.
Thanks, Akira
Quoted 3 lines
Thanx, Paul
Re: [PATCH 0/3] tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
Quoted 88 lines · Akira Yokosawa
Quoted 78 lines · Paul E. McKenney
Quoted 77 lines · Joel Fernandes
On Tue, May 12, 2020 at 08:50:45PM +0900, Akira Yokosawa wrote:
[...]Quoted 67 lines
Quoted 2 lines
I think on top of this patch, I'd like to add a reference to the to the litmus test in
tools/memory-model/fromDocumentation/rcu/.Sounds reasonable to me. But for most people, it never changes its location. Please find inline comments below.
Quoted 7 lines
Just to mention my rationale for
Documentation/litmus-tests/rcu/, I was basically looking for a central place for RCU related litmus tests in the kernel sources and the idea of this new directory came up.For Akira's series,
Thank you!
Quoted 32 lines
And could we add the following patch on top of Akira's series so we still maintain a reference to the moved RCU test?> ---8<-----------------------
From
52fdb57551cc769d8bd690f4f2b22de36ddece99Mon Sep 17 00:00:00 2001
From: "Joel Fernandes (Google)" <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH] docs: litmus-tests: Clarify about the RCU pre-initialization
testSince this test was moved to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Signed-off-by Joel Fernandes (Google) <[email protected]>--- Documentation/litmus-tests/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/litmus-tests/README +0
-1@@ -11,7 +11,6 @@ tools/memory-model/README. atomic (/atomic derectory) -------------------------- - Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus Test that an atomic RMW followed by a smp_mb__after_atomic() is stronger than a normal acquire: both the read and write parts ofDocumentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 26
Quoted 4 lines
Documentation/litmus-tests/README +0
-1@@ -23,8 +22,11 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- -I loosely followed the convention of ReST documents in putting these empty lines. But I don't mind if they are removed.
Documentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 30
Quoted 6 lines
Documentation/litmus-tests/README +2
-0RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee that an RCU read-side critical section can never span a grace period. + +MP+onceassign+derefonce.litmus (moved to tools/memory-model/litmus-tests/)As I said above, for those who don't follow developments in the lkmm branch, MP+onceassign+derefonce.litmus stays in
tools/memory-model/litmus-tests/. So,Quoted 3 lines
+MP+onceassign+derefonce.litmus (under
tools/memory-model/litmus-tests/)looks better to me.
Yes it stays under
tools/.. but is referenced here. Sounds like you agree and the only change from my follow-up patch that you want is to change "moved to" to "under".Quoted 7 lines
Quoted 3 lines
If so, Paul do you mind applying my patch and fixing this up? Or do you want to apply Akira's 3-patch series first and then have me send you another one on top?
Let's get something that you, Akira, and Alan are good with, then I will apply that, either on top of or in place of the current commits (just tell me which).
Quoted 5 lines
OK.
I'm submitting a patch [4/3] with Alan's suggested-by and Joel's and my co-developed-by tags.
The explanation undertools/memory-model/litmus-tests/READMEalso need the same rewording.
Sounds good to me, thanks!!
- Joel
Alan Stern
maintainerRe: [PATCH 0/3] tools/memory-model, Documentation/litmus-test: Sort out location of litmus test and README
In reply to Joel FernandesQuoted 28 lines · Joel Fernandes
From: "Joel Fernandes (Google)" <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH] docs: litmus-tests: Clarify about the RCU pre-initialization
testSince this test was moved to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Signed-off-by Joel Fernandes (Google) <[email protected]>--- Documentation/litmus-tests/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/litmus-tests/README +0
-1@@ -11,7 +11,6 @@ tools/memory-model/README. atomic (/atomic derectory) -------------------------- - Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus Test that an atomic RMW followed by a smp_mb__after_atomic() is stronger than a normal acquire: both the read and write parts of@@ -23,8 +22,11 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory)
Documentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 32
Quoted 10 lines
Documentation/litmus-tests/README +4
-1-------------------- - RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee that an RCU read-side critical section can never span a grace period. + +MP+onceassign+derefonce.litmus (moved to tools/memory-model/litmus-tests/) + Demonstrates that rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage.
The grammar in this sentence is awful. Should the first "that" be changed to "the use of"?
Alan
Akira Yokosawa
reviewer[PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization test
In reply to Akira YokosawaFrom 7bb979aacd8788d174df8a56e9803ba9e5b7a381 Mon Sep 17 00:00:00 2001
From: Joel Fernandes (Google) <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization test
Since this test returned to tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.
---
I said in the earlier message:
Quoted 2 lines
The explanation under
tools/memory-model/litmus-tests/READMEalso need the same rewording.
, but obviously I was confused. It is good as is.
This is on top of my earlier patch series.
Joel, Alan, does this work with you?
Thanks, Akira
--
Documentation/litmus-tests/README | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/litmus-tests/README +4 -0
@@ -24,6 +24,10 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- +MP+onceassign+derefonce.litmus (under tools/memory-model/litmus-tests/) + Demonstrates the use of rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage. + RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee
Signature · 1 line
2.17.1
Alan Stern
maintainerRe: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization test
Quoted 36 lines · Akira Yokosawa
From
7bb979aacd8788d174df8a56e9803ba9e5b7a381Mon Sep 17 00:00:00 2001
From: Joel Fernandes (Google) <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization testSince this test returned to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Co-developed-by Joel Fernandes (Google) <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[Alan: grammar nit]Suggested-by Alan Stern <[email protected]>Signed-off-by Joel Fernandes (Google) <[email protected]>Signed-off-by Akira Yokosawa <[email protected]>---
I said in the earlier message:Quoted 2 lines
The explanation under
tools/memory-model/litmus-tests/READMEalso need the same rewording., but obviously I was confused. It is good as is.
This is on top of my earlier patch series.
Joel, Alan, does this work with you?
Thanks, Akira
--Documentation/litmus-tests/README | 4 ++++ 1 file changed, 4 insertions(+)Documentation/litmus-tests/README +0
-0
Documentation/litmus-tests/README Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus · line 33
Quoted 10 lines
Documentation/litmus-tests/README +4
-0@@ -24,6 +24,10 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- +MP+onceassign+derefonce.litmus (under tools/memory-model/litmus-tests/) + Demonstrates the use of rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage. + RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee
That's fine with me.
Alan
Re: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization test
In reply to Akira YokosawaQuoted 18 lines · Akira Yokosawa
From
7bb979aacd8788d174df8a56e9803ba9e5b7a381Mon Sep 17 00:00:00 2001
From: Joel Fernandes (Google) <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization testSince this test returned to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Co-developed-by Joel Fernandes (Google) <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[Alan: grammar nit]Suggested-by Alan Stern <[email protected]>Signed-off-by Joel Fernandes (Google) <[email protected]>Signed-off-by Akira Yokosawa <[email protected]>---
I said in the earlier message:
Quoted 8 lines
Quoted 2 lines
The explanation under
tools/memory-model/litmus-tests/READMEalso need the same rewording., but obviously I was confused. It is good as is.
This is on top of my earlier patch series.
Joel, Alan, does this work with you?
Yes, thanks a lot for doing it. Paul are you Ok with it too?
thanks,
- Joel
Quoted 25 lines
Thanks, Akira
--Documentation/litmus-tests/README | 4 ++++ 1 file changed, 4 insertions(+)Documentation/litmus-tests/README +4
-1@@ -24,6 +24,10 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- +MP+onceassign+derefonce.litmus (under tools/memory-model/litmus-tests/) + Demonstrates the use of rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage. + RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee --2.17.1
Paul E. McKenney
maintainerRe: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization test
Quoted 22 lines · Joel Fernandes
Quoted 21 lines · Akira Yokosawa
From
7bb979aacd8788d174df8a56e9803ba9e5b7a381Mon Sep 17 00:00:00 2001
From: Joel Fernandes (Google) <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization testSince this test returned to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Co-developed-by Joel Fernandes (Google) <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[Alan: grammar nit]Suggested-by Alan Stern <[email protected]>Signed-off-by Joel Fernandes (Google) <[email protected]>Signed-off-by Akira Yokosawa <[email protected]>---
I said in the earlier message:Quoted 2 lines
The explanation under
tools/memory-model/litmus-tests/READMEalso need the same rewording.
Quoted 7 lines
Quoted 5 lines
, but obviously I was confused. It is good as is.
This is on top of my earlier patch series.
Joel, Alan, does this work with you?
Yes, thanks a lot for doing it. Paul are you Ok with it too?
Looks good to me!
Could one of you please send a patch series and instructions, which I -think- will be of the form:
o Revert a5cca3485d92 ("Documentation: LKMM: Move
MP+onceassign+derefonce to new litmus-tests/rcu/")
o Apply a series of patches.
(My head is deep within some ring-buffer code that I am reviewing, so I guarantee that if I try to piece this together from the current set of patches, I will end up producing a spectacular display of destructive creativity.)
Thanx, Paul
Quoted 30 lines
thanks,
- Joel
Quoted 25 lines
Thanks, Akira
--Documentation/litmus-tests/README | 4 ++++ 1 file changed, 4 insertions(+)Documentation/litmus-tests/README +4
-1@@ -24,6 +24,10 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- +MP+onceassign+derefonce.litmus (under tools/memory-model/litmus-tests/) + Demonstrates the use of rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage. + RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee --2.17.1
Akira Yokosawa
reviewercover tools/memory-model, Documentation/litmus-test: Sort out, location of litmus test and README
Hi Paul,
Quoted 7 lines · Paul E. McKenney
Could one of you please send a patch series and instructions, which I -think- will be of the form:
o Revert
a5cca3485d92("Documentation: LKMM: Move
MP+onceassign+derefonce to new litmus-tests/rcu/")o Apply a series of patches.
Here you are!
Note: For 1/4 -- 3/4, Added Andrea's and Joel's Acked-by tags.
Thanks, Akira
--
Akira Yokosawa (3):
tools/memory-model: Fix reference to litmus test in recipes.txt Revert "Documentation: LKMM: Move MP+onceassign+derefonce to new
litmus-tests/rcu/"
Documentation/litmus-tests: Merge atomic's README into top-level one
Joel Fernandes (Google) (1):
docs: litmus-tests: Clarify about the RCU pre-initialization test
Documentation/litmus-tests/README | 24 +++++++++++++++++--
Documentation/litmus-tests/atomic/README | 16 -------------
tools/memory-model/Documentation/recipes.txt | 2 +-
.../MP+onceassign+derefonce.litmus | 0
tools/memory-model/litmus-tests/README | 3 +++
5 files changed, 26 insertions(+), 19 deletions(-)
delete mode 100644 Documentation/litmus-tests/atomic/README
rename {Documentation/litmus-tests/rcu => tools/memory-model/litmus-tests}/MP+onceassign+derefonce.litmus (100%)Signature · 1 line
2.17.1
Akira Yokosawa
reviewerPATCH RESEND 1/4 tools/memory-model: Fix reference to litmus test in recipes.txt
From f9aa6cde74b95cdaae67d484504c3dd69e8bc205 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 13:37:14 +0900
Subject: [PATCH RESEND 1/4] tools/memory-model: Fix reference to litmus test in recipes.txt
The name of litmus test doesn't match the one described below. Fix the name of litmus test.
--- tools/memory-model/Documentation/recipes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/memory-model/Documentation/recipes.txt +1 -1
@@ -126,7 +126,7 @@ However, it is not necessarily the case that accesses ordered by locking will be seen as ordered by CPUs not holding that lock. Consider this example: - /* See Z6.0+pooncerelease+poacquirerelease+fencembonceonce.litmus. */ + /* See Z6.0+pooncelock+pooncelock+pombonce.litmus. */ void CPU0(void) { spin_lock(&mylock);
Signature · 1 line
2.17.1
Akira Yokosawa
reviewerPATCH RESEND 2/4 Revert "Documentation: LKMM: Move MP+onceassign+derefonce to new litmus-tests/rcu/"
In reply to Akira YokosawaFrom dec86a9f1a947ae01d8b66b4f5d9b431fb2a55b5 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 13:43:34 +0900
Subject: [PATCH RESEND 2/4] Revert "Documentation: LKMM: Move MP+onceassign+derefonce to new litmus-tests/rcu/"
This reverts commit a5cca3485d9206a9dbbc6f47d2a537e69b53cd82.
MP+onceassign+derefonce.litmus is called out from tools/memory-model/Documentation/recipes.txt.
It should be in the same directory as the other representative tests to help readers inspect it.
---
Documentation/litmus-tests/README | 3 ---
.../memory-model/litmus-tests}/MP+onceassign+derefonce.litmus | 0
tools/memory-model/litmus-tests/README | 3 +++
3 files changed, 3 insertions(+), 3 deletions(-)
rename {Documentation/litmus-tests/rcu => tools/memory-model/litmus-tests}/MP+onceassign+derefonce.litmus (100%)Documentation/litmus-tests/README +0 -3
@@ -4,9 +4,6 @@ LITMUS TESTS RCU (/rcu directory) -------------------- -MP+onceassign+derefonce.litmus - Demonstrates that rcu_assign_pointer() and rcu_dereference() to - ensure that an RCU reader will not see pre-initialization garbage. RCU+sync+read.litmus RCU+sync+free.litmus
tools/memory-model/litmus-tests/MP+onceassign+derefonce.litmus renamed from Documentation/litmus-tests/rcu/MP+onceassign+derefonce.litmus +0 -0
tools/memory-model/litmus-tests/README +3 -0
@@ -63,6 +63,9 @@ LB+poonceonces.litmus As above, but with store-release replaced with WRITE_ONCE() and load-acquire replaced with READ_ONCE(). +MP+onceassign+derefonce.litmus + As below, but with rcu_assign_pointer() and an rcu_dereference(). + MP+polockmbonce+poacquiresilsil.litmus Protect the access with a lock and an smp_mb__after_spinlock() in one process, and use an acquire load followed by a pair of
Signature · 1 line
2.17.1
Akira Yokosawa
reviewerPATCH RESEND 3/4 Documentation/litmus-tests: Merge atomic's README into top-level one
In reply to Akira YokosawaFrom 96fa6680e3b990633ecbb6d11acf03a161b790bd Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 15:12:57 +0900
Subject: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README into top-level one
Where Documentation/litmus-tests/README lists RCU litmus tests, Documentation/litmus-tests/atomic/README lists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction.
--- Documentation/litmus-tests/README | 19 +++++++++++++++++++ Documentation/litmus-tests/atomic/README | 16 ---------------- 2 files changed, 19 insertions(+), 16 deletions(-) delete mode 100644 Documentation/litmus-tests/atomic/README
Documentation/litmus-tests/README +19 -0
@@ -2,6 +2,25 @@ LITMUS TESTS ============ +Each subdirectory contains litmus tests that are typical to describe the +semantics of respective kernel APIs. +For more information about how to "run" a litmus test or how to generate +a kernel test module based on a litmus test, please see +tools/memory-model/README. + + +atomic (/atomic derectory) +-------------------------- + +Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus + Test that an atomic RMW followed by a smp_mb__after_atomic() is + stronger than a normal acquire: both the read and write parts of + the RMW are ordered before the subsequential memory accesses. + +Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus + Test that atomic_set() cannot break the atomicity of atomic RMWs. + + RCU (/rcu directory) --------------------
Documentation/litmus-tests/atomic/README deleted +0 -16
@@ -1,16 +0,0 @@ -This directory contains litmus tests that are typical to describe the semantics -of our atomic APIs. For more information about how to "run" a litmus test or -how to generate a kernel test module based on a litmus test, please see -tools/memory-model/README. - -============ -LITMUS TESTS -============ - -Atomic-RMW+mb__after_atomic-is-stronger-than-acquire - Test that an atomic RMW followed by a smp_mb__after_atomic() is - stronger than a normal acquire: both the read and write parts of - the RMW are ordered before the subsequential memory accesses. - -Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus - Test that atomic_set() cannot break the atomicity of atomic RMWs.
Signature · 1 line
2.17.1
Re: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README into top-level one
Quoted 5 lines · Akira Yokosawa
From
96fa6680e3b990633ecbb6d11acf03a161b790bdMon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 15:12:57 +0900
Subject: [PATCH RESEND 3/4]Documentation/litmus-tests: Merge atomic's README into top-level one
Quoted 8 lines
Where
Documentation/litmus-tests/READMElists RCU litmus tests,Documentation/litmus-tests/atomic/READMElists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction.Signed-off-by Akira Yokosawa <[email protected]>Acked-by Andrea Parri <[email protected]>
Thanks!
Regards,
Boqun
Quoted 62 lines
--- Documentation/litmus-tests/README | 19 +++++++++++++++++++ Documentation/litmus-tests/atomic/README | 16 ---------------- 2 files changed, 19 insertions(+), 16 deletions(-) delete mode 100644 Documentation/litmus-tests/atomic/READMEDocumentation/litmus-tests/README +19
-0@@ -2,6 +2,25 @@ LITMUS TESTS ============ +Each subdirectory contains litmus tests that are typical to describe the +semantics of respective kernel APIs. +For more information about how to "run" a litmus test or how to generate +a kernel test module based on a litmus test, please see +tools/memory-model/README. + + +atomic (/atomic derectory) +-------------------------- + +Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus + Test that an atomic RMW followed by a smp_mb__after_atomic() is + stronger than a normal acquire: both the read and write parts of + the RMW are ordered before the subsequential memory accesses. + +Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus + Test that atomic_set() cannot break the atomicity of atomic RMWs. + + RCU (/rcu directory) --------------------Documentation/litmus-tests/atomic/README deleted +0
-16@@ -1,16 +0,0 @@ -This directory contains litmus tests that are typical to describe the semantics -of our atomic APIs. For more information about how to "run" a litmus test or -how to generate a kernel test module based on a litmus test, please see -tools/memory-model/README. - -============ -LITMUS TESTS -============ - -Atomic-RMW+mb__after_atomic-is-stronger-than-acquire - Test that an atomic RMW followed by a smp_mb__after_atomic() is - stronger than a normal acquire: both the read and write parts of - the RMW are ordered before the subsequential memory accesses. - -Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus - Test that atomic_set() cannot break the atomicity of atomic RMWs.Signature · 1 line
2.17.1
Re: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README into top-level one
Quoted 11 lines · Boqun Feng
Quoted 10 lines · Akira Yokosawa
From
96fa6680e3b990633ecbb6d11acf03a161b790bdMon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 15:12:57 +0900
Subject: [PATCH RESEND 3/4]Documentation/litmus-tests: Merge atomic's README into top-level oneWhere
Documentation/litmus-tests/READMElists RCU litmus tests,Documentation/litmus-tests/atomic/READMElists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Akira Yokosawa <[email protected]>Acked-by Andrea Parri <[email protected]>Acked-by Boqun Feng <[email protected]>Thanks!
Applied, and thank you all!
I rebased, cancelling the revert with the original, resulting in an updated lkmm branch on -rcu. There was one minor conflict, so could one of you please check to make sure that I resolved things appropriately?
Thanx, Paul
Quoted 65 lines
Regards,
BoqunQuoted 62 lines
--- Documentation/litmus-tests/README | 19 +++++++++++++++++++ Documentation/litmus-tests/atomic/README | 16 ---------------- 2 files changed, 19 insertions(+), 16 deletions(-) delete mode 100644 Documentation/litmus-tests/atomic/READMEDocumentation/litmus-tests/README +19
-0@@ -2,6 +2,25 @@ LITMUS TESTS ============ +Each subdirectory contains litmus tests that are typical to describe the +semantics of respective kernel APIs. +For more information about how to "run" a litmus test or how to generate +a kernel test module based on a litmus test, please see +tools/memory-model/README. + + +atomic (/atomic derectory) +-------------------------- + +Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus + Test that an atomic RMW followed by a smp_mb__after_atomic() is + stronger than a normal acquire: both the read and write parts of + the RMW are ordered before the subsequential memory accesses. + +Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus + Test that atomic_set() cannot break the atomicity of atomic RMWs. + + RCU (/rcu directory) --------------------Documentation/litmus-tests/atomic/README deleted +0
-16@@ -1,16 +0,0 @@ -This directory contains litmus tests that are typical to describe the semantics -of our atomic APIs. For more information about how to "run" a litmus test or -how to generate a kernel test module based on a litmus test, please see -tools/memory-model/README. - -============ -LITMUS TESTS -============ - -Atomic-RMW+mb__after_atomic-is-stronger-than-acquire - Test that an atomic RMW followed by a smp_mb__after_atomic() is - stronger than a normal acquire: both the read and write parts of - the RMW are ordered before the subsequential memory accesses. - -Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus - Test that atomic_set() cannot break the atomicity of atomic RMWs.Signature · 1 line
2.17.1
Akira Yokosawa
reviewerRe: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README into top-level one
Quoted 18 lines · Paul E. McKenney
Quoted 17 lines · Boqun Feng
Quoted 5 lines · Akira Yokosawa
From
96fa6680e3b990633ecbb6d11acf03a161b790bdMon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 15:12:57 +0900
Subject: [PATCH RESEND 3/4]Documentation/litmus-tests: Merge atomic's README into top-level oneQuoted 8 lines
Where
Documentation/litmus-tests/READMElists RCU litmus tests,Documentation/litmus-tests/atomic/READMElists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction.Signed-off-by Akira Yokosawa <[email protected]>Acked-by Andrea Parri <[email protected]>Acked-by Boqun Feng <[email protected]>
Quoted 7 lines
Quoted 1 line
Thanks!
Applied, and thank you all!
I rebased, cancelling the revert with the original, resulting in an updated lkmm branch on -rcu. There was one minor conflict, so could one of you please check to make sure that I resolved things appropriately?
One thing I noticed.
Commit b2998782ded4 ("Documentation/litmus-tests: Clarify about the RCU pre-initialization test")'s change log says:
Since this test returned to tools/memory-model/, make sure that it is
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at least referenced from Documentation/litmus-tests/'s README.
Because of the rebase, this needs amendment as well as the title.
Something like
Documentation/litumus-tests: Cite a relevant litmus test in tools/memory-model
For ease of finding the RCU related litmus test under tools/memory-model/, add an entry in README.
?
Thanks, Akira
Quoted 68 lines
Thanx, Paul
Quoted 65 lines
Regards,
BoqunQuoted 62 lines
--- Documentation/litmus-tests/README | 19 +++++++++++++++++++ Documentation/litmus-tests/atomic/README | 16 ---------------- 2 files changed, 19 insertions(+), 16 deletions(-) delete mode 100644 Documentation/litmus-tests/atomic/READMEDocumentation/litmus-tests/README +19
-0@@ -2,6 +2,25 @@ LITMUS TESTS ============ +Each subdirectory contains litmus tests that are typical to describe the +semantics of respective kernel APIs. +For more information about how to "run" a litmus test or how to generate +a kernel test module based on a litmus test, please see +tools/memory-model/README. + + +atomic (/atomic derectory) +-------------------------- + +Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus + Test that an atomic RMW followed by a smp_mb__after_atomic() is + stronger than a normal acquire: both the read and write parts of + the RMW are ordered before the subsequential memory accesses. + +Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus + Test that atomic_set() cannot break the atomicity of atomic RMWs. + + RCU (/rcu directory) --------------------Documentation/litmus-tests/atomic/README deleted +0
-16@@ -1,16 +0,0 @@ -This directory contains litmus tests that are typical to describe the semantics -of our atomic APIs. For more information about how to "run" a litmus test or -how to generate a kernel test module based on a litmus test, please see -tools/memory-model/README. - -============ -LITMUS TESTS -============ - -Atomic-RMW+mb__after_atomic-is-stronger-than-acquire - Test that an atomic RMW followed by a smp_mb__after_atomic() is - stronger than a normal acquire: both the read and write parts of - the RMW are ordered before the subsequential memory accesses. - -Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus - Test that atomic_set() cannot break the atomicity of atomic RMWs.Signature · 1 line
2.17.1
Paul E. McKenney
maintainerRe: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README into top-level one
Quoted 38 lines · Akira Yokosawa
Quoted 18 lines · Paul E. McKenney
Quoted 17 lines · Boqun Feng
Quoted 5 lines · Akira Yokosawa
From
96fa6680e3b990633ecbb6d11acf03a161b790bdMon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 15:12:57 +0900
Subject: [PATCH RESEND 3/4]Documentation/litmus-tests: Merge atomic's README into top-level oneQuoted 8 lines
Where
Documentation/litmus-tests/READMElists RCU litmus tests,Documentation/litmus-tests/atomic/READMElists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction.Signed-off-by Akira Yokosawa <[email protected]>Acked-by Andrea Parri <[email protected]>Acked-by Boqun Feng <[email protected]>Quoted 7 lines
Quoted 1 line
Thanks!
Applied, and thank you all!
I rebased, cancelling the revert with the original, resulting in an updated lkmm branch on -rcu. There was one minor conflict, so could one of you please check to make sure that I resolved things appropriately?
One thing I noticed.
Commit
b2998782ded4("Documentation/litmus-tests: Clarify about the RCU pre-initialization test")'s change log says:Since this test returned to
tools/memory-model/, make sure that it is
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at least referenced from Documentation/litmus-tests/'s README.Because of the rebase, this needs amendment as well as the title.
Quoted 8 lines
Something like
Documentation/litumus-tests: Cite a relevant litmus test intools/memory-modelFor ease of finding the RCU related litmus test under
tools/memory-model/, add an entry in README.?
Good catch, and yes, I will update that on the next rebase.
Any other things in need of adjustment?
Thanx, Paul
Quoted 70 lines
Thanks, Akira
Quoted 68 lines
Thanx, Paul
Quoted 65 lines
Regards,
BoqunQuoted 62 lines
--- Documentation/litmus-tests/README | 19 +++++++++++++++++++ Documentation/litmus-tests/atomic/README | 16 ---------------- 2 files changed, 19 insertions(+), 16 deletions(-) delete mode 100644 Documentation/litmus-tests/atomic/READMEDocumentation/litmus-tests/README +19
-0@@ -2,6 +2,25 @@ LITMUS TESTS ============ +Each subdirectory contains litmus tests that are typical to describe the +semantics of respective kernel APIs. +For more information about how to "run" a litmus test or how to generate +a kernel test module based on a litmus test, please see +tools/memory-model/README. + + +atomic (/atomic derectory) +-------------------------- + +Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus + Test that an atomic RMW followed by a smp_mb__after_atomic() is + stronger than a normal acquire: both the read and write parts of + the RMW are ordered before the subsequential memory accesses. + +Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus + Test that atomic_set() cannot break the atomicity of atomic RMWs. + + RCU (/rcu directory) --------------------Documentation/litmus-tests/atomic/README deleted +0
-16@@ -1,16 +0,0 @@ -This directory contains litmus tests that are typical to describe the semantics -of our atomic APIs. For more information about how to "run" a litmus test or -how to generate a kernel test module based on a litmus test, please see -tools/memory-model/README. - -============ -LITMUS TESTS -============ - -Atomic-RMW+mb__after_atomic-is-stronger-than-acquire - Test that an atomic RMW followed by a smp_mb__after_atomic() is - stronger than a normal acquire: both the read and write parts of - the RMW are ordered before the subsequential memory accesses. - -Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus - Test that atomic_set() cannot break the atomicity of atomic RMWs.Signature · 1 line
2.17.1
Akira Yokosawa
reviewerRe: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README into top-level one
Quoted 43 lines · Paul E. McKenney
Quoted 42 lines · Akira Yokosawa
Quoted 18 lines · Paul E. McKenney
Quoted 17 lines · Boqun Feng
Quoted 5 lines · Akira Yokosawa
From
96fa6680e3b990633ecbb6d11acf03a161b790bdMon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 15:12:57 +0900
Subject: [PATCH RESEND 3/4]Documentation/litmus-tests: Merge atomic's README into top-level oneQuoted 8 lines
Where
Documentation/litmus-tests/READMElists RCU litmus tests,Documentation/litmus-tests/atomic/READMElists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction.Signed-off-by Akira Yokosawa <[email protected]>Acked-by Andrea Parri <[email protected]>Acked-by Boqun Feng <[email protected]>Quoted 7 lines
Quoted 1 line
Thanks!
Applied, and thank you all!
I rebased, cancelling the revert with the original, resulting in an updated lkmm branch on -rcu. There was one minor conflict, so could one of you please check to make sure that I resolved things appropriately?
One thing I noticed.
Commit
b2998782ded4("Documentation/litmus-tests: Clarify about the RCU pre-initialization test")'s change log says:Since this test returned to
tools/memory-model/, make sure that it is
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at least referenced from Documentation/litmus-tests/'s README.Because of the rebase, this needs amendment as well as the title.
Something like
Documentation/litumus-tests: Cite a relevant litmus test intools/memory-model
Quoted 8 lines
Quoted 4 lines
For ease of finding the RCU related litmus test under
tools/memory-model/, add an entry in README.?
Good catch, and yes, I will update that on the next rebase.
Any other things in need of adjustment?
Aside from the missing Signed-off-by tags Stephen pointed out, I don't see anything.
Thanks, Akira
Quoted 2 lines
Thanx, Paul
Paul E. McKenney
maintainerRe: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README into top-level one
Quoted 47 lines · Akira Yokosawa
Quoted 46 lines · Paul E. McKenney
Quoted 45 lines · Akira Yokosawa
Quoted 18 lines · Paul E. McKenney
Quoted 17 lines · Boqun Feng
Quoted 5 lines · Akira Yokosawa
From
96fa6680e3b990633ecbb6d11acf03a161b790bdMon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 15:12:57 +0900
Subject: [PATCH RESEND 3/4]Documentation/litmus-tests: Merge atomic's README into top-level oneQuoted 8 lines
Where
Documentation/litmus-tests/READMElists RCU litmus tests,Documentation/litmus-tests/atomic/READMElists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction.Signed-off-by Akira Yokosawa <[email protected]>Acked-by Andrea Parri <[email protected]>Acked-by Boqun Feng <[email protected]>Quoted 7 lines
Quoted 1 line
Thanks!
Applied, and thank you all!
I rebased, cancelling the revert with the original, resulting in an updated lkmm branch on -rcu. There was one minor conflict, so could one of you please check to make sure that I resolved things appropriately?
One thing I noticed.
Commit
b2998782ded4("Documentation/litmus-tests: Clarify about the RCU pre-initialization test")'s change log says:Since this test returned to
tools/memory-model/, make sure that it is
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at least referenced from Documentation/litmus-tests/'s README.Because of the rebase, this needs amendment as well as the title.
Something like
Documentation/litumus-tests: Cite a relevant litmus test intools/memory-modelFor ease of finding the RCU related litmus test under
tools/memory-model/, add an entry in README.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
?
Good catch, and yes, I will update that on the next rebase.
Any other things in need of adjustment?
Aside from the missing Signed-off-by tags Stephen pointed out, I don't see anything.
Yeah, I did mess that up! ;-)
Thank you for checking!!!
Thanx, Paul
Paul E. McKenney
maintainerRe: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README into top-level one
Quoted 52 lines · Paul E. McKenney
Quoted 51 lines · Akira Yokosawa
Quoted 50 lines · Paul E. McKenney
Quoted 38 lines · Akira Yokosawa
Quoted 18 lines · Paul E. McKenney
Quoted 17 lines · Boqun Feng
Quoted 5 lines · Akira Yokosawa
From
96fa6680e3b990633ecbb6d11acf03a161b790bdMon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 10 May 2020 15:12:57 +0900
Subject: [PATCH RESEND 3/4]Documentation/litmus-tests: Merge atomic's README into top-level oneQuoted 8 lines
Where
Documentation/litmus-tests/READMElists RCU litmus tests,Documentation/litmus-tests/atomic/READMElists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction.Signed-off-by Akira Yokosawa <[email protected]>Acked-by Andrea Parri <[email protected]>Acked-by Boqun Feng <[email protected]>Quoted 7 lines
Quoted 1 line
Thanks!
Applied, and thank you all!
I rebased, cancelling the revert with the original, resulting in an updated lkmm branch on -rcu. There was one minor conflict, so could one of you please check to make sure that I resolved things appropriately?
One thing I noticed.
Commit
b2998782ded4("Documentation/litmus-tests: Clarify about the RCU pre-initialization test")'s change log says:Since this test returned to
tools/memory-model/, make sure that it is
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at least referenced from Documentation/litmus-tests/'s README.Because of the rebase, this needs amendment as well as the title.
Quoted 8 lines
Something like
Documentation/litumus-tests: Cite a relevant litmus test intools/memory-modelFor ease of finding the RCU related litmus test under
tools/memory-model/, add an entry in README.?
Good catch, and yes, I will update that on the next rebase.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Any other things in need of adjustment?
Aside from the missing Signed-off-by tags Stephen pointed out, I don't see anything.
Yeah, I did mess that up! ;-)
Thank you for checking!!!
And I have fixed these during the merge with Thomas's and Peter's series (or at least the noinstr-rcu-nmi-2020-05-15 portion of it), again, thank you!
Thanx, Paul
Akira Yokosawa
reviewerPATCH RESEND 4/4 docs: litmus-tests: Clarify about the RCU pre-initialization test
In reply to Akira YokosawaFrom c2d6a0afad370c6fda136704bac9b1ee9557d0eb Mon Sep 17 00:00:00 2001
From: "Joel Fernandes (Google)" <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH RESEND 4/4] docs: litmus-tests: Clarify about the RCU pre-initialization test
Since this test returned to tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.
--- Documentation/litmus-tests/README | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/litmus-tests/README +4 -0
@@ -24,6 +24,10 @@ Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus RCU (/rcu directory) -------------------- +MP+onceassign+derefonce.litmus (under tools/memory-model/litmus-tests/) + Demonstrates the use of rcu_assign_pointer() and rcu_dereference() to + ensure that an RCU reader will not see pre-initialization garbage. + RCU+sync+read.litmus RCU+sync+free.litmus Both the above litmus tests demonstrate the RCU grace period guarantee
Signature · 1 line
2.17.1
Re: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization test
In reply to Paul E. McKenneyQuoted 33 lines · Paul E. McKenney
Quoted 22 lines · Joel Fernandes
Quoted 21 lines · Akira Yokosawa
From
7bb979aacd8788d174df8a56e9803ba9e5b7a381Mon Sep 17 00:00:00 2001
From: Joel Fernandes (Google) <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization testSince this test returned to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Co-developed-by Joel Fernandes (Google) <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[Alan: grammar nit]Suggested-by Alan Stern <[email protected]>Signed-off-by Joel Fernandes (Google) <[email protected]>Signed-off-by Akira Yokosawa <[email protected]>---
I said in the earlier message:Quoted 2 lines
The explanation under
tools/memory-model/litmus-tests/READMEalso need the same rewording.Quoted 7 lines
Quoted 5 lines
, but obviously I was confused. It is good as is.
This is on top of my earlier patch series.
Joel, Alan, does this work with you?
Yes, thanks a lot for doing it. Paul are you Ok with it too?
Looks good to me!
Quoted 7 lines
Could one of you please send a patch series and instructions, which I -think- will be of the form:
o Revert
a5cca3485d92("Documentation: LKMM: Move
MP+onceassign+derefonce to new litmus-tests/rcu/")o Apply a series of patches.
Rebased Akira's 3 and my 1 on top of your /dev branch with the ordering done as above:
Could you pull?
git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git (branch for-paul-dev)
Thanks!
- Joel
Akira Yokosawa
reviewerRe: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization test
Quoted 37 lines · Joel Fernandes
Quoted 36 lines · Paul E. McKenney
Quoted 22 lines · Joel Fernandes
Quoted 21 lines · Akira Yokosawa
From
7bb979aacd8788d174df8a56e9803ba9e5b7a381Mon Sep 17 00:00:00 2001
From: Joel Fernandes (Google) <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization testSince this test returned to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Co-developed-by Joel Fernandes (Google) <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[Alan: grammar nit]Suggested-by Alan Stern <[email protected]>Signed-off-by Joel Fernandes (Google) <[email protected]>Signed-off-by Akira Yokosawa <[email protected]>---
I said in the earlier message:Quoted 2 lines
The explanation under
tools/memory-model/litmus-tests/READMEalso need the same rewording.Quoted 7 lines
Quoted 5 lines
, but obviously I was confused. It is good as is.
This is on top of my earlier patch series.
Joel, Alan, does this work with you?
Yes, thanks a lot for doing it. Paul are you Ok with it too?
Looks good to me!
Could one of you please send a patch series and instructions, which I -think- will be of the form:
Quoted 6 lines
Quoted 4 lines
o Revert
a5cca3485d92("Documentation: LKMM: Move
MP+onceassign+derefonce to new litmus-tests/rcu/")o Apply a series of patches.
Rebased Akira's 3 and my 1 on top of your /dev branch with the ordering done as above:
Oh, I missed the reordering part in my PATCH RESEND series.
Paul, it's up to you which you pull/apply.
Thanks, Akira
Quoted 9 lines
Could you pull?
git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git(branch for-paul-dev)Thanks!
- Joel
Re: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization test
Quoted 39 lines · Akira Yokosawa
Quoted 37 lines · Joel Fernandes
Quoted 36 lines · Paul E. McKenney
Quoted 22 lines · Joel Fernandes
Quoted 21 lines · Akira Yokosawa
From
7bb979aacd8788d174df8a56e9803ba9e5b7a381Mon Sep 17 00:00:00 2001
From: Joel Fernandes (Google) <[email protected]>
Date: Mon, 11 May 2020 22:06:46 -0400
Subject: [PATCH 4/3] docs: litmus-tests: Clarify about the RCU pre-initialization testSince this test returned to
tools/memory-model/, make sure that it is at least referenced from Documentation/litmus-tests/'s README.Co-developed-by Joel Fernandes (Google) <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[Alan: grammar nit]Suggested-by Alan Stern <[email protected]>Signed-off-by Joel Fernandes (Google) <[email protected]>Signed-off-by Akira Yokosawa <[email protected]>---
I said in the earlier message:Quoted 2 lines
The explanation under
tools/memory-model/litmus-tests/READMEalso need the same rewording.Quoted 7 lines
Quoted 5 lines
, but obviously I was confused. It is good as is.
This is on top of my earlier patch series.
Joel, Alan, does this work with you?
Yes, thanks a lot for doing it. Paul are you Ok with it too?
Looks good to me!
Could one of you please send a patch series and instructions, which I -think- will be of the form:
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
o Revert
a5cca3485d92("Documentation: LKMM: Move
MP+onceassign+derefonce to new litmus-tests/rcu/")o Apply a series of patches.
Rebased Akira's 3 and my 1 on top of your /dev branch with the ordering done as above:
Oh, I missed the reordering part in my PATCH RESEND series.
That's Ok, I took care of it ;-) You passed me the ball, I hit it into the goal.
Quoted 1 line
Paul, it's up to you which you pull/apply.
Indeed! ;-)
- Joel
Quoted 12 lines
Thanks, Akira
Quoted 9 lines
Could you pull?
git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git(branch for-paul-dev)Thanks!
- Joel