lkml.org 
[lkml]   [2016]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Severe performance regression w/ 4.4+ on Android due to cgroup locking changes
On Wed, Jul 13, 2016 at 04:39:44PM -0400, Tejun Heo wrote:

> > There is a synchronize_sched() in there, so sorta. That thing is heavily
> > geared towards readers, as is the only 'sane' choice for global locks.
>
> It used to use the expedited variant until 001dac627ff3
> ("locking/percpu-rwsem: Make use of the rcu_sync infrastructure"), so
> it might have been okay before then.

Right, but expedited stuff sprays IPIs around the entire system. That's
stuff other people complain about.

> The options that I can see are
>
> 1. Somehow make percpu_rwsem's write behavior more responsive in a way
> which is acceptable all use cases. This would be great but
> probably impossible.
>
> 2. Add a fast-writer option to percpu_rwsem so that users which care
> about write latency can opt in for higher processing overhead for
> lower latency.

So, IIRC, the trade-off is a full memory barrier in read_lock and
read_unlock() vs sync_sched() in write.

Full memory barriers are expensive and while the combined cost might
well exceed the cost of the sync_sched() it doesn't suffer the latency
issues.

Not sure if we can frob the two in a single codebase, but I can have a
poke if Oleg or Paul doesn't beat me to it.

\
 
 \ /
  Last update: 2016-07-13 23:41    [W:0.150 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site