From: David Laight <David.Laight@ACULAB.COM>
To: 'Marco Elver' <elver@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kasan-dev@googlegroups.com" <kasan-dev@googlegroups.com>,
"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
"parri.andrea@gmail.com" <parri.andrea@gmail.com>,
"will@kernel.org" <will@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"boqun.feng@gmail.com" <boqun.feng@gmail.com>,
"npiggin@gmail.com" <npiggin@gmail.com>,
"dhowells@redhat.com" <dhowells@redhat.com>,
"j.alglave@ucl.ac.uk" <j.alglave@ucl.ac.uk>,
"luc.maranget@inria.fr" <luc.maranget@inria.fr>,
"paulmck@kernel.org" <paulmck@kernel.org>,
"akiyks@gmail.com" <akiyks@gmail.com>,
"dlustig@nvidia.com" <dlustig@nvidia.com>,
"joel@joelfernandes.org" <joel@joelfernandes.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>
Subject: RE: [PATCH v2] tools/memory-model/Documentation: Fix "conflict" definition
Date: Mon, 2 Mar 2020 17:44:11 +0000 [thread overview]
Message-ID: <8d5fdc95ed3847508bf0d523f41a5862@AcuMS.aculab.com> (raw)
In-Reply-To: <20200302141819.40270-1-elver@google.com>
From: Marco Elver
> Sent: 02 March 2020 14:18
>
> The definition of "conflict" should not include the type of access nor
> whether the accesses are concurrent or not, which this patch addresses.
> The definition of "data race" remains unchanged.
>
> The definition of "conflict" as we know it and is cited by various
> papers on memory consistency models appeared in [1]: "Two accesses to
> the same variable conflict if at least one is a write; two operations
> conflict if they execute conflicting accesses."
I'm pretty sure that Linux requires that the underlying memory
subsystem remove any possible 'conflicts' by serialising the
requests (in an arbitrary order).
So 'conflicts' are never relevant.
There are memory subsystems where conflicts MUST be avoided.
For instance the fpga I use have some dual-ported memory.
Concurrent accesses on the two ports for the same address
must (usually) be avoided if one is a write.
Two writes will generate corrupt memory.
A concurrent write+read will generate a garbage read.
In the special case where the two ports use the same clock
it is possible to force the read to be 'old data' but that
constrains the timings.
On such systems the code must avoid conflicting cycles.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2020-03-02 17:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 14:18 [PATCH v2] tools/memory-model/Documentation: Fix "conflict" definition Marco Elver
2020-03-02 16:47 ` Alan Stern
2020-03-02 17:26 ` Marco Elver
2020-03-02 17:44 ` David Laight [this message]
2020-03-02 18:28 ` Paul E. McKenney
2020-03-02 18:33 ` Marco Elver
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=8d5fdc95ed3847508bf0d523f41a5862@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=akiyks@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=dhowells@redhat.com \
--cc=dlustig@nvidia.com \
--cc=elver@google.com \
--cc=j.alglave@ucl.ac.uk \
--cc=joel@joelfernandes.org \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.maranget@inria.fr \
--cc=npiggin@gmail.com \
--cc=parri.andrea@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