Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1017948lqb; Wed, 17 Apr 2024 19:11:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7SOAlKUjG9lRLBdyigaZDDtPZ+vJ/s171rNsGsloI597bdbsxizRA62qWe961zHmGsj07Ic4DaMUUJwg+qzjRO3rj+ROYUcwUdaQVgA== X-Google-Smtp-Source: AGHT+IGG0ePBFX81PIRmQRNfIqvifRjEw/3lCY6M91k6dc+PblW47/w7dZaK8sGmLm2nW8adNZaD X-Received: by 2002:a05:6a20:5b1a:b0:1a8:e7ac:1144 with SMTP id kl26-20020a056a205b1a00b001a8e7ac1144mr1509611pzb.59.1713406285774; Wed, 17 Apr 2024 19:11:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713406285; cv=pass; d=google.com; s=arc-20160816; b=GmttjDOC8PgRvTR8QMS4acR9eF0CJh5oORw2vlFPwLmyYQj4R9O5oWQnLx4YvLNDII HgIDfuEK8IWFhiwCW/ex7vOhSm/0V4Brb/QDBYg2wVU+sD4aEtrC/BANJ9cObCIG13O6 1nKMXyDKDM14pF1rn/Be1O0HrGQAuKBevqIfi5V+mjtjjjbUbgKuI5bG28dEyoo8xkyv tNPKe9OiHZklMrcMhHe74dKCscbjjq6tGXOzYQ+0X9TeZJ4G/0Evx6WGxMDKuzXKDYZy 3F8Az71q7V295ec6DqpXvyWLfFU5DCqu5kKwo2gfJS0iHlTJGCVfmHBtP0subo4YwkwX Ep0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=dvH8yp64OyXePt17c9ieZkW8naoq7jVKyK2UCikEbJI=; fh=JFvQmtMAcR5YXin60VTobpv713tSmPyibKd7+jIpgZc=; b=ssNszUxMgtvA+MVI3S9TTSBCb3W3VtB9yh419LdUw6VFtWD2CmhWAY+ResWePZiDVc BEJcVboIHiyE0RJgmNVWoRe7VG/8l76dFJ1t/lw6MAoRtpxwgGiVtPfVWHPMnQH2Ebos SKbINJdRXUwzciLletSITx+H1a0fBeNHO9KJCCKkbNS0Z+XlR4OTtvg1Q06sEVx1u+dB 7yw0aPwyvcoUZCmm6tmq/mdd5Fwl4f2obaNo8FpXGrIoD2Nl9OYm3VTgnxJ8t9Ig78gB P7tzk0j1UQ8aubTEpo4uBo0GcyH9ocb3JoqWl2imOQwziiGfIMfZoNBkya3JUKjgK5Zx mf3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-149430-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e5-20020a17090301c500b001e2c6947aa3si498596plh.463.2024.04.17.19.11.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 19:11:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149430-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-149430-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4FE07282993 for ; Thu, 18 Apr 2024 02:11:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70E3F4BA88; Thu, 18 Apr 2024 02:11:20 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DEFC3BB3D; Thu, 18 Apr 2024 02:11:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713406279; cv=none; b=ccs5IJA+kJU9gzkMH0CaNMjncQmPks+Irxckf9iFL0oqj7fVL+0NhAD2U0uKuS5hw72v6bbKJTqrDTC2PgEDg3F346KSMkEh8cjJ41QBxPypcNJpQK/C324eI3g4ycC2VXQpf8NTe0RmzuDHk7v075ZYZ/D9LW48vlj0x0bTSpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713406279; c=relaxed/simple; bh=4V4cAQ/jRx0zM3nrZljvL+0RkNZz00kTJnbQyfB1IwQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=IRyv8uAA0PwSDfqjeXaA0F7zAuXtXue8HPLzKTqiFGLlzNo6t9J5qDS2ggs38rLM3FOBSUfNQnYoxovz/PNh3Fl8E/Qyjjcr9IetoK6/KN5zqZU0iMODi0z4NEJGg1YGErL5mlz++ML7i/3H0BWtKdAN3MZ/3xfSd2qvRFc/auc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4VKh5n0YxKz1xv3q; Thu, 18 Apr 2024 10:08:45 +0800 (CST) Received: from dggpeml500023.china.huawei.com (unknown [7.185.36.114]) by mail.maildlp.com (Postfix) with ESMTPS id 1C52C1A016C; Thu, 18 Apr 2024 10:11:09 +0800 (CST) Received: from [10.67.110.112] (10.67.110.112) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 18 Apr 2024 10:11:08 +0800 Message-ID: Date: Thu, 18 Apr 2024 10:11:08 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH -next] cgroup: don't call cgroup1_pidlist_destroy_all() for v2 To: Tejun Heo , Xiu Jianfeng CC: , , , References: <20240417021359.883736-1-xiujianfeng@huaweicloud.com> Content-Language: en-US From: xiujianfeng In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500023.china.huawei.com (7.185.36.114) 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 >> >> 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 >> --- >> 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. >