lkml.org 
[lkml]   [2016]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Severe performance regression w/ 4.4+ on Android due to cgroup locking changes
On 07/14, Peter Zijlstra wrote:
>
> OK, not too horrible if I say so myself :-)
>
> The below is a compile tested only first draft so far. I'll go give it
> some runtime next.

Yes, thanks.

But note that we do not need RCU_NONE. All we need is the trivial change
below. Damn, I am trying to find my old rcu-sync patches which I didn't
send, but can't... OK, this almost off-topic right now, just this "enter"
is ugly and we can't switch the slow/fast modes dynamically.

The rest of you patch is "optimize the slow path" and we already discussed
it before, I personally like it. Perhaps you can redo it without RCU_NONE
part?

Of course, this leads to another question: do we really need rcu-sync at
all, or should we change percpu-rwsem to always work in the "slow" mode
which is not that slow with your change... I'd like to keep it ;)

What do you think?

Oleg.

--- a/kernel/cgroup.c
+++ b/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);
+
get_user_ns(init_cgroup_ns.user_ns);

mutex_lock(&cgroup_mutex);
\
 
 \ /
  Last update: 2016-07-14 17:41    [W:0.136 / U:4.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site