From: Andrea Parri <parri.andrea@gmail.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
kernel-team@meta.com, mingo@kernel.org,
stern@rowland.harvard.edu, will@kernel.org, peterz@infradead.org,
boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com,
j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com,
Jonas Oberhauser <jonas.oberhauser@huaweicloud.com>
Subject: Re: [PATCH memory-model 1/8] tools/memory-model: Update some warning labels
Date: Wed, 22 Mar 2023 01:51:22 +0100 [thread overview]
Message-ID: <ZBpRCiHuC6LPkFOc@andrea> (raw)
In-Reply-To: <20230321010246.50960-1-paulmck@kernel.org>
On Mon, Mar 20, 2023 at 06:02:39PM -0700, Paul E. McKenney wrote:
> From: Alan Stern <stern@rowland.harvard.edu>
>
> Some of the warning labels used in the LKMM are unfortunately
> ambiguous. In particular, the same warning is used for both an
> unmatched rcu_read_lock() call and for an unmatched rcu_read_unlock()
> call. Likewise for the srcu_* equivalents. Also, the warning about
> passing a wrong value to srcu_read_unlock() -- i.e., a value different
> from the one returned by the matching srcu_read_lock() -- talks about
> bad nesting rather than non-matching values.
>
> Let's update the warning labels to make their meanings more clear.
>
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> Reviewed-by: Jonas Oberhauser <jonas.oberhauser@huaweicloud.com>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Andrea Parri <parri.andrea@gmail.com>
Andrea
> ---
> tools/memory-model/linux-kernel.bell | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/memory-model/linux-kernel.bell b/tools/memory-model/linux-kernel.bell
> index 70a9073dec3e..dc464854d28a 100644
> --- a/tools/memory-model/linux-kernel.bell
> +++ b/tools/memory-model/linux-kernel.bell
> @@ -53,8 +53,8 @@ let rcu-rscs = let rec
> in matched
>
> (* Validate nesting *)
> -flag ~empty Rcu-lock \ domain(rcu-rscs) as unbalanced-rcu-locking
> -flag ~empty Rcu-unlock \ range(rcu-rscs) as unbalanced-rcu-locking
> +flag ~empty Rcu-lock \ domain(rcu-rscs) as unmatched-rcu-lock
> +flag ~empty Rcu-unlock \ range(rcu-rscs) as unmatched-rcu-unlock
>
> (* Compute matching pairs of nested Srcu-lock and Srcu-unlock *)
> let srcu-rscs = let rec
> @@ -69,14 +69,14 @@ let srcu-rscs = let rec
> in matched
>
> (* Validate nesting *)
> -flag ~empty Srcu-lock \ domain(srcu-rscs) as unbalanced-srcu-locking
> -flag ~empty Srcu-unlock \ range(srcu-rscs) as unbalanced-srcu-locking
> +flag ~empty Srcu-lock \ domain(srcu-rscs) as unmatched-srcu-lock
> +flag ~empty Srcu-unlock \ range(srcu-rscs) as unmatched-srcu-unlock
>
> (* Check for use of synchronize_srcu() inside an RCU critical section *)
> flag ~empty rcu-rscs & (po ; [Sync-srcu] ; po) as invalid-sleep
>
> (* Validate SRCU dynamic match *)
> -flag ~empty different-values(srcu-rscs) as srcu-bad-nesting
> +flag ~empty different-values(srcu-rscs) as srcu-bad-value-match
>
> (* Compute marked and plain memory accesses *)
> let Marked = (~M) | IW | Once | Release | Acquire | domain(rmw) | range(rmw) |
> --
> 2.40.0.rc2
>
next prev parent reply other threads:[~2023-03-22 0:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-21 1:02 [PATCH memory-model 0/8] LKMM updates for v6.4 Paul E. McKenney
2023-03-21 1:02 ` [PATCH memory-model 1/8] tools/memory-model: Update some warning labels Paul E. McKenney
2023-03-22 0:51 ` Andrea Parri [this message]
2023-03-21 1:02 ` [PATCH memory-model 2/8] tools/memory-model: Unify UNLOCK+LOCK pairings to po-unlock-lock-po Paul E. McKenney
2023-03-22 0:59 ` Andrea Parri
2023-03-22 18:06 ` Paul E. McKenney
2023-03-21 1:02 ` [PATCH memory-model 3/8] tools/memory-model: Add smp_mb__after_srcu_read_unlock() Paul E. McKenney
2023-03-21 1:02 ` [PATCH memory-model 4/8] tools/memory-model: Restrict to-r to read-read address dependency Paul E. McKenney
2023-03-22 0:53 ` Andrea Parri
2023-03-21 1:02 ` [PATCH memory-model 5/8] tools/memory-model: Provide exact SRCU semantics Paul E. McKenney
2023-03-22 1:07 ` Andrea Parri
2023-03-22 1:13 ` Alan Stern
2023-03-21 1:02 ` [PATCH memory-model 6/8] tools/memory-model: Make ppo a subrelation of po Paul E. McKenney
2023-03-21 1:02 ` [PATCH memory-model 7/8] tools/memory-model: Add documentation about SRCU read-side critical sections Paul E. McKenney
2023-03-22 1:40 ` Andrea Parri
2023-03-22 2:17 ` Joel Fernandes
2023-03-22 14:30 ` Alan Stern
2023-03-22 18:02 ` Paul E. McKenney
2023-03-21 1:02 ` [PATCH memory-model 8/8] Documentation: litmus-tests: Correct spelling Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZBpRCiHuC6LPkFOc@andrea \
--to=parri.andrea@gmail.com \
--cc=akiyks@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=dhowells@redhat.com \
--cc=j.alglave@ucl.ac.uk \
--cc=jonas.oberhauser@huaweicloud.com \
--cc=kernel-team@meta.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.maranget@inria.fr \
--cc=mingo@kernel.org \
--cc=npiggin@gmail.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox