Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758970AbXHPUIU (ORCPT ); Thu, 16 Aug 2007 16:08:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752279AbXHPUIE (ORCPT ); Thu, 16 Aug 2007 16:08:04 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:50551 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752571AbXHPUIA (ORCPT ); Thu, 16 Aug 2007 16:08:00 -0400 Date: Thu, 16 Aug 2007 13:07:56 -0700 From: "Paul E. McKenney" To: Christoph Lameter Cc: Paul Mackerras , Satyam Sharma , Herbert Xu , Stefan Richter , Chris Snook , Linux Kernel Mailing List , linux-arch@vger.kernel.org, Linus Torvalds , netdev@vger.kernel.org, Andrew Morton , ak@suse.de, heiko.carstens@de.ibm.com, davem@davemloft.net, schwidefsky@de.ibm.com, wensong@linux-vs.org, horms@verge.net.au, wjiang@resilience.com, cfriesen@nortel.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 Message-ID: <20070816200756.GF16957@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20070816003948.GY9645@linux.vnet.ibm.com> <18115.44462.622801.683446@cargo.ozlabs.ibm.com> <20070816020042.GA30650@gondor.apana.org.au> <18115.45316.702491.681906@cargo.ozlabs.ibm.com> <18115.52863.638655.658466@cargo.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 937 Lines: 20 On Thu, Aug 16, 2007 at 11:54:54AM -0700, Christoph Lameter wrote: > On Thu, 16 Aug 2007, Paul Mackerras wrote: > > So I don't see any good reason to make the atomic API more complex by > > having "volatile" and "non-volatile" versions of atomic_read. It > > should just have the "volatile" behaviour. > > If you want to make it less complex then drop volatile which causes weird > side effects without solving any problems as you just pointed out. The other set of problems are communication between process context and interrupt/NMI handlers. Volatile does help here. And the performance impact of volatile is pretty near zero, so why have the non-volatile variant? Thanx, Paul - 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/