[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190214164100.GA8688@tower.DHCP.thefacebook.com>
Date: Thu, 14 Feb 2019 16:41:05 +0000
From: Roman Gushchin <guro@...com>
To: Oleg Nesterov <oleg@...hat.com>
CC: Roman Gushchin <guroan@...il.com>, Tejun Heo <tj@...nel.org>,
Kernel Team <Kernel-team@...com>,
"cgroups@...r.kernel.org" <cgroups@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 4/7] cgroup: cgroup v2 freezer
On Thu, Feb 14, 2019 at 05:26:13PM +0100, Oleg Nesterov wrote:
> On 02/11, Roman Gushchin wrote:
> >
> > On Wed, Jan 30, 2019 at 05:52:01PM +0100, Oleg Nesterov wrote:
> > >
> > > Worse, this looks just wrong. In the latter case, cgroup becomes CGRP_FROZEN
> > > right after a 2nd task migrates to this cgroup, before this new task calls
> > > do_freezer_trap() or cgroup_enter_stopped().
> >
> > You're right. So, it looks like the problem is in the equation
> > nr_tasks_frozen + nr_tasks_stopped == nr_tasks_to_freeze ,
> > because a task can be frozen and stopped simultaneously.
> >
> > So, basically it has to be
> > nr_tasks_frozen + nr_tasks_stopped >= nr_tasks_to_freeze instead.
>
> It seems you didn't read the paragraph above, or I missed something...
>
> How can "frozen + stopped >= to_freeze" fix the problem with the falsely true
> CGRP_FROZEN ?
It helps with the problem when cgroup is mistakenly reported as non-frozen,
and adding a task makes it frozen due to increased nr_tasks_to_freeze.
But you're right, it's not correct. I have to think more how to make
the accounting work correctly with stopped tasks.
Roman
Powered by blists - more mailing lists