All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yubin Ruan <ablacktshirt@gmail.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: perfbook@vger.kernel.org
Subject: Re: The weird re-ordering issue of the Alpha arch'
Date: Tue, 9 May 2017 19:08:01 +0800	[thread overview]
Message-ID: <20170509110758.GA5835@HP> (raw)
In-Reply-To: <20170508155052.GA3956@linux.vnet.ibm.com>

On Mon, May 08, 2017 at 08:50:52AM -0700, Paul E. McKenney wrote:
> On Mon, May 08, 2017 at 09:25:28PM +0800, Yubin Ruan wrote:
> > On Mon, May 01, 2017 at 08:58:16AM -0700, Paul E. McKenney wrote:
> > > On Sat, Apr 29, 2017 at 10:26:05PM +0800, Yubin Ruan wrote:
> 
> [ . . . ]
> 
> > Hmm...that reminds me of some words in the perfbook. In the answer of quick quiz 4.17,
> > you state that:
> > 
> >     Memory barrier only enforce ordering among multiple memory references: They do
> >     absolutely nothing to expedite the propogation of data from one part of the system
> >     to another. This leads to a quick rule of thumb:  You do not need memory barriers
> >     unless you are using more than one variable to communicate between multiple threads.
> > 
> > Is that only true for the Alpha processor? I mean, on platforms other than
> > Alpha (e.g x86), memory barrier *do* expedite the propogation of data from one
> > processor/core to other processor/core, even though that is not officially documented.
> 
> Can you point me at any unofficial documentation of this, for example,
> any performance measurements indicating that (for example) the mfence
> instruction speeds up the propagation of previous writes to other CPUs?

Hmm...I might had had too much drug at that moment. What I mean is that, on platform
like x86, memory barrier instructions(e.g sfence) enforce that the order of some memory
references are preserved as the same as in the origin processor by another processors.
However, any speedup is not guaranteed.

Regards,
Yubin

> In the absence of such documentation, all I can really do is change
> "They do absolutely nothing to expedite..." to something like "They are
> not guaranteed to do anything to expedite..."
> 
> 							Thanx, Paul
> 
> > ---
> > Yubin
> > 
> > > > 
> > > > [1]: https://www.cs.umd.edu/~pugh/java/memoryModel/AlphaReordering.html
> > > > 
> > > 
> > 
> 


  reply	other threads:[~2017-05-09 11:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-29 14:26 The weird re-ordering issue of the Alpha arch' Yubin Ruan
2017-05-01 15:58 ` Paul E. McKenney
2017-05-08 13:25   ` Yubin Ruan
2017-05-08 15:50     ` Paul E. McKenney
2017-05-09 11:08       ` Yubin Ruan [this message]
2017-05-09  4:21         ` Paul E. McKenney
2017-05-09 15:58           ` Yubin Ruan
2017-05-09  9:03             ` Junchang Wang
2017-05-09 14:45               ` Yubin Ruan

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=20170509110758.GA5835@HP \
    --to=ablacktshirt@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=perfbook@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.