From: Boqun Feng <boqun.feng@gmail.com>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
linux-doc@vger.kernel.org
Cc: "Paul E . McKenney " <paulmck@kernel.org>,
Dan Lustig <dlustig@nvidia.com>, Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Peter Anvin <hpa@zytor.com>,
Andrea Parri <parri.andrea@gmail.com>,
Ingo Molnar <mingo@kernel.org>,
Vince Weaver <vincent.weaver@maine.edu>,
Thomas Gleixner <tglx@linutronix.de>,
Jiri Olsa <jolsa@redhat.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Stephane Eranian <eranian@google.com>,
palmer@dabbelt.com, paul.walmsley@sifive.com, mpe@ellerman.id.au,
Jonathan Corbet <corbet@lwn.net>,
Boqun Feng <boqun.feng@gmail.com>
Subject: [RFC v2 0/3] memory model: Make unlock(A)+lock(B) on the same CPU RCtso
Date: Mon, 25 Oct 2021 22:54:13 +0800 [thread overview]
Message-ID: <20211025145416.698183-1-boqun.feng@gmail.com> (raw)
Hi,
Just a new version trying to make forward progress on this ;-)
v1: https://lore.kernel.org/lkml/20210930130823.2103688-1-boqun.feng@gmail.com/
Changes since v1:
* Split the patch into three to help resolve the litmus test
addition discussion.
* Add some explanation in patch #2 on the requirement of tests in
litmus-tests directory.
To summarize the change in memory model, we now guarantee in the
following code:
<memory access M>
spin_unlock(A);
spin_lock(B);
<memory access N>
M is ordered against N unless M is a store and N is a load. More
detailed examples of this guarantee can be found in patch #3.
Architecture maintainers, appreciate it that you can take a look at
patch #3 and rest of whole set to confirm this guarantee works on your
architectures.
Alan, I split the patchset into three patches because I do think we need
some sort of patch #2 so that we can have consensus about whether merge
patch #3 or not. I know you want to keep litmus-tests directory as
simple as possible, but it won't hurt to document the requirement.
Looking forwards to your thoughts ;-)
Suggestion and comments are welcome!
Regards,
Boqun
Boqun Feng (3):
tools/memory-model: Provide extra ordering for unlock+lock pair on the
same CPU
tools/memory-model: doc: Describe the requirement of the litmus-tests
directory
tools/memory-model: litmus: Add two tests for unlock(A)+lock(B)
ordering
.../Documentation/explanation.txt | 44 +++++++++++--------
tools/memory-model/README | 12 +++++
tools/memory-model/linux-kernel.cat | 6 +--
...LB+unlocklockonceonce+poacquireonce.litmus | 33 ++++++++++++++
...unlocklockonceonce+fencermbonceonce.litmus | 33 ++++++++++++++
tools/memory-model/litmus-tests/README | 8 ++++
6 files changed, 114 insertions(+), 22 deletions(-)
create mode 100644 tools/memory-model/litmus-tests/LB+unlocklockonceonce+poacquireonce.litmus
create mode 100644 tools/memory-model/litmus-tests/MP+unlocklockonceonce+fencermbonceonce.litmus
--
2.33.0
next reply other threads:[~2021-10-25 14:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 14:54 Boqun Feng [this message]
2021-10-25 14:54 ` [RFC v2 1/3] tools/memory-model: Provide extra ordering for unlock+lock pair on the same CPU Boqun Feng
2021-10-25 14:54 ` [RFC v2 2/3] tools/memory-model: doc: Describe the requirement of the litmus-tests directory Boqun Feng
2021-10-25 14:54 ` [RFC v2 3/3] tools/memory-model: litmus: Add two tests for unlock(A)+lock(B) ordering Boqun Feng
2021-10-26 7:01 ` Peter Zijlstra
2021-10-28 19:11 ` Paul E. McKenney
2021-10-28 23:51 ` Boqun Feng
2021-10-29 14:34 ` Alan Stern
2021-10-29 15:01 ` Paul E. McKenney
2021-10-26 6:59 ` [RFC v2 0/3] memory model: Make unlock(A)+lock(B) on the same CPU RCtso Peter Zijlstra
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=20211025145416.698183-1-boqun.feng@gmail.com \
--to=boqun.feng@gmail.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=corbet@lwn.net \
--cc=dlustig@nvidia.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=palmer@dabbelt.com \
--cc=parri.andrea@gmail.com \
--cc=paul.walmsley@sifive.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.weaver@maine.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