Thread (14 messages) 14 messages, 4 authors, 2015-05-27

Re: [PATCH 2/3] sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem

From: Zefan Li <hidden>
Date: 2015-05-24 02:36:36
Also in: lkml

On 2015/5/22 4:39, Tejun Heo wrote:
Hello, Li.

On Wed, May 20, 2015 at 06:05:37PM +0800, Zefan Li wrote:
quoted
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help