From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH] cgroups: add task along with its threads in one shot inside cgroup Date: Thu, 18 Dec 2008 09:51:52 +0800 Message-ID: <4949ACB8.6070706@cn.fujitsu.com> References: <1229545826-16978-1-git-send-email-gowrishankar.m@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1229545826-16978-1-git-send-email-gowrishankar.m-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Gowrishankar M Cc: containers , Sukadev , Balbir , Eric , Dave List-Id: containers.vger.kernel.org Gowrishankar M wrote: > From: Gowrishankar M > > 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.