From: Oleg Nesterov <oleg@redhat.com>
To: Roman Gushchin <guroan@gmail.com>
Cc: Tejun Heo <tj@kernel.org>,
kernel-team@fb.com, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, Roman Gushchin <guro@fb.com>
Subject: Re: [PATCH v7 0/7] freezer for cgroup v2
Date: Thu, 14 Feb 2019 17:30:19 +0100 [thread overview]
Message-ID: <20190214163018.GD19102@redhat.com> (raw)
In-Reply-To: <20190212184807.20304-1-guro@fb.com>
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.
prev parent reply other threads:[~2019-02-14 16:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 18:48 [PATCH v7 0/7] freezer for cgroup v2 Roman Gushchin
2019-02-12 18:48 ` [PATCH v7 1/7] cgroup: rename freezer.c into legacy_freezer.c Roman Gushchin
2019-02-12 18:48 ` [PATCH v7 2/7] cgroup: implement __cgroup_task_count() helper Roman Gushchin
2019-02-12 18:48 ` [PATCH v7 3/7] cgroup: protect cgroup->nr_(dying_)descendants by css_set_lock Roman Gushchin
2019-02-12 18:48 ` [PATCH v7 4/7] cgroup: cgroup v2 freezer Roman Gushchin
2019-02-12 18:48 ` [PATCH v7 5/7] kselftests: cgroup: don't fail on cg_kill_all() error in cg_destroy() Roman Gushchin
2019-02-12 18:48 ` [PATCH v7 6/7] kselftests: cgroup: add freezer controller self-tests Roman Gushchin
2019-02-12 18:48 ` [PATCH v7 7/7] cgroup: document cgroup v2 freezer interface Roman Gushchin
2019-02-14 16:30 ` Oleg Nesterov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190214163018.GD19102@redhat.com \
--to=oleg@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=guro@fb.com \
--cc=guroan@gmail.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).