2020-06-23 02:05:43

by Paul E. McKenney

[permalink] [raw]
Subject: [PATCH tip/core/rcu 13/14] tools/memory-model/README: Expand dependency of klitmus7

From: Akira Yokosawa <[email protected]>

klitmus7 is independent of the memory model but depends on the
build-target kernel release.
It occasionally lost compatibility due to kernel API changes [1, 2, 3].
It was remedied in a backwards-compatible manner respectively [4, 5, 6].

Reflect this fact in README.

[1]: b899a850431e ("compiler.h: Remove ACCESS_ONCE()")
[2]: 0bb95f80a38f ("Makefile: Globally enable VLA warning")
[3]: d56c0d45f0e2 ("proc: decouple proc from VFS with "struct proc_ops"")
[4]: https://github.com/herd/herdtools7/commit/e87d7f9287d1
("klitmus: Use WRITE_ONCE and READ_ONCE in place of deprecated ACCESS_ONCE")
[5]: https://github.com/herd/herdtools7/commit/a0cbb10d02be
("klitmus: Avoid variable length array")
[6]: https://github.com/herd/herdtools7/commit/46b9412d3a58
("klitmus: Linux kernel v5.6.x compat")

NOTE: [5] was ahead of herdtools7 7.53, which did not make an
official release. Code generated by klitmus7 without [5] can still be
built targeting Linux 4.20--5.5 if you don't care VLA warnings.

Acked-by: Andrea Parri <[email protected]>
Signed-off-by: Akira Yokosawa <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
---
tools/memory-model/README | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/tools/memory-model/README b/tools/memory-model/README
index b9c562e..90af203 100644
--- a/tools/memory-model/README
+++ b/tools/memory-model/README
@@ -28,8 +28,34 @@ downloaded separately:
See "herdtools7/INSTALL.md" for installation instructions.

Note that although these tools usually provide backwards compatibility,
-this is not absolutely guaranteed. Therefore, if a later version does
-not work, please try using the exact version called out above.
+this is not absolutely guaranteed.
+
+For example, a future version of herd7 might not work with the model
+in this release. A compatible model will likely be made available in
+a later release of Linux kernel.
+
+If you absolutely need to run the model in this particular release,
+please try using the exact version called out above.
+
+klitmus7 is independent of the model provided here. It has its own
+dependency on a target kernel release where converted code is built
+and executed. Any change in kernel APIs essential to klitmus7 will
+necessitate an upgrade of klitmus7.
+
+If you find any compatibility issues in klitmus7, please inform the
+memory model maintainers.
+
+klitmus7 Compatibility Table
+----------------------------
+
+ ============ ==========
+ target Linux herdtools7
+ ------------ ----------
+ -- 4.18 7.48 --
+ 4.15 -- 4.19 7.49 --
+ 4.20 -- 5.5 7.54 --
+ 5.6 -- HEAD
+ ============ ==========


==================
--
2.9.5


2020-06-23 14:41:53

by Akira Yokosawa

[permalink] [raw]
Subject: Re: [PATCH tip/core/rcu 13/14] tools/memory-model/README: Expand dependency of klitmus7

On Mon, 22 Jun 2020 17:52:30 -0700, [email protected] wrote:
> From: Akira Yokosawa <[email protected]>
>
> klitmus7 is independent of the memory model but depends on the
> build-target kernel release.
> It occasionally lost compatibility due to kernel API changes [1, 2, 3].
> It was remedied in a backwards-compatible manner respectively [4, 5, 6].
>
> Reflect this fact in README.
>
> [1]: b899a850431e ("compiler.h: Remove ACCESS_ONCE()")
> [2]: 0bb95f80a38f ("Makefile: Globally enable VLA warning")
> [3]: d56c0d45f0e2 ("proc: decouple proc from VFS with "struct proc_ops"")
> [4]: https://github.com/herd/herdtools7/commit/e87d7f9287d1
> ("klitmus: Use WRITE_ONCE and READ_ONCE in place of deprecated ACCESS_ONCE")
> [5]: https://github.com/herd/herdtools7/commit/a0cbb10d02be
> ("klitmus: Avoid variable length array")
> [6]: https://github.com/herd/herdtools7/commit/46b9412d3a58
> ("klitmus: Linux kernel v5.6.x compat")
>
> NOTE: [5] was ahead of herdtools7 7.53, which did not make an
> official release. Code generated by klitmus7 without [5] can still be
> built targeting Linux 4.20--5.5 if you don't care VLA warnings.
>
> Acked-by: Andrea Parri <[email protected]>
> Signed-off-by: Akira Yokosawa <[email protected]>
> Signed-off-by: Paul E. McKenney <[email protected]>
> ---
> tools/memory-model/README | 30 ++++++++++++++++++++++++++++--
> 1 file changed, 28 insertions(+), 2 deletions(-)
>
> diff --git a/tools/memory-model/README b/tools/memory-model/README
> index b9c562e..90af203 100644
> --- a/tools/memory-model/README
> +++ b/tools/memory-model/README
> @@ -28,8 +28,34 @@ downloaded separately:
> See "herdtools7/INSTALL.md" for installation instructions.
>
> Note that although these tools usually provide backwards compatibility,
> -this is not absolutely guaranteed. Therefore, if a later version does
> -not work, please try using the exact version called out above.
> +this is not absolutely guaranteed.
> +
> +For example, a future version of herd7 might not work with the model
> +in this release. A compatible model will likely be made available in
> +a later release of Linux kernel.
> +
> +If you absolutely need to run the model in this particular release,
> +please try using the exact version called out above.
> +
> +klitmus7 is independent of the model provided here. It has its own
> +dependency on a target kernel release where converted code is built
> +and executed. Any change in kernel APIs essential to klitmus7 will
> +necessitate an upgrade of klitmus7.
> +
> +If you find any compatibility issues in klitmus7, please inform the
> +memory model maintainers.
> +
> +klitmus7 Compatibility Table
> +----------------------------
> +
> + ============ ==========
> + target Linux herdtools7
> + ------------ ----------
> + -- 4.18 7.48 --
> + 4.15 -- 4.19 7.49 --
> + 4.20 -- 5.5 7.54 --
> + 5.6 -- HEAD
> + ============ ==========

Paul,

I was planning to send an update on this one.
herdtoolds7 7.56 will be released later this week (now tagged 7.56-rc1).

Andrea tested klitmus7 7.56-rc1 against Linux 5.7 and 5.8-rc1.
I tested it against Linux 5.7.4.
klitmus7 worked fine in all these test.

So I think we can safely update the bottom row of the table as:

> + 5.6 -- 7.56 --

Can you amend this one directly?
Or do you want me to send a follow-up patch?

Thanks, Akira

>
>
> ==================
>

2020-06-23 15:56:49

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH tip/core/rcu 13/14] tools/memory-model/README: Expand dependency of klitmus7

On Tue, Jun 23, 2020 at 11:37:32PM +0900, Akira Yokosawa wrote:
> On Mon, 22 Jun 2020 17:52:30 -0700, [email protected] wrote:
> > From: Akira Yokosawa <[email protected]>
> >
> > klitmus7 is independent of the memory model but depends on the
> > build-target kernel release.
> > It occasionally lost compatibility due to kernel API changes [1, 2, 3].
> > It was remedied in a backwards-compatible manner respectively [4, 5, 6].
> >
> > Reflect this fact in README.
> >
> > [1]: b899a850431e ("compiler.h: Remove ACCESS_ONCE()")
> > [2]: 0bb95f80a38f ("Makefile: Globally enable VLA warning")
> > [3]: d56c0d45f0e2 ("proc: decouple proc from VFS with "struct proc_ops"")
> > [4]: https://github.com/herd/herdtools7/commit/e87d7f9287d1
> > ("klitmus: Use WRITE_ONCE and READ_ONCE in place of deprecated ACCESS_ONCE")
> > [5]: https://github.com/herd/herdtools7/commit/a0cbb10d02be
> > ("klitmus: Avoid variable length array")
> > [6]: https://github.com/herd/herdtools7/commit/46b9412d3a58
> > ("klitmus: Linux kernel v5.6.x compat")
> >
> > NOTE: [5] was ahead of herdtools7 7.53, which did not make an
> > official release. Code generated by klitmus7 without [5] can still be
> > built targeting Linux 4.20--5.5 if you don't care VLA warnings.
> >
> > Acked-by: Andrea Parri <[email protected]>
> > Signed-off-by: Akira Yokosawa <[email protected]>
> > Signed-off-by: Paul E. McKenney <[email protected]>
> > ---
> > tools/memory-model/README | 30 ++++++++++++++++++++++++++++--
> > 1 file changed, 28 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/memory-model/README b/tools/memory-model/README
> > index b9c562e..90af203 100644
> > --- a/tools/memory-model/README
> > +++ b/tools/memory-model/README
> > @@ -28,8 +28,34 @@ downloaded separately:
> > See "herdtools7/INSTALL.md" for installation instructions.
> >
> > Note that although these tools usually provide backwards compatibility,
> > -this is not absolutely guaranteed. Therefore, if a later version does
> > -not work, please try using the exact version called out above.
> > +this is not absolutely guaranteed.
> > +
> > +For example, a future version of herd7 might not work with the model
> > +in this release. A compatible model will likely be made available in
> > +a later release of Linux kernel.
> > +
> > +If you absolutely need to run the model in this particular release,
> > +please try using the exact version called out above.
> > +
> > +klitmus7 is independent of the model provided here. It has its own
> > +dependency on a target kernel release where converted code is built
> > +and executed. Any change in kernel APIs essential to klitmus7 will
> > +necessitate an upgrade of klitmus7.
> > +
> > +If you find any compatibility issues in klitmus7, please inform the
> > +memory model maintainers.
> > +
> > +klitmus7 Compatibility Table
> > +----------------------------
> > +
> > + ============ ==========
> > + target Linux herdtools7
> > + ------------ ----------
> > + -- 4.18 7.48 --
> > + 4.15 -- 4.19 7.49 --
> > + 4.20 -- 5.5 7.54 --
> > + 5.6 -- HEAD
> > + ============ ==========
>
> Paul,
>
> I was planning to send an update on this one.
> herdtoolds7 7.56 will be released later this week (now tagged 7.56-rc1).
>
> Andrea tested klitmus7 7.56-rc1 against Linux 5.7 and 5.8-rc1.
> I tested it against Linux 5.7.4.
> klitmus7 worked fine in all these test.
>
> So I think we can safely update the bottom row of the table as:
>
> > + 5.6 -- 7.56 --
>
> Can you amend this one directly?
> Or do you want me to send a follow-up patch?

A follow-up patch is probably best. This can't be the only place that
must change? Or maybe we set this up better than I remember? ;-)

Thanx, Paul

2020-06-23 22:06:48

by Akira Yokosawa

[permalink] [raw]
Subject: [PATCH 1/2] tools/memory-model/README: Mention herdtools7 7.56 in compatibility table

From 89f96cba0db5643b1d22a0fe740f4c5cac788b29 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Wed, 24 Jun 2020 06:56:43 +0900
Subject: [PATCH 1/2] tools/memory-model/README: Mention herdtools7 7.56 in compatibility table

herdtools7 7.56 is going to be released in the week of 22 Jun 2020.
Mention the exact version in the compatibility table.

Signed-off-by: Akira Yokosawa <[email protected]>
---
tools/memory-model/README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/memory-model/README b/tools/memory-model/README
index 90af203c3cf1..ecb7385376bf 100644
--- a/tools/memory-model/README
+++ b/tools/memory-model/README
@@ -54,7 +54,7 @@ klitmus7 Compatibility Table
-- 4.18 7.48 --
4.15 -- 4.19 7.49 --
4.20 -- 5.5 7.54 --
- 5.6 -- HEAD
+ 5.6 -- 7.56 --
============ ==========


--
2.17.1


2020-06-23 22:12:24

by Akira Yokosawa

[permalink] [raw]
Subject: [PATCH 2/2] Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test

From f808c371075d2f92b955da1a83ecb3828db1972e Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Wed, 24 Jun 2020 06:59:26 +0900
Subject: [PATCH 2/2] Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test

herdtools 7.56 has enhanced herd7's C parser so that the "(void)expr"
construct in Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus is
accepted.

This is independent of LKMM's cat model, so mention the required
version in the header of the litmus test and its entry in README.

CC: Boqun Feng <[email protected]>
Reported-by: Andrea Parri <[email protected]>
Signed-off-by: Akira Yokosawa <[email protected]>
---
Documentation/litmus-tests/README | 1 +
.../atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus | 1 +
2 files changed, 2 insertions(+)

diff --git a/Documentation/litmus-tests/README b/Documentation/litmus-tests/README
index b79e640214b9..7f5c6c3ed6c3 100644
--- a/Documentation/litmus-tests/README
+++ b/Documentation/litmus-tests/README
@@ -19,6 +19,7 @@ Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus

Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
Test that atomic_set() cannot break the atomicity of atomic RMWs.
+ NOTE: Require herd7 7.56 or later which supports "(void)expr".


RCU (/rcu directory)
diff --git a/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus b/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
index 49385314d911..ffd4d3e79c4a 100644
--- a/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
+++ b/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
@@ -4,6 +4,7 @@ C Atomic-RMW-ops-are-atomic-WRT-atomic_set
* Result: Never
*
* Test that atomic_set() cannot break the atomicity of atomic RMWs.
+ * NOTE: This requires herd7 7.56 or later which supports "(void)expr".
*)

{
--
2.17.1


2020-06-23 22:58:26

by Andrea Parri

[permalink] [raw]
Subject: Re: [PATCH 1/2] tools/memory-model/README: Mention herdtools7 7.56 in compatibility table

On Wed, Jun 24, 2020 at 07:06:02AM +0900, Akira Yokosawa wrote:
> From 89f96cba0db5643b1d22a0fe740f4c5cac788b29 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <[email protected]>
> Date: Wed, 24 Jun 2020 06:56:43 +0900
> Subject: [PATCH 1/2] tools/memory-model/README: Mention herdtools7 7.56 in compatibility table
>
> herdtools7 7.56 is going to be released in the week of 22 Jun 2020.
> Mention the exact version in the compatibility table.
>
> Signed-off-by: Akira Yokosawa <[email protected]>

Acked-by: Andrea Parri <[email protected]>

Andrea


> ---
> tools/memory-model/README | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/memory-model/README b/tools/memory-model/README
> index 90af203c3cf1..ecb7385376bf 100644
> --- a/tools/memory-model/README
> +++ b/tools/memory-model/README
> @@ -54,7 +54,7 @@ klitmus7 Compatibility Table
> -- 4.18 7.48 --
> 4.15 -- 4.19 7.49 --
> 4.20 -- 5.5 7.54 --
> - 5.6 -- HEAD
> + 5.6 -- 7.56 --
> ============ ==========
>
>
> --
> 2.17.1
>
>

2020-06-23 23:27:32

by Andrea Parri

[permalink] [raw]
Subject: Re: [PATCH 2/2] Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test

On Wed, Jun 24, 2020 at 07:09:01AM +0900, Akira Yokosawa wrote:
> From f808c371075d2f92b955da1a83ecb3828db1972e Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <[email protected]>
> Date: Wed, 24 Jun 2020 06:59:26 +0900
> Subject: [PATCH 2/2] Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test
>
> herdtools 7.56 has enhanced herd7's C parser so that the "(void)expr"
> construct in Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus is
> accepted.
>
> This is independent of LKMM's cat model, so mention the required
> version in the header of the litmus test and its entry in README.
>
> CC: Boqun Feng <[email protected]>
> Reported-by: Andrea Parri <[email protected]>
> Signed-off-by: Akira Yokosawa <[email protected]>

Frankly, I was hoping that we could simply bump the herd7 version in
tools/memory-model/README; I understand your point, but I admit that
I haven't being playing with 7.52 for a while now...

Acked-by: Andrea Parri <[email protected]>

Andrea


> ---
> Documentation/litmus-tests/README | 1 +
> .../atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/Documentation/litmus-tests/README b/Documentation/litmus-tests/README
> index b79e640214b9..7f5c6c3ed6c3 100644
> --- a/Documentation/litmus-tests/README
> +++ b/Documentation/litmus-tests/README
> @@ -19,6 +19,7 @@ Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus
>
> Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
> Test that atomic_set() cannot break the atomicity of atomic RMWs.
> + NOTE: Require herd7 7.56 or later which supports "(void)expr".
>
>
> RCU (/rcu directory)
> diff --git a/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus b/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
> index 49385314d911..ffd4d3e79c4a 100644
> --- a/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
> +++ b/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
> @@ -4,6 +4,7 @@ C Atomic-RMW-ops-are-atomic-WRT-atomic_set
> * Result: Never
> *
> * Test that atomic_set() cannot break the atomicity of atomic RMWs.
> + * NOTE: This requires herd7 7.56 or later which supports "(void)expr".
> *)
>
> {
> --
> 2.17.1
>
>

2020-06-24 04:08:27

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH 2/2] Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test

On Wed, Jun 24, 2020 at 01:24:25AM +0200, Andrea Parri wrote:
> On Wed, Jun 24, 2020 at 07:09:01AM +0900, Akira Yokosawa wrote:
> > From f808c371075d2f92b955da1a83ecb3828db1972e Mon Sep 17 00:00:00 2001
> > From: Akira Yokosawa <[email protected]>
> > Date: Wed, 24 Jun 2020 06:59:26 +0900
> > Subject: [PATCH 2/2] Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test
> >
> > herdtools 7.56 has enhanced herd7's C parser so that the "(void)expr"
> > construct in Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus is
> > accepted.
> >
> > This is independent of LKMM's cat model, so mention the required
> > version in the header of the litmus test and its entry in README.
> >
> > CC: Boqun Feng <[email protected]>
> > Reported-by: Andrea Parri <[email protected]>
> > Signed-off-by: Akira Yokosawa <[email protected]>
>
> Frankly, I was hoping that we could simply bump the herd7 version in
> tools/memory-model/README; I understand your point, but I admit that
> I haven't being playing with 7.52 for a while now...

Maybe in a few years it will no longer be relevant, and could then
be removed?

> Acked-by: Andrea Parri <[email protected]>

I queued both, thank you both!

Thanx, Paul

> Andrea
>
>
> > ---
> > Documentation/litmus-tests/README | 1 +
> > .../atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus | 1 +
> > 2 files changed, 2 insertions(+)
> >
> > diff --git a/Documentation/litmus-tests/README b/Documentation/litmus-tests/README
> > index b79e640214b9..7f5c6c3ed6c3 100644
> > --- a/Documentation/litmus-tests/README
> > +++ b/Documentation/litmus-tests/README
> > @@ -19,6 +19,7 @@ Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus
> >
> > Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
> > Test that atomic_set() cannot break the atomicity of atomic RMWs.
> > + NOTE: Require herd7 7.56 or later which supports "(void)expr".
> >
> >
> > RCU (/rcu directory)
> > diff --git a/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus b/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
> > index 49385314d911..ffd4d3e79c4a 100644
> > --- a/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
> > +++ b/Documentation/litmus-tests/atomic/Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
> > @@ -4,6 +4,7 @@ C Atomic-RMW-ops-are-atomic-WRT-atomic_set
> > * Result: Never
> > *
> > * Test that atomic_set() cannot break the atomicity of atomic RMWs.
> > + * NOTE: This requires herd7 7.56 or later which supports "(void)expr".
> > *)
> >
> > {
> > --
> > 2.17.1
> >
> >