From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH cgroup/for-3.7-fixes 1/2] Revert "cgroup: Remove task_lock() from cgroup_post_fork()" Date: Fri, 19 Oct 2012 16:51:02 +0800 Message-ID: <50811476.1070808@huawei.com> References: <20121008020000.GB2575@localhost> <20121019005922.GG13370@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121019005922.GG13370-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-Id: 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: Tejun Heo Cc: Frederic Weisbecker , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 2012/10/19 8:59, Tejun Heo wrote: >>>From d935a5d6832a264ce52f4257e176f4f96cbaf048 Mon Sep 17 00:00:00 2001 > From: Tejun Heo > Date: Thu, 18 Oct 2012 17:40:30 -0700 > > This reverts commit 7e3aa30ac8c904a706518b725c451bb486daaae9. > > The commit incorrectly assumed that fork path always performed > threadgroup_change_begin/end() and depended on that for > synchronization against task exit and cgroup migration paths instead > of explicitly grabbing task_lock(). > > threadgroup_change is not locked when forking a new process (as > opposed to a new thread in the same process) and even if it were it > wouldn't be effective as different processes use different threadgroup > locks. > > Revert the incorrect optimization. > > Signed-off-by: Tejun Heo > LKML-Reference: <20121008020000.GB2575@localhost> > Cc: Frederic Weisbecker > Cc: Li Zefan > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Acked-by: Li Zefan