lkmm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jonas Oberhauser <jonas.oberhauser@huaweicloud.com>
To: Puranjay Mohan <puranjay@kernel.org>,
	Andrea Parri <parri.andrea@gmail.com>,
	paulmck@kernel.org
Cc: bpf@vger.kernel.org, lkmm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: Some observations (results) on BPF acquire and release
Date: Thu, 24 Oct 2024 14:21:15 +0200	[thread overview]
Message-ID: <ecb585c5-7f56-4249-b525-66d9757a6f2f@huaweicloud.com> (raw)
In-Reply-To: <mb61pr085bt0g.fsf@kernel.org>



Am 10/24/2024 um 2:11 PM schrieb Puranjay Mohan:
> Jonas Oberhauser <jonas.oberhauser@huaweicloud.com> writes:
> 
>> Am 10/23/2024 um 7:47 PM schrieb Andrea Parri:
>>> Hi Puranjay and Paul,
>>>
>>> These remarks show that the proposed BPF formalization of acquire and
>>> release somehow, but substantially, diverged from the corresponding
>>> LKMM formalization.  My guess is that the divergences mentioned above
>>> were not (fully) intentional, or I'm wondering -- why not follow the
>>> latter (the LKMM's) more closely? -  This is probably the first question
>>> I would need to clarify before trying/suggesting modifications to the
>>> present formalizations.  ;-)  Thoughts?
>>>
>>
>> I'm also curious why the formalization (not just in the semantics but
>> also how it is structured) is so completely different from LKMM's.
> 

Thanks Puranjay for your response!


 > BPF memory model is an instruction level memory model

You mean BPF has no optimizing byte code compiler?
Is it guaranteed to stay this way?
WASM does JIT optimizations as far as I know, which would bring back a 
lot of the complexity of software models like LKMM.

 > much simpler than LKMM

LKMM has a simple core, roughly like this:

ppo = ... (* all the ppo related rules that are relevant to you -- some 
fences don't matter and you can just remove them *)
prop = (coe | fre) (* remove reflexive closure *) ; ...
hb = [Marked] ; (ppo | rfe | prop & int | prop ; strong-sync) ; [Marked]

acyclic hb
(* ... also add the atomicity & sc-per-loc axioms *)

If you can exclude compiler optimizations, you can remove the Marked bits.


Best wishes,

   jonas


  reply	other threads:[~2024-10-24 12:21 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 [this message]
2024-10-24 14:42       ` Paul E. McKenney
2024-10-25  9:32 ` Hernan Ponce de Leon
2024-10-25 13:15   ` Andrea Parri
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=ecb585c5-7f56-4249-b525-66d9757a6f2f@huaweicloud.com \
    --to=jonas.oberhauser@huaweicloud.com \
    --cc=bpf@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkmm@lists.linux.dev \
    --cc=parri.andrea@gmail.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).