Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755199Ab3H3CqE (ORCPT ); Thu, 29 Aug 2013 22:46:04 -0400 Received: from gate.crashing.org ([63.228.1.57]:48879 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752619Ab3H3CqC (ORCPT ); Thu, 29 Aug 2013 22:46:02 -0400 Message-ID: <1377830702.4028.50.camel@pasglop> Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount From: Benjamin Herrenschmidt To: Linus Torvalds Cc: Michael Neuling , Ingo Molnar , Waiman Long , Alexander Viro , Jeff Layton , Miklos Szeredi , Ingo Molnar , Thomas Gleixner , linux-fsdevel , Linux Kernel Mailing List , Peter Zijlstra , Steven Rostedt , Andi Kleen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" Date: Fri, 30 Aug 2013 12:45:02 +1000 In-Reply-To: References: <1375758759-29629-1-git-send-email-Waiman.Long@hp.com> <1375758759-29629-2-git-send-email-Waiman.Long@hp.com> <1377751465.4028.20.camel@pasglop> <20130829070012.GC27322@gmail.com> <1377822408.4028.44.camel@pasglop> <29797.1377828380@ale.ozlabs.ibm.com> <1377829857.4028.46.camel@pasglop> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 846 Lines: 20 On Thu, 2013-08-29 at 19:35 -0700, Linus Torvalds wrote: > That said, on power, you have that "ACCESS_ONCE()" implicit in the > *type*, not in the code, so an "arch_spinlock_t" is fundamentally > volatile in itself. It's one of the reasons I despise "volatile": > things like volatility are _not_ attributes of a variable or a type, > but of the code in question. Something can be volatile in one context, > but not in another (one context might be locked, for example). Right, we can probably change that to use ACCESS_ONCE... volatile tend to never quite do what you expect anyway. Cheers, Ben. -- 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/