public inbox for lkmm@lists.linux.dev
 help / color / mirror / Atom feed
From: Andrea Parri <parri.andrea@gmail.com>
To: Hernan Ponce de Leon <hernan.poncedeleon@huaweicloud.com>
Cc: puranjay@kernel.org, paulmck@kernel.org, bpf@vger.kernel.org,
	lkmm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: Some observations (results) on BPF acquire and release
Date: Fri, 25 Oct 2024 16:15:51 +0300	[thread overview]
Message-ID: <ZxuZ-wGccb3yhBAD@andrea> (raw)
In-Reply-To: <daa60273-d01a-8fc5-5e26-e8fc9364c1d8@huaweicloud.com>

> > BPF R+release+fence
> > {
> >   0:r2=x; 0:r4=y;
> >   1:r2=y; 1:r4=x; 1:r6=l;
> > }
> >   P0                                 | P1                                         ;
> >   r1 = 1                             | r1 = 2                                     ;
> >   *(u32 *)(r2 + 0) = r1              | *(u32 *)(r2 + 0) = r1                      ;
> >   r3 = 1                             | r5 = atomic_fetch_add((u32 *)(r6 + 0), r5) ;
> >   store_release((u32 *)(r4 + 0), r3) | r3 = *(u32 *)(r4 + 0)                      ;
> > exists ([y]=2 /\ 1:r3=0)
> > 
> > This "exists" condition is not satisfiable according to the BPF model;
> > however, if we adopt the "natural"/intended(?) PowerPC implementations
> > of the synchronization primitives above (aka, with store_release() -->
> > LWSYNC and atomic_fetch_add() --> SYNC ; [...] ), then we see that the
> > condition in question becomes (architecturally) satisfiable on PowerPC
> > (although I'm not aware of actual observations on PowerPC hardware).
> 
> Are the resulting PPC tests available somewhere?

My data go back to the LKMM paper, cf. e.g. the R+pooncerelease+fencembonceonce
entry at https://diy.inria.fr/linux/hard.html#unseen .

  Andrea

  reply	other threads:[~2024-10-25 13:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 17:47 Some observations (results) on BPF acquire and release Andrea Parri
2024-10-24  4:25 ` Paul E. McKenney
2024-10-24 11:13   ` Andrea Parri
2024-10-25 13:56     ` Andrea Parri
2024-11-13 19:25       ` Andrea Parri
2024-11-13 22:59         ` Puranjay Mohan
2024-11-14 14:56           ` Andrea Parri
2024-10-24 11:44 ` Jonas Oberhauser
2024-10-24 12:11   ` Puranjay Mohan
2024-10-24 12:21     ` Jonas Oberhauser
2024-10-24 14:42       ` Paul E. McKenney
2024-10-25  9:32 ` Hernan Ponce de Leon
2024-10-25 13:15   ` Andrea Parri [this message]
2024-10-25 13:28     ` Hernan Ponce de Leon
2024-10-25 13:44       ` Andrea Parri
2024-10-25 13:57         ` Hernan Ponce de Leon
2024-10-25 14:27           ` Andrea Parri
2024-10-25 15:00             ` Hernan Ponce de Leon
2024-10-25 23:26           ` Paul E. McKenney

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=ZxuZ-wGccb3yhBAD@andrea \
    --to=parri.andrea@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=hernan.poncedeleon@huaweicloud.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkmm@lists.linux.dev \
    --cc=paulmck@kernel.org \
    --cc=puranjay@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