From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH] cgroup_freezer: fix freezing groups with stopped tasks Date: Tue, 22 Nov 2011 10:20:02 +0800 Message-ID: <4ECB06D2.6060106@cn.fujitsu.com> References: <1321480234-29241-1-git-send-email-mhocko@suse.cz> <20111121230709.GR25776@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111121230709.GR25776-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: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Michal Hocko , Tomasz Buchert , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Paul Menage Tejun Heo wrote: > Hello, Michal. > > On Wed, Nov 16, 2011 at 10:50:34PM +0100, Michal Hocko wrote: >> +/* Task is frozen or will freeze immediately when next it gets woken */ >> +static bool is_task_frozen_enough(struct task_struct *task) >> +{ >> + return frozen(task) || >> + (task_is_stopped_or_traced(task) && freezing(task)); >> +} > > Hmmm... w/ pending freezer updates, the above would always return > %true if there's freezing in progress, which can't be right. Maybe Only if the task is stopped/trace. If we try to freeze a stopped task, it will be kept in freezing state. > just test stopped/traced? > This can trigger a BUG_ON in update_if_frozen(), because we always count a stopped task as frozen. > http://git.kernel.org/?p=linux/kernel/git/tj/misc.git;a=shortlog;h=refs/heads/pm-freezer > > Thanks. >