lkml.org 
[lkml]   [2016]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Severe performance regression w/ 4.4+ on Android due to cgroup locking changes
On Thu, Jul 14, 2016 at 10:41 AM, Oleg Nesterov <oleg@redhat.com> wrote:
> On 07/14, John Stultz wrote:
>>
>> I'm not supposed to be applying this on-top of
>> Paul's change, right?
>
> Right, unless I am totally confused,
>
>> > Just in case, could you try the patch below? Of course, without other
>> > optimizations from Peter, this change makes cgroup_threadgroup_rwsem
>> > much worse than a plain rw_semaphore.
>> >
>> > Oleg.
>> >
>> > --- x/kernel/cgroup.c
>> > +++ x/kernel/cgroup.c
>> > @@ -5605,6 +5605,8 @@ int __init cgroup_init(void)
>> > BUG_ON(cgroup_init_cftypes(NULL, cgroup_dfl_base_files));
>> > BUG_ON(cgroup_init_cftypes(NULL, cgroup_legacy_base_files));
>> >
>> > + rcu_sync_enter(&cgroup_threadgroup_rwsem.rss);
>> > +
>>
>>
>> So adding this does make a huge difference ontop of Peter's patch.
>
> Ah, sorry for confusion. I meant, you could try this one-liner without
> any other changes.

So the one-liner without other changes helps at a similar level as
Paul's change. From some simple testing I've got a 3.5ms spike, but
otherwise the values are under 200us.

> But we will need the "slow mode optimization" part from Peter's patch
> anyway, otherwise percpu_rw_semaphore simply makes no sense for
> cgroup_threadgroup_rwsem.

Yea, with Peter's patch it is further improved.

thanks
-john

\
 
 \ /
  Last update: 2016-07-14 20:21    [W:0.069 / U:10.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site