Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764350AbXHOQLj (ORCPT ); Wed, 15 Aug 2007 12:11:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758542AbXHOQL1 (ORCPT ); Wed, 15 Aug 2007 12:11:27 -0400 Received: from einhorn.in-berlin.de ([192.109.42.8]:38005 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758214AbXHOQL0 (ORCPT ); Wed, 15 Aug 2007 12:11:26 -0400 X-Envelope-From: stefanr@s5r6.in-berlin.de Message-ID: <46C3253F.5090707@s5r6.in-berlin.de> Date: Wed, 15 Aug 2007 18:09:35 +0200 From: Stefan Richter User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070807 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Herbert Xu CC: Satyam Sharma , Heiko Carstens , Chris Snook , clameter@sgi.com, Linux Kernel Mailing List , linux-arch@vger.kernel.org, Linus Torvalds , netdev@vger.kernel.org, Andrew Morton , ak@suse.de, 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 References: <46C2350A.1010807@redhat.com> <20070815081841.GA16551@osiris.boeblingen.de.ibm.com> <46C30540.2070603@s5r6.in-berlin.de> <20070815145207.GA23106@gondor.apana.org.au> In-Reply-To: <20070815145207.GA23106@gondor.apana.org.au> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 734 Lines: 28 Herbert Xu wrote: > On Wed, Aug 15, 2007 at 08:05:38PM +0530, Satyam Sharma wrote: >>> I don't know if this here is affected: [...something like] b = atomic_read(a); for (i = 0; i < 4; i++) { msleep_interruptible(63); c = atomic_read(a); if (c != b) { b = c; i = 0; } } > Nope, we're calling schedule which is a rather heavy-weight > barrier. How does the compiler know that msleep() has got barrier()s? -- Stefan Richter -=====-=-=== =--- -==== http://arcgraph.de/sr/ - 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/