public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Parri <andrea.parri@amarulasolutions.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	Andrea Parri <parri.andrea@gmail.com>,
	Will Deacon <will.deacon@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	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>
Subject: Re: [PATCH] memory-model: fix cheat sheet typo
Date: Thu, 12 Apr 2018 13:21:55 +0200	[thread overview]
Message-ID: <20180412112155.GA9154@andrea> (raw)
In-Reply-To: <eda463d8-aa4e-2e6b-9d1d-41a5a4eaa3a7@redhat.com>

On Thu, Apr 12, 2018 at 12:18:13PM +0200, Paolo Bonzini wrote:
> On 12/04/2018 11:23, Andrea Parri wrote:
> >>
> >> - smp_store_mb() is missing
> > 
> > Good point. In fact, we could add this to the model as well:
> > following Peter's remark/the generic implementation,
> 
> Good idea.  smp_store_mb() can save some clock cycles in the relatively
> common idiom
> 
> 	write a				write b
> 	read b				read a
> 	if (b)				if (a)
> 	  wake 'em			  we've been woken
> 
> > Yeah, those 'Ordering is cumulative', 'Ordering propagates' could
> > mean different things to different readers... IMO, we may even omit
> > such information; this doc. does not certainly aim for completeness,
> > after all. OTOH, we ought to refrain from making this doc. an excuse
> > to transform (what it is really) high-school maths into some black
> > magic.
> FWIW, what I miss in explanation.txt (and to some extent in the paper)
> is a clear pointer to litmus tests that rely on cumulativity and
> propagation.  In the meanwhile I'll send some patches.  Thanks for the
> feedback, as it also helps validating my understanding of the model.

The litmus test that first comes to my mind when I think of cumulativity
(at least, 'cumulativity' as intended in LKMM) is:

   WRC+pooncerelease+rmbonceonce+Once.litmus

for 'propagation', I could mention:

   IRIW+mbonceonces+OnceOnce.litmus

(both tests are availabe in tools/memory-model/litmus-tests/). It would
be a nice to mention these properties in the test descriptions, indeed.

You might find it useful to also visualize the 'valid' executions (with
the main events/relations) associated to each of these tests; for this,

   $ herd7 -conf linux-kernel.cfg litmus-tests/your-test.litmus \
	-show all -gv

(assuming you have 'gv' installed).

  Andrea


> 
> Thanks,
> 
> Paolo

  reply	other threads:[~2018-04-12 11:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 16:50 [PATCH] memory-model: fix cheat sheet typo Paolo Bonzini
2018-04-09 18:42 ` Paul E. McKenney
2018-04-10 20:32   ` Paul E. McKenney
2018-04-10 21:10     ` Paolo Bonzini
2018-04-10 21:34       ` Paul E. McKenney
2018-04-11 11:15         ` Paolo Bonzini
2018-04-11 16:19           ` Paul E. McKenney
2018-04-11 16:31             ` Peter Zijlstra
2018-04-11 17:06               ` Paolo Bonzini
2018-04-12 12:52                 ` Boqun Feng
2018-04-12  9:23           ` Andrea Parri
2018-04-12 10:18             ` Paolo Bonzini
2018-04-12 11:21               ` Andrea Parri [this message]
2018-04-12 21:18                 ` Paul E. McKenney
2018-04-13  9:54                   ` Andrea Parri

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=20180412112155.GA9154@andrea \
    --to=andrea.parri@amarulasolutions.com \
    --cc=akiyks@gmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=j.alglave@ucl.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.maranget@inria.fr \
    --cc=npiggin@gmail.com \
    --cc=parri.andrea@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.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