[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110902025016.GI2752@htj.dyndns.org>
Date: Fri, 2 Sep 2011 11:50:16 +0900
From: Tejun Heo <tj@...nel.org>
To: Matt Helsley <matthltc@...ibm.com>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>, Oleg Nesterov <oleg@...hat.com>,
Paul Menage <paul@...lmenage.org>,
containers@...ts.linux-foundation.org,
linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH pm-freezer 1/4] cgroup_freezer: fix freezer->state
setting bug in freezer_change_state()
Hello, Matt.
On Thu, Sep 01, 2011 at 05:42:31PM -0700, Matt Helsley wrote:
> > case CGROUP_FROZEN:
> > - atomic_inc(&system_freezing_cnt);
> > - retval = try_to_freeze_cgroup(cgroup, freezer);
> > + if (freezer->state == CGROUP_THAWED) {
> > + freezer->state = CGROUP_FREEZING;
> > + atomic_inc(&system_freezing_cnt);
> > + retval = try_to_freeze_cgroup(cgroup, freezer);
>
> This still doesn't look quite right. If the cgroup is FREEZING it should
> also call try_to_freeze_cgroup(). I think this is what's needed:
>
> if (freezer->state == CGROUP_THAWED)
> atomic_inc(&system_freezing_cnt);
> freezer->state = CGROUP_FREEZING;
> retval = try_to_freeze_cgroup(cgroup, freezer);
Does this make any difference? Tasks can't migrate if the cgroups are
freezing and freezing state is inherited through forks. But yeah
doing that for both THAWED and FROZEN might still be a good idea for
safety.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists