Messages in this thread | | | Subject | Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount | From | Benjamin Herrenschmidt <> | Date | Fri, 30 Aug 2013 12:45:02 +1000 |
| |
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.
| |