[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110829155640.GA8392@redhat.com>
Date: Mon, 29 Aug 2011 17:56:40 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Tejun Heo <tj@...nel.org>
Cc: rjw@...k.pl, paul@...lmenage.org, linux-kernel@...r.kernel.org,
arnd@...db.de
Subject: Re: [PATCH 14/16] freezer: make freezing() test freeze conditions
in effect instead of TIF_FREEZE
I'm afraid I wasn't clear....
On 08/29, Oleg Nesterov wrote:
>
> On 08/19, Tejun Heo wrote:
> >
> > @@ -311,9 +315,11 @@ static int freezer_change_state(struct cgroup *cgroup,
> >
> > switch (goal_state) {
> > case CGROUP_THAWED:
> > + atomic_dec(&system_freezing_cnt);
> > unfreeze_cgroup(cgroup, freezer);
> > break;
> > case CGROUP_FROZEN:
> > + atomic_inc(&system_freezing_cnt);
>
> This is harmless, but afaics is not exactly right. CGROUP_FROZEN doesn't
> need system_freezing_cnt != 0, everything is already frozen and we just
> provoke freezing_slow_path() without any reason. Right?
Of course, this atomic_inc() is right, we are going to call
try_to_freeze_cgroup(). But probably it makes sense to do atomic_dec()
when freezer->state becomes CGROUP_FROZEN.
Oleg.
--
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