[lkml]   [2015]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Question about barriers for ARM on tools/perf/
On Fri, May 08, 2015 at 03:21:08PM +0100, Will Deacon wrote:
> Wouldn't it be better to go the other way, and use compiler builtins for
> the memory barriers instead of relying on the kernel? It looks like the
> perf_mmap__{read,write}_head functions are basically just acquire/release
> operations and could therefore be implemented using something like
> __atomic_load_n(&pc->data_head, __ATOMIC_ACQUIRE) and
> __atomic_store_n(&pc->data_tail, tail, __ATOMIC_RELEASE).

He wants to do smp refcounting, which needs atomic_inc() /
atomic_inc_non_zero() / atomic_dec_return() etc..

 \ /
  Last update: 2015-05-08 16:41    [W:0.067 / U:35.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site