Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762075AbXHQSvT (ORCPT ); Fri, 17 Aug 2007 14:51:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754201AbXHQSvC (ORCPT ); Fri, 17 Aug 2007 14:51:02 -0400 Received: from zcars04f.nortel.com ([47.129.242.57]:57225 "EHLO zcars04f.nortel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753492AbXHQSvA (ORCPT ); Fri, 17 Aug 2007 14:51:00 -0400 Message-ID: <46C5EDF9.3090507@nortel.com> Date: Fri, 17 Aug 2007 12:50:33 -0600 From: "Chris Friesen" User-Agent: Mozilla Thunderbird 1.0.2-6 (X11/20050513) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Linus Torvalds CC: 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 Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Aug 2007 18:50:37.0774 (UTC) FILETIME=[8055D6E0:01C7E0FF] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1231 Lines: 26 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? Chris - 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/