Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761508AbXHQS7X (ORCPT ); Fri, 17 Aug 2007 14:59:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757532AbXHQS7N (ORCPT ); Fri, 17 Aug 2007 14:59:13 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:33144 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755295AbXHQS7K (ORCPT ); Fri, 17 Aug 2007 14:59:10 -0400 Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures From: Arjan van de Ven To: Chris Friesen Cc: Linus Torvalds , Nick Piggin , Satyam Sharma , Herbert Xu , Paul Mackerras , Christoph Lameter , Chris Snook , Ilpo Jarvinen , "Paul E. McKenney" , Stefan Richter , Linux Kernel Mailing List , linux-arch@vger.kernel.org, Netdev , Andrew Morton , ak@suse.de, heiko.carstens@de.ibm.com, David Miller , schwidefsky@de.ibm.com, wensong@linux-vs.org, horms@verge.net.au, wjiang@resilience.com, zlynx@acm.org, rpjday@mindspring.com, jesper.juhl@gmail.com, segher@kernel.crashing.org In-Reply-To: <46C5EDF9.3090507@nortel.com> References: <18115.52863.638655.658466@cargo.ozlabs.ibm.com> <20070816053945.GB32442@gondor.apana.org.au> <18115.62741.807704.969977@cargo.ozlabs.ibm.com> <20070816070907.GA964@gondor.apana.org.au> <46C4ABA5.9010804@redhat.com> <18117.1287.779351.836552@cargo.ozlabs.ibm.com> <18117.6495.397597.582736@cargo.ozlabs.ibm.com> <20070817035342.GA14744@gondor.apana.org.au> <46C55E90.7010407@yahoo.com.au> <46C56ADF.8010501@cyberone.com.au> <46C59717.4020108@cyberone.com.au> <46C5EDF9.3090507@nortel.com> Content-Type: text/plain Organization: Intel International BV Date: Fri, 17 Aug 2007 11:54:33 -0700 Message-Id: <1187376873.2615.2.camel@laptopd505.fenrus.org> Mime-Version: 1.0 X-Mailer: Evolution 2.11.6.1 (2.11.6.1-1.fc8) Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1443 Lines: 32 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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/