[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070910205434.GF11801@linux.vnet.ibm.com>
Date: Mon, 10 Sep 2007 13:54:34 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Christoph Lameter <clameter@....com>
Cc: Segher Boessenkool <segher@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>, heiko.carstens@...ibm.com,
horms@...ge.net.au, Stefan Richter <stefanr@...6.in-berlin.de>,
Satyam Sharma <satyam@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>,
ak@...e.de, cfriesen@...tel.com, rpjday@...dspring.com,
Netdev <netdev@...r.kernel.org>, jesper.juhl@...il.com,
linux-arch@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>, zlynx@....org,
schwidefsky@...ibm.com, Chris Snook <csnook@...hat.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Linus Torvalds <torvalds@...ux-foundation.org>,
wensong@...ux-vs.org, wjiang@...ilience.com
Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
On Mon, Sep 10, 2007 at 11:59:29AM -0700, Christoph Lameter wrote:
> On Fri, 17 Aug 2007, Segher Boessenkool wrote:
>
> > "volatile" has nothing to do with reordering. atomic_dec() writes
> > to memory, so it _does_ have "volatile semantics", implicitly, as
> > long as the compiler cannot optimise the atomic variable away
> > completely -- any store counts as a side effect.
>
> Stores can be reordered. Only x86 has (mostly) implicit write ordering. So
> no atomic_dec has no volatile semantics and may be reordered on a variety
> of processors. Writes to memory may not follow code order on several
> processors.
The one exception to this being the case where process-level code is
communicating to an interrupt handler running on that same CPU -- on
all CPUs that I am aware of, a given CPU always sees its own writes
in order.
Thanx, Paul
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists