lkml.org 
[lkml]   [2014]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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


\
 
 \ /
  Last update: 2014-09-23 00:01    [W:0.039 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site