Messages in this thread | | | Date | Fri, 24 Jul 2009 08:50:41 -0700 | From | Matt Helsley <> | Subject | Re: [PATCH 5/6] Makes procs file writable to move all threads by tgid at once |
| |
On Thu, Jul 23, 2009 at 08:22:00PM -0700, Ben Blum wrote: > Makes procs file writable to move all threads by tgid at once > > This patch adds functionality that enables users to move all threads in a > threadgroup at once to a cgroup by writing the tgid to the 'cgroup.procs' > file. This current implementation makes use of a rwsem that's taken for > reading in the fork() path to prevent newly forking threads within the
There is much ado about not taking additional "global locks" in fork() paths.
* The fork and exit callbacks cgroup_fork() and cgroup_exit(), don't * (usually) take cgroup_mutex. These are the two most performance * critical pieces of code here. ...
and as I recall cgroup_fork() doesn't ever take cgroup_mutex because it is so performance critical. Assuming the above comments in kernel/cgroup.c are correct then this patch adds a performance regression by introducing a global mutex in the fork path, doesn't it?
Cheers, -Matt Helsley
| |