From: Zefan Li <lizefan@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>, <cgroups@vger.kernel.org>,
<mingo@redhat.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem
Date: Sun, 24 May 2015 10:35:48 +0800 [thread overview]
Message-ID: <55613904.7060502@huawei.com> (raw)
In-Reply-To: <20150521203943.GS24861@htj.duckdns.org>
On 2015/5/22 4:39, Tejun Heo wrote:
> Hello, Li.
>
> On Wed, May 20, 2015 at 06:05:37PM +0800, Zefan Li wrote:
>>> The latency is bound by synchronize_sched_expedited(). Given the way
>>> cgroups are used in majority of setups (process migration happening
>>> only during service / session setups), I think this should be okay.
>>
>> Actually process migration can happen quite frequently, for example in
>> Android phones, and that's why Google had an out-of-tree patch to remove
>> the synchronize_rcu() in that path, which turned out to be buggy.
>
> It's still not a very frequent operation tho. We're talking about
> users switching fore/background jobs here and the expedited
> synchronization w/ preemption enabled doesn't take much time. In
> addition, as it currently stands, android is doing memory charge
> immigration on each fore/background switches. I'm pretty doubtful
> this would make any difference.
>
I did some testing with my laptop.
Moving a task between 2 cgroups for 10W times with one or two threads:
1T 2T
orig 3.36s 3.65s
orig+tj 3.55s 6.31s
orig+sync_rcu 16.69s 28.47s (only 1000 times)
The overhead looks acceptable.
next prev parent reply other threads:[~2015-05-24 2:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 20:35 [PATCHSET] cgroup, sched: restructure threadgroup locking and replace it with a percpu_rwsem Tejun Heo
2015-05-13 20:35 ` [PATCH 1/3] sched, cgroup: reorganize threadgroup locking Tejun Heo
2015-05-14 1:09 ` Sergey Senozhatsky
2015-05-14 15:17 ` Tejun Heo
2015-05-13 20:35 ` [PATCH 2/3] sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem Tejun Heo
2015-05-19 15:16 ` Peter Zijlstra
2015-05-19 15:51 ` Tejun Heo
2015-05-20 10:05 ` Zefan Li
2015-05-21 20:39 ` Tejun Heo
2015-05-24 2:35 ` Zefan Li [this message]
2015-05-13 20:35 ` [PATCH 3/3] cgroup: simplify threadgroup locking Tejun Heo
2015-05-18 16:34 ` [PATCHSET] cgroup, sched: restructure threadgroup locking and replace it with a percpu_rwsem Tejun Heo
2015-05-18 20:06 ` Peter Zijlstra
2015-05-27 0:34 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55613904.7060502@huawei.com \
--to=lizefan@huawei.com \
--cc=cgroups@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome