[Devel] Re: [PATCH] cgroups: add task along with its threads in one shot inside cgroup

Li Zefan lizf at cn.fujitsu.com
Wed Dec 17 17:51:52 PST 2008


Gowrishankar M wrote:
> From: Gowrishankar M <gomuthuk at linux.vnet.ibm.com>
> 
> In current model, task by task we populate cgroup.
> Incase of multi-threaded task, it becomes difficult
> as we should first know about list of threads created
> and add them one by one in cgroup.
> 

It was proposed to add 'procs' control file to do so long ago, but there
is a big issue, that there is no way to do it atomically, i.e you may
success to move some threads but fail for others.

You can get some information here:
	https://lists.linux-foundation.org/pipermail/containers/2008-July/011747.html

> In below patch, when a thread group leader is scanned,
> belonging threads are also moved along with it, while
> populating cgroup tasks.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list