linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: Will Deacon <will.deacon@arm.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	Anton Blanchard <anton@samba.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and update documentation
Date: Mon, 19 Oct 2015 12:23:24 +0200	[thread overview]
Message-ID: <20151019102324.GO3816@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20151019011718.GB924@fixme-laptop.cn.ibm.com>

On Mon, Oct 19, 2015 at 09:17:18AM +0800, Boqun Feng wrote:
> This is confusing me right now. ;-)
> 
> Let's use a simple example for only one primitive, as I understand it,
> if we say a primitive A is "fully ordered", we actually mean:
> 
> 1.	The memory operations preceding(in program order) A can't be
> 	reordered after the memory operations following(in PO) A.
> 
> and
> 
> 2.	The memory operation(s) in A can't be reordered before the
> 	memory operations preceding(in PO) A and after the memory
> 	operations following(in PO) A.
> 
> If we say A is a "full barrier", we actually means:
> 
> 1.	The memory operations preceding(in program order) A can't be
> 	reordered after the memory operations following(in PO) A.
> 
> and
> 
> 2.	The memory ordering guarantee in #1 is visible globally.
> 
> Is that correct? Or "full barrier" is more strong than I understand,
> i.e. there is a third property of "full barrier":
> 
> 3.	The memory operation(s) in A can't be reordered before the
> 	memory operations preceding(in PO) A and after the memory
> 	operations following(in PO) A.
> 
> IOW, is "full barrier" a more strong version of "fully ordered" or not?

Yes, that was how I used it.

Now of course; the big question is do we want to promote this usage or
come up with a different set of words describing this stuff.

I think separating the ordering from the transitivity is useful, for we
can then talk about and specify them independently.

That is, we can say:

	LOAD-ACQUIRE: orders LOAD->{LOAD,STORE}
	              weak transitivity (RCpc)

	MB: orders {LOAD,STORE}->{LOAD,STORE} (fully ordered)
	    strong transitivity (RCsc)

etc..

Also, in the above I used weak and strong transitivity, but that too is
of course up for grabs.

  parent reply	other threads:[~2015-10-19 10:23 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 10:59 [PATCH v2] barriers: introduce smp_mb__release_acquire and update documentation Will Deacon
2015-10-07 11:19 ` Peter Zijlstra
2015-10-07 13:23   ` Will Deacon
2015-10-07 13:23     ` Will Deacon
2015-10-07 14:53     ` Peter Zijlstra
2015-10-07 15:25     ` Paul E. McKenney
2015-10-08  3:50       ` Michael Ellerman
2015-10-08  3:50         ` Michael Ellerman
2015-10-08 11:16         ` Peter Zijlstra
2015-10-08 12:59           ` Will Deacon
2015-10-08 22:17             ` Paul E. McKenney
2015-10-09  9:51               ` Will Deacon
2015-10-09  9:51                 ` Will Deacon
2015-10-09 11:25                 ` Peter Zijlstra
2015-10-09 11:25                   ` Peter Zijlstra
2015-10-09 17:44                   ` Paul E. McKenney
2015-10-09 17:44                     ` Paul E. McKenney
2015-10-09 17:43                 ` Paul E. McKenney
2015-10-09 18:33                   ` Will Deacon
2015-10-12 23:30                     ` Paul E. McKenney
2015-10-20 14:20                       ` Boqun Feng
2015-10-08 21:44           ` Paul E. McKenney
2015-10-09  7:29             ` Peter Zijlstra
2015-10-09  8:31             ` Peter Zijlstra
2015-10-09  9:40               ` Will Deacon
2015-10-09  9:40                 ` Will Deacon
2015-10-09 11:02                 ` Peter Zijlstra
2015-10-09 12:41                   ` Will Deacon
2015-10-09 11:12                 ` Peter Zijlstra
2015-10-09 12:51                   ` Will Deacon
2015-10-09 13:06                     ` Peter Zijlstra
2015-10-09 11:13                 ` Peter Zijlstra
2015-10-09 17:21                 ` Paul E. McKenney
2015-10-19  1:17                 ` Boqun Feng
2015-10-19  1:17                   ` Boqun Feng
2015-10-19 10:23                   ` Peter Zijlstra [this message]
2015-10-19 10:23                     ` Peter Zijlstra
2015-10-20  7:35                     ` Boqun Feng
2015-10-20  7:35                       ` Boqun Feng
2015-10-20 23:34                   ` Paul E. McKenney
2015-10-21  8:24                     ` Peter Zijlstra
2015-10-21 19:29                       ` Paul E. McKenney
2015-10-21 19:36                         ` Peter Zijlstra
2015-10-21 19:36                           ` Peter Zijlstra
2015-10-21 19:56                           ` Paul E. McKenney
2015-10-21 16:04                     ` David Laight
2015-10-21 16:04                       ` David Laight
2015-10-21 19:34                       ` 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=20151019102324.GO3816@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=boqun.feng@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --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;
as well as URLs for NNTP newsgroup(s).