Messages in this thread | | | From | Pranith Kumar <> | Date | Mon, 22 Sep 2014 17:42:16 -0400 | Subject | Re: [RFC PATCH] x86: Use volatile semantics for atomic_set() |
| |
On Mon, Sep 22, 2014 at 4:08 PM, Peter Zijlstra <peterz@infradead.org> wrote: > On Mon, Sep 22, 2014 at 03:39:21PM -0400, Pranith Kumar wrote: >> All the atomic operations have volatile semantics to prevent compiler >> reordering. Enforce the same semantics for atomic_set() too. > > To what point? atomic_set() is typically not what you expect it to > anyhow.
This is the only atomic operation which allows compiler reordering. I am not sure why this exception was made. Any ideas as to why we do this?
As I mentioned, this patch removes this inconsistency by disallowing compiler reordering.
-- Pranith
| |