[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1187376873.2615.2.camel@laptopd505.fenrus.org>
Date: Fri, 17 Aug 2007 11:54:33 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: Chris Friesen <cfriesen@...tel.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Nick Piggin <piggin@...erone.com.au>,
Satyam Sharma <satyam@...radead.org>,
Herbert Xu <herbert@...dor.apana.org.au>,
Paul Mackerras <paulus@...ba.org>,
Christoph Lameter <clameter@....com>,
Chris Snook <csnook@...hat.com>,
Ilpo Jarvinen <ilpo.jarvinen@...sinki.fi>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Stefan Richter <stefanr@...6.in-berlin.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arch@...r.kernel.org, Netdev <netdev@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>, ak@...e.de,
heiko.carstens@...ibm.com, David Miller <davem@...emloft.net>,
schwidefsky@...ibm.com, wensong@...ux-vs.org, horms@...ge.net.au,
wjiang@...ilience.com, zlynx@....org, rpjday@...dspring.com,
jesper.juhl@...il.com, segher@...nel.crashing.org
Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all
architectures
On Fri, 2007-08-17 at 12:50 -0600, Chris Friesen wrote:
> Linus Torvalds wrote:
>
> > - in other words, the *only* possible meaning for "volatile" is a purely
> > single-CPU meaning. And if you only have a single CPU involved in the
> > process, the "volatile" is by definition pointless (because even
> > without a volatile, the compiler is required to make the C code appear
> > consistent as far as a single CPU is concerned).
>
> I assume you mean "except for IO-related code and 'random' values like
> jiffies" as you mention later on? I assume other values set in
> interrupt handlers would count as "random" from a volatility perspective?
>
> > So anybody who argues for "volatile" fixing bugs is fundamentally
> > incorrect. It does NO SUCH THING. By arguing that, such people only show
> > that you have no idea what they are talking about.
>
> What about reading values modified in interrupt handlers, as in your
> "random" case? Or is this a bug where the user of atomic_read() is
> invalidly expecting a read each time it is called?
the interrupt handler case is an SMP case since you do not know
beforehand what cpu your interrupt handler will run on.
-
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