mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: xiujianfeng <xiujianfeng@huawei.com>
To: Tejun Heo <tj@kernel.org>, 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: Thu, 18 Apr 2024 10:11:08 +0800	[thread overview]
Message-ID: <f5c946d2-6271-8619-72ca-15860555218d@huawei.com> (raw)
In-Reply-To: <ZiB_Jhj2I8YdYs64@slm.duckdns.org>

Hi,

On 2024/4/18 10:02, Tejun Heo wrote:
> 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?

Sure, will do in v2.

> 
> Thanks.
> 

      reply	other threads:[~2024-04-18  2:11 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
2024-04-18  2:11   ` xiujianfeng [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=f5c946d2-6271-8619-72ca-15860555218d@huawei.com \
    --to=xiujianfeng@huawei.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=tj@kernel.org \
    --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®