lkml.org 
[lkml]   [2015]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC][PATCH 5/5] percpu-rwsem: Optimize readers and reduce global impact
From
On Fri, May 29, 2015 at 1:09 PM, Oleg Nesterov <oleg@redhat.com> wrote:
>
> Doesn't it need mb() before "state = readers_slow" to ensure
> "release" semantics?

Please don't do any mb() at all. Just do smp_store_release() if
release semantics is what you want.

Basically, strive to avoid "smp_mb()" at all costs. It's insanely
expensive compared to pretty much all other serialization
alternatives.

(And try to make sure to pair it with smp_load_acquire() on the other
side for things to make sense)

Linus


\
 
 \ /
  Last update: 2015-05-29 23:01    [W:0.088 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site