[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121022212505.GG5951@atj.dyndns.org>
Date: Mon, 22 Oct 2012 17:25:05 -0400
From: Tejun Heo <tj@...nel.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: rjw@...k.pl, linux-kernel@...r.kernel.org, lizefan@...wei.com,
containers@...ts.linux-foundation.org, cgroups@...r.kernel.org
Subject: Re: [PATCH 5/7] cgroup_freezer: allow moving tasks in and out of a
frozen cgroup
Hello,
On Mon, Oct 22, 2012 at 09:25:06PM +0200, Oleg Nesterov wrote:
> > @@ -190,12 +201,12 @@ static void freezer_fork(struct task_struct *task)
> > goto out;
> >
> > spin_lock_irq(&freezer->lock);
> > - BUG_ON(freezer->state == CGROUP_FROZEN);
> > -
> > - /* Locking avoids race with FREEZING -> THAWED transitions. */
> > - if (freezer->state == CGROUP_FREEZING)
> > + /*
> > + * @task might have been just migrated into a FROZEN cgroup.
>
> Confused. If it was migrated, then freezer_attach() should take care
> do freeze_task?
Hmmm... there's a window where a task is migrated but ->attach()
hasn't completed yet, so freezer_attach() might not have kicked in
yet. It might not be strictly necessary but I think it's more
consistent this way. No?
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