linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Oberhauser <jonas.oberhauser@huaweicloud.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: paulmck@kernel.org, parri.andrea@gmail.com, 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, viktor@mpi-sws.org
Subject: Re: [PATCH] tools/memory-model: Make ppo a subrelation of po
Date: Mon, 23 Jan 2023 19:25:48 +0100	[thread overview]
Message-ID: <1180fe22-5e1d-ec8b-8012-b6578b1ca7c0@huaweicloud.com> (raw)
In-Reply-To: <Y8i1QNjnZwim5uMq@rowland.harvard.edu>

Alright, after some synchronization in the other parts of this thread I 
am beginning to prepare the next iteration of the patch.

On 1/19/2023 4:13 AM, Alan Stern wrote:
> On Wed, Jan 18, 2023 at 10:38:11PM +0100, Jonas Oberhauser wrote:
>>
>> On 1/18/2023 8:52 PM, Alan Stern wrote:
>>> On Tue, Jan 17, 2023 at 08:31:59PM +0100, Jonas Oberhauser wrote:
>>>> -	([M] ; po? ; [LKW] ; fencerel(After-spinlock) ; [M]) |
>>>> -	([M] ; po ; [UL] ; (co | po) ; [LKW] ;
>>>> -		fencerel(After-unlock-lock) ; [M])
>>>> +	([M] ; po? ; [LKW] ; fencerel(After-spinlock) ; [M])
>>> Shouldn't the po case of (co | po) remain intact here?
>> You can leave it here, but it is already covered by two other parts: the
>> ordering given through ppo/hb is covered by the po-unlock-lock-po & int in
>> ppo, and the ordering given through pb is covered by its inclusion in
>> strong-order.
> What about the ordering given through
> A-cumul(strong-fence)/cumul-fence/prop/hb?  I suppose that might be
> superseded by pb as well, but it seems odd not to have it in hb.

How should we resolve this?
My current favorite (compromise :D) solution would be to
1. still eliminate both po and co cases from first definition of 
strong-fence which is used in ppo,
2. define a relation equal to the strong-order in this patch (with 
po|rf) but call it strong-fence for now (in response to Andrea's valid 
criticism that this patch is doing maybe more than just fix ppo)
3. use the extended strong-fence in the definition of cumul-fence and pb

So I'd still simplify po|co to po|rf and drop the po case from ppo, but 
return both of those cases in cumul-fence, to be consistent with the 
idea that cumul-fence should deal with the weak properties of the fences 
including this after-unlock-lock fence.


Would that be acceptable?
jonas


  parent reply	other threads:[~2023-01-23 18:28 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
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 [this message]
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=1180fe22-5e1d-ec8b-8012-b6578b1ca7c0@huaweicloud.com \
    --to=jonas.oberhauser@huaweicloud.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=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=quic_neeraju@quicinc.com \
    --cc=stern@rowland.harvard.edu \
    --cc=urezki@gmail.com \
    --cc=viktor@mpi-sws.org \
    --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).