[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190214163018.GD19102@redhat.com>
Date: Thu, 14 Feb 2019 17:30:19 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Roman Gushchin <guroan@...il.com>
Cc: Tejun Heo <tj@...nel.org>, kernel-team@...com,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
Roman Gushchin <guro@...com>
Subject: Re: [PATCH v7 0/7] freezer for cgroup v2
On 02/12, Roman Gushchin wrote:
>
> - handle properly the case, when a task is both stopped and frozen
I didn't read this version yet, just looked at
+static void cgroup_update_frozen(struct cgroup *cgrp)
+{
+ bool frozen;
+
+ lockdep_assert_held(&css_set_lock);
+
+ /*
+ * If the cgroup has to be frozen (CGRP_FREEZE bit set),
+ * and all tasks are frozen and/or stopped, let's consider
+ * the cgroup frozen. Otherwise it's not frozen.
+ */
+ frozen = test_bit(CGRP_FREEZE, &cgrp->flags) &&
+ cgrp->freezer.nr_frozen_tasks +
+ cgrp->freezer.nr_stopped_tasks >=
+ cgrp->freezer.nr_tasks_to_freeze;
if this is the only change which should handle this case correctly, I doubt it can
help. See another email I sent you a minute ago...
Oleg.
Powered by blists - more mailing lists