public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Parri <andrea.parri@amarulasolutions.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	Will Deacon <will.deacon@arm.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	David Howells <dhowells@redhat.com>,
	Jade Alglave <j.alglave@ucl.ac.uk>,
	Luc Maranget <luc.maranget@inria.fr>,
	Akira Yokosawa <akiyks@gmail.com>,
	Daniel Lustig <dlustig@nvidia.com>
Subject: Re: [RFC PATCH] tools/memory-model: Remove (dep ; rfi) from ppo
Date: Wed, 20 Feb 2019 14:14:56 +0100	[thread overview]
Message-ID: <20190220131456.GA3215@andrea> (raw)
In-Reply-To: <20190220092604.GD32494@hirez.programming.kicks-ass.net>

On Wed, Feb 20, 2019 at 10:26:04AM +0100, Peter Zijlstra wrote:
> On Tue, Feb 19, 2019 at 06:01:17PM -0800, Paul E. McKenney wrote:
> > On Tue, Feb 19, 2019 at 11:57:37PM +0100, Andrea Parri wrote:
> > > Remove this subtle (and, AFAICT, unused) ordering: we can add it back,
> > > if necessary, but let us not encourage people to rely on this thing.
> > > 
> > > For example, the following "exists" clause can be satisfied with this
> > > change:
> > > 
> > > C dep-rfi
> > > 
> > > { }
> > > 
> > > P0(int *x, int *y)
> > > {
> > > 	WRITE_ONCE(*x, 1);
> > > 	smp_store_release(y, 1);
> > > }
> > > 
> > > P1(int *x, int *y, int *z)
> > > {
> > > 	int r0;
> > > 	int r1;
> > > 	int r2;
> > > 
> > > 	r0 = READ_ONCE(*y);
> > > 	WRITE_ONCE(*z, r0);
> > > 	r1 = smp_load_acquire(z);
> > > 	r2 = READ_ONCE(*x);
> > > }
> > > 
> > > exists (1:r0=1 /\ 1:r2=0)
> > 
> > Any objections?  If I don't hear any in a couple days, I will apply this.
> 
> IIUC you cannot build hardware that allows the above, so why would we
> allow it?

The change/simplification was mainly intended as precautionary measure
(hence the "we can add it back, ..."): I do agree that it shouldn't be
possible to realize the above state; OTOH, you really don't need to be
too "creative" to imagine possible mis-uses/mis-interpretations of the
(dep ; rfi) term ("forget" ONCEs, trick herd7 with "false dependencies"
or simply wrongly assume that control dependencies are part this "dep",
what else? ...).  So, no, I'm not that fond to this term; why should I
be?  or you are simply suggesting to expand the changelog?

I should probably also remark that "such a simplification" wouldn't be
a first time for the LKMM and, in fact, for the ppo term itself:

  https://mirrors.edge.kernel.org/pub/linux/kernel/people/paulmck/LWNLinuxMM/WeakModel.html#Preserved%20Program%20Order

  Andrea

  parent reply	other threads:[~2019-02-20 13:14 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 22:57 [RFC PATCH] tools/memory-model: Remove (dep ; rfi) from ppo Andrea Parri
2019-02-19 22:57 ` Andrea Parri
2019-02-20  2:01 ` Paul E. McKenney
2019-02-20  2:01   ` Paul E. McKenney
2019-02-20  9:26   ` Peter Zijlstra
2019-02-20  9:26     ` Peter Zijlstra
2019-02-20  9:57     ` Will Deacon
2019-02-20  9:57       ` Will Deacon
2019-02-20 13:17       ` Andrea Parri
2019-02-20 13:17         ` Andrea Parri
2019-02-20 13:14     ` Andrea Parri [this message]
2019-02-20 13:14       ` Andrea Parri
2019-02-20 13:27       ` Peter Zijlstra
2019-02-20 13:27         ` Peter Zijlstra
2019-02-22 11:21         ` Andrea Parri
2019-02-22 11:21           ` Andrea Parri
2019-02-22 13:00           ` Peter Zijlstra
2019-02-22 13:00             ` Peter Zijlstra
2019-02-25 17:55             ` Paul E. McKenney
2019-02-25 17:55               ` Paul E. McKenney
2019-02-26  9:21               ` Peter Zijlstra
2019-02-26  9:21                 ` Peter Zijlstra
2019-02-26  9:30               ` Peter Zijlstra
2019-02-26  9:30                 ` Peter Zijlstra
2019-02-26 10:45                 ` Peter Zijlstra
2019-02-26 10:45                   ` Peter Zijlstra
2019-02-26 11:21                   ` Peter Zijlstra
2019-02-26 11:21                     ` Peter Zijlstra
2019-02-26 11:25                     ` Peter Zijlstra
2019-02-26 11:25                       ` Peter Zijlstra
2019-02-26 11:30                       ` Peter Zijlstra
2019-02-26 11:30                         ` Peter Zijlstra
2019-02-26 11:38                         ` Borislav Petkov
2019-02-26 11:38                           ` Borislav Petkov
2019-02-26 13:49                           ` Peter Zijlstra
2019-02-26 13:49                             ` Peter Zijlstra
2019-02-26 14:28                             ` Paul E. McKenney
2019-02-26 14:28                               ` Paul E. McKenney
2019-02-26 14:47                               ` Peter Zijlstra
2019-02-26 14:47                                 ` Peter Zijlstra
2019-02-26 15:39                                 ` Paul E. McKenney
2019-02-26 15:39                                   ` Paul E. McKenney
2019-02-26 14:56                               ` Akira Yokosawa
2019-02-26 14:56                                 ` Akira Yokosawa
2019-02-26 15:04                                 ` Paul E. McKenney
2019-02-26 15:04                                   ` Paul E. McKenney
2019-02-26 15:09                                   ` Akira Yokosawa
2019-02-26 15:09                                     ` Akira Yokosawa
2019-02-26 15:04                               ` Peter Zijlstra
2019-02-26 15:04                                 ` Peter Zijlstra
2019-03-06 15:46                                 ` Akira Yokosawa
2019-03-06 15:46                                   ` Akira Yokosawa
2019-03-06 16:58                                   ` Peter Zijlstra
2019-03-06 16:58                                     ` Peter Zijlstra
2019-03-06 17:26                                     ` Paul E. McKenney
2019-03-06 17:26                                       ` Paul E. McKenney
2019-03-06 17:24                                   ` Paul E. McKenney
2019-03-06 17:24                                     ` Paul E. McKenney
2019-03-02 15:27                             ` Akira Yokosawa
2019-03-02 15:27                               ` Akira Yokosawa
2019-03-04 16:09                               ` Paul E. McKenney
2019-03-04 16:09                                 ` Paul E. McKenney
2019-02-20 13:41       ` Will Deacon
2019-02-20 13:41         ` Will Deacon
2019-02-20 15:30         ` Alan Stern
2019-02-20 15:30           ` Alan Stern
2019-02-20 15:22 ` Alan Stern
2019-02-20 15:22   ` Alan Stern

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=20190220131456.GA3215@andrea \
    --to=andrea.parri@amarulasolutions.com \
    --cc=akiyks@gmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dlustig@nvidia.com \
    --cc=j.alglave@ucl.ac.uk \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.maranget@inria.fr \
    --cc=npiggin@gmail.com \
    --cc=paulmck@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=stern@rowland.harvard.edu \
    --cc=will.deacon@arm.com \
    /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