lkml.org 
[lkml]   [2015]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/8] atomics: add acquire/release/relaxed variants of some atomic operations
On Mon, Jul 27, 2015 at 10:14:30AM +0100, Peter Zijlstra wrote:
> On Fri, Jul 24, 2015 at 03:04:34PM +0100, Will Deacon wrote:
> > This patch introduces three new ordering semantics for these operations:
> >
> > - *_relaxed: No ordering guarantees. This is similar to what we have
> > already for the non-return atomics (e.g. atomic_add).
> >
> > - *_acquire: ACQUIRE semantics, similar to smp_load_acquire.
> >
> > - *_release: RELEASE semantics, similar to smp_store_release.
>
> Do we want to further specify that for the RmW operations the Read/load
> will provide the acquire and the Write/store the release?

Yeah, that's not a bad idea, but if we add that then I probably need to
re-iterate the cmpxchg strangeness since a failed cmpxchg_acquire would
still not have barrier semantics with the current implementation even though
it must have performed a Read/load access.

Will


\
 
 \ /
  Last update: 2015-07-27 12:41    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog