From: Tejun Heo <tj@kernel.org>
To: Xiu Jianfeng <xiujianfeng@huaweicloud.com>
Cc: lizefan.x@bytedance.com, hannes@cmpxchg.org,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] cgroup: don't call cgroup1_pidlist_destroy_all() for v2
Date: Wed, 17 Apr 2024 16:02:14 -1000 [thread overview]
Message-ID: <ZiB_Jhj2I8YdYs64@slm.duckdns.org> (raw)
In-Reply-To: <20240417021359.883736-1-xiujianfeng@huaweicloud.com>
Hello,
On Wed, Apr 17, 2024 at 02:13:59AM +0000, Xiu Jianfeng wrote:
> From: Xiu Jianfeng <xiujianfeng@huawei.com>
>
> Currently cgroup1_pidlist_destroy_all() will be called when releasing
> cgroup even if the cgroup is on default hierarchy, however it doesn't
> make any sense for v2 to destroy pidlist of v1.
>
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
> ---
> kernel/cgroup/cgroup-v1.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
> index 520a11cb12f4..46d89157d558 100644
> --- a/kernel/cgroup/cgroup-v1.c
> +++ b/kernel/cgroup/cgroup-v1.c
> @@ -197,6 +197,8 @@ void cgroup1_pidlist_destroy_all(struct cgroup *cgrp)
> {
> struct cgroup_pidlist *l, *tmp_l;
>
> + if (cgroup_on_dfl(cgrp))
> + return;
Can you move the test to the caller?
Thanks.
--
tejun
next prev parent reply other threads:[~2024-04-18 2:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 2:13 Xiu Jianfeng
2024-04-18 2:02 ` Tejun Heo [this message]
2024-04-18 2:11 ` xiujianfeng
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=ZiB_Jhj2I8YdYs64@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=xiujianfeng@huaweicloud.com \
/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
all inboxes | Powered by JetHome®