From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederic Weisbecker Subject: Re: Q: cgroup: Questions about possible issues in cgroup locking Date: Wed, 21 Dec 2011 18:59:45 +0100 Message-ID: <20111221175943.GG17668@somewhere> References: <20111221034334.GD17668@somewhere> <20111221130848.GA19679@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20111221130848.GA19679-H+wXaHxf7aLQT0dZR+AlfA@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: Oleg Nesterov Cc: Containers , LKML , Paul Menage , Tejun Heo , Cgroups , Andrew Morton , "Paul E. McKenney" , Mandeep Singh Baines List-Id: containers.vger.kernel.org On Wed, Dec 21, 2011 at 02:08:48PM +0100, Oleg Nesterov wrote: > On 12/21, Frederic Weisbecker wrote: > > - By the time we call cgroup_post_fork(), it is ready to be woken up > > and usable by the scheduler. > > No, the new child can't run until do_fork()->wake_up_new_task(). Out of curiosity, why is it not possible for a task to kill and wake up the child before that happens? Understanding that could potentially let us remove the task_lock() in cgroup_post_fork() (although I need to examine that more deeply). Thanks!