lkml.org 
[lkml]   [2009]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 8/8] Adds ability to move all threads in a process to a new cgroup atomically
Paul Menage wrote:
> From: Ben Blum <bblum@google.com>
>
>
> Adds ability to move all threads in a process to a new cgroup atomically
>
> 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 per-threadgroup rwsem that's
> taken for reading in the fork() path to prevent newly forking threads within
> the threadgroup from "escaping" while the move is in progress.
>
> Cgroups subsystems that need to perform per-thread actions in their
> "attach" callback are (currently) responsible for doing their own
> synchronization, since this occurs outside of the critical section
> that locks against cloning within a thread group.
>
> Signed-off-by: Ben Blum <bblum@google.com>
> Signed-off-by: Paul Menage <menage@google.com>
>

Acked-by: Li Zefan <lizf@cn.fujitsu.com>



\
 
 \ /
  Last update: 2009-08-20 05:05    [W:0.166 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site