linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Parri <parri.andrea@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Jonas Oberhauser <jonas.oberhauser@huaweicloud.com>,
	paulmck@kernel.org, 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,
	dlustig@nvidia.com, joel@joelfernandes.org, urezki@gmail.com,
	quic_neeraju@quicinc.com, frederic@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools/memory-model: Make ppo a subrelation of po
Date: Wed, 18 Jan 2023 21:22:35 +0100	[thread overview]
Message-ID: <Y8hS5iq2+vbcYlkT@andrea> (raw)
In-Reply-To: <Y8hN7vs/w8LhMasT@rowland.harvard.edu>

> It would be nice here to have a separate term for a potentially 
> cross-CPU fence.
> 
> In fact, why don't we make a concerted effort to straighten out the 
> terminology more fully?  Now seems like a good time to do it.
> 
> To begin with, let's be more careful about the difference between an 
> order-inducing object (an event or pair of events) and the relation of 
> being ordered by such an object.  For instance, given:
> 
> 	A: WRITE_ONCE(x, 1);
> 	B: smp_mb();
> 	C: r1 = READ_ONCE(y);
> 
> then B is an order-inducing object (a memory barrier), and (A,C) is a 
> pair of events ordered by that object.  In general, an order is related 
> to an order-inducing object by:
> 
> 	order = po ; [order-inducing object] ; po
> 
> with suitable modifications for things like smp_store_release where 
> one of the events being ordered _is_ the order-inducing event.
> 
> So for example, we could consistently refer to all order-inducing events 
> as either barriers or fences, and all order-reflecting relations as 
> orders.  This would require widespread changes to the .cat file, but I 
> think it would be worthwhile.
> 
> (Treating "barrier" and "fence" as synonyms seems to be too deeply 
> entrenched to try and fight against.)
> 
> Once that is straightened out, we can distinguish between fences or 
> orders that are weak vs. strong.  And then we can divide up strong 
> fences/orders into single-CPU vs. cross-CPU, if we want to.
> 
> How does that sound?

Sounds like a lot of work, renaming and review, for no clear win
to me.  :-)  But hey, if other are into it...

  Andrea

  reply	other threads:[~2023-01-18 20:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 19:31 [PATCH] tools/memory-model: Make ppo a subrelation of po Jonas Oberhauser
2023-01-17 23:45 ` Boqun Feng
2023-01-18 12:13   ` Jonas Oberhauser
2023-01-18 19:52 ` Alan Stern
2023-01-18 20:22   ` Andrea Parri [this message]
2023-01-18 21:38   ` Jonas Oberhauser
2023-01-19  3:13     ` Alan Stern
2023-01-19 15:05       ` Jonas Oberhauser
2023-01-19 20:06         ` Alan Stern
2023-01-20 11:12           ` Jonas Oberhauser
2023-01-20 16:32             ` Alan Stern
2023-01-21  0:41               ` Jonas Oberhauser
2023-01-21 20:56                 ` Alan Stern
2023-01-23 13:59                   ` Jonas Oberhauser
2023-01-23 17:28                     ` Alan Stern
2023-01-23 19:33                       ` Jonas Oberhauser
2023-01-23 21:10                         ` Alan Stern
2023-01-24 13:14                           ` Jonas Oberhauser
2023-01-24 17:14                             ` Alan Stern
2023-01-24 20:23                               ` Jonas Oberhauser
2023-01-25  2:57                                 ` Alan Stern
2023-01-25 13:06                                   ` Jonas Oberhauser
2023-01-25 15:56                                     ` Alan Stern
2023-01-23 18:25       ` Jonas Oberhauser
2023-01-23 20:25         ` Alan Stern
2023-01-24 12:54           ` Jonas Oberhauser
2023-01-24 16:03             ` Alan Stern
2023-01-18 21:30 ` Andrea Parri
2023-01-18 22:02   ` Jonas Oberhauser

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=Y8hS5iq2+vbcYlkT@andrea \
    --to=parri.andrea@gmail.com \
    --cc=akiyks@gmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dlustig@nvidia.com \
    --cc=frederic@kernel.org \
    --cc=j.alglave@ucl.ac.uk \
    --cc=joel@joelfernandes.org \
    --cc=jonas.oberhauser@huaweicloud.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.maranget@inria.fr \
    --cc=npiggin@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=quic_neeraju@quicinc.com \
    --cc=stern@rowland.harvard.edu \
    --cc=urezki@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).