Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933970AbXHORdq (ORCPT ); Wed, 15 Aug 2007 13:33:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761864AbXHORdc (ORCPT ); Wed, 15 Aug 2007 13:33:32 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:34329 "EHLO e4.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762277AbXHORda (ORCPT ); Wed, 15 Aug 2007 13:33:30 -0400 Date: Wed, 15 Aug 2007 10:33:26 -0700 From: "Paul E. McKenney" To: Satyam Sharma Cc: Herbert Xu , Stefan Richter , Christoph Lameter , 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: <20070815173326.GF9645@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <46C2D6F3.3070707@s5r6.in-berlin.de> <46C2FADB.7020407@s5r6.in-berlin.de> <20070815142516.GB9645@linux.vnet.ibm.com> <20070815153335.GA23593@gondor.apana.org.au> <20070815160830.GC9645@linux.vnet.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: 1483 Lines: 31 On Wed, Aug 15, 2007 at 10:48:28PM +0530, Satyam Sharma wrote: > On Wed, 15 Aug 2007, Paul E. McKenney wrote: > > On Wed, Aug 15, 2007 at 11:33:36PM +0800, Herbert Xu wrote: > > > On Wed, Aug 15, 2007 at 07:25:16AM -0700, Paul E. McKenney wrote: > > > > > > > > Do we really need another set of APIs? Can you give even one example > > > > where the pre-existing volatile semantics are causing enough of a problem > > > > to justify adding yet more atomic_*() APIs? > > > > > > Let's turn this around. Can you give a single example where > > > the volatile semantics is needed in a legitimate way? > > > > Sorry, but you are the one advocating for the change. > > Not for i386 and x86_64 -- those have atomic ops without any "volatile" > semantics (currently as per existing definitions). I claim unit volumes with arm, and the majority of the architectures, but I cannot deny the popularity of i386 and x86_64 with many developers. ;-) However, I am not aware of code in the kernel that would benefit from the compiler coalescing multiple atomic_set() and atomic_read() invocations, thus I don't see the downside to volatility in this case. Are there some performance-critical code fragments that I am missing? 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/