mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: davidm@hpl.hp.com, davidm@napali.hpl.hp.com,
	engebret@vnet.ibm.com, justincarlson@cmu.edu,
	alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org,
	anton@samba.org, ak@suse.de
Subject: Re: Memory Barrier Definitions
Date: Thu, 9 May 2002 08:00:35 -0700	[thread overview]
Message-ID: <15578.36627.478751.622066@napali.hpl.hp.com> (raw)
In-Reply-To: <20020509173646.5c1b5baa.rusty@rustcorp.com.au>

>>>>> On Thu, 9 May 2002 17:36:46 +1000, Rusty Russell <rusty@rustcorp.com.au> said:

  Rusty> On Wed, 8 May 2002 10:07:08 -0700 David Mosberger
  Rusty> <davidm@napali.hpl.hp.com> wrote:

  >> The ia64 memory ordering model is quite orthogonal to the one
  >> that Linux uses (which is based on the Alpha instructions): Linux
  >> distinguishes between read and write memory barriers.  ia64 uses
  >> an acquire/release model instead.  An acquire orders all *later*
  >> memory accesses and a release orders all *earlier* accesses
  >> (regardless of whether they are reads or writes).  Another
  >> difference is that the acquire/release semantics is attached to
  >> load/store instructions, respectively.  This means that in an
  >> ideal world, ia64 would rarely need to use the memory barrier
  >> instruction.

  Rusty> Hmmm... could you explain more?  You're saying that every
  Rusty> load is an "acquire" and every store a "release"?  Or that
  Rusty> they can be flagged that way, but aren't always?

The latter: loads can have "acquire" semantics and stores can have
"release" semantics.  For example, at the assembly level, ld8.acq
would be an 8-byte load with acquire semantics, st8.rel an 8-byte
store with release semantics.  At the C level, acquire/release
semantics is used for all accesses to "volatile" variables.

One way to think of all this is that using .acq/.rel for *all* memory
accesses will give you a memory model that exactly matches that of a
Pentium III.

  Rusty> Does this means that an "acquire" means "all accesses after
  Rusty> this insn (in the code stream) must occur after this insn (in
  Rusty> time)"?

Yes.

  Rusty> Does that only apply to the address that instruction
  Rusty> touched, or all?

No, the address doesn't matter (data dependencies are always honored).

	--david

  parent reply	other threads:[~2002-05-09 15:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-07 19:07 Dave Engebretsen
2002-05-07 19:49 ` Alan Cox
2002-05-07 19:53   ` Dave Engebretsen
2002-05-07 20:27     ` Alan Cox
2002-05-07 21:23       ` Dave Engebretsen
2002-05-07 22:15       ` justincarlson
2002-05-08  2:49         ` Dave Engebretsen
2002-05-08 13:54           ` Justin Carlson
2002-05-08 15:27           ` Dave Engebretsen
2002-05-08 15:49             ` Andi Kleen
2002-05-08 17:07             ` David Mosberger
2002-05-09  7:36               ` Rusty Russell
2002-05-09  8:01                 ` Keith Owens
2002-05-09 15:00                 ` David Mosberger [this message]
2002-05-13  3:26                   ` Rusty Russell
2002-05-13 16:36                     ` David Mosberger
2002-05-13 16:50                       ` Linus Torvalds
2002-05-13 17:53                         ` David Mosberger
2002-05-13 23:28                         ` Rusty Russell
2002-05-07 22:57       ` Anton Blanchard
2002-05-13 18:16         ` Jesse Barnes
2002-05-09 11:33 Manfred Spraul
2002-05-09 19:38 ` Dave Engebretsen

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=15578.36627.478751.622066@napali.hpl.hp.com \
    --to=davidm@napali.hpl.hp.com \
    --cc=ak@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=anton@samba.org \
    --cc=davidm@hpl.hp.com \
    --cc=engebret@vnet.ibm.com \
    --cc=justincarlson@cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®