From: Tejun Heo <htejun@gmail.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
containers@lists.linux-foundation.org,
Tomasz Buchert <tomasz.buchert@inria.fr>,
Paul Menage <paul@paulmenage.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] cgroup_freezer: fix freezing groups with stopped tasks
Date: Mon, 21 Nov 2011 18:21:18 -0800 [thread overview]
Message-ID: <20111122022118.GT25776@google.com> (raw)
In-Reply-To: <4ECB06D2.6060106@cn.fujitsu.com>
On Tue, Nov 22, 2011 at 10:20:02AM +0800, Li Zefan wrote:
> 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.
You're right, missed parantheses.
> 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.
So, yeah, the patch looks good to me, but it still isn't difficult to
trigger BUG_ON() there. We need a lot of fixes in cgroup_freezer.
Thanks.
--
tejun
next prev parent reply other threads:[~2011-11-22 2:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 21:50 Michal Hocko
[not found] ` <4EC4DE9D.3040703@inria.fr>
2011-11-17 16:13 ` Michal Hocko
2011-11-17 17:03 ` Tomasz Buchert
2011-11-21 13:40 ` Michal Hocko
2011-11-21 23:07 ` Tejun Heo
2011-11-22 2:20 ` Li Zefan
2011-11-22 2:21 ` Tejun Heo [this message]
2011-11-22 9:05 ` Michal Hocko
2011-11-22 15:39 ` Tejun Heo
2011-11-22 15:48 ` Tejun Heo
2011-11-23 2:00 ` Li Zefan
2011-11-24 10:04 ` Michal Hocko
2011-11-24 20:00 ` Tejun Heo
2011-11-24 21:52 ` Michal Hocko
2011-11-22 15:56 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111122022118.GT25776@google.com \
--to=htejun@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=containers@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mhocko@suse.cz \
--cc=paul@paulmenage.org \
--cc=tomasz.buchert@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome