Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2679255lqt; Mon, 22 Apr 2024 19:53:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXaFdlveaoG5HdC4PRxXFJDtv6FIKtqC/sT8Bue3YHex1rkobJWckhqh4W2iVqz4W7ZChfmbAXwBTRMI7htXclZRW4KHpVxFt2NJbxJ4w== X-Google-Smtp-Source: AGHT+IFCzfRVg89c6NaZ1NPQRjP8ZN0bfGwIt5POPk18m6//tCrZiOMYqNieGN8N29oa+PfSm0ZC X-Received: by 2002:a9d:76d9:0:b0:6eb:c4a4:9300 with SMTP id p25-20020a9d76d9000000b006ebc4a49300mr12197732otl.38.1713840789419; Mon, 22 Apr 2024 19:53:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713840789; cv=pass; d=google.com; s=arc-20160816; b=iRbDnce4U2RHY3Zy6Ozk0pCJCCCqGSVyYmhRFzS9GgK2g9VDdQ8X3mvhRKxe4kX4IV vlUkgWV9K9pfccUViUitREHeICzZ4MVDAdqEeDfxWyyrIIBbUkLT10xKQMBeMeKNgjKw UhzhrDz4/Fegxv3ioNlKq8Jh1zkJ/gbrzs0AzPa2RBX3pW6n1Vgg090rCpn4QFj0KwT+ O01U2oaUxcjNn4lgDSHaQmvP1x5CaWGqMbdGBuukSyhb4/a/+Q7HDKvdmsAktB591EAy 3EFYMN5RcPSgHKLYqRYIYf5LwLh5AWTcjU02y+Q5xmpzLQGsOMS5JIm343Fwp3nsKgkn 158g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=PJXKx1GePP+gda+fntv7dN7J7qmrC3DS1cZf+TdQFNY=; fh=GAsBSnfpf5FUVQQ6kd9dqsBkwIL387UZSVRwt6d+Yp8=; b=IEO56Q8uiDmm5FQemepZnZliTMtFVCm5bgmF9FHg5PuIYNOip88HDuJCk50EOWW62T taWqbfvNF62Hgnv42g82okyfJyN76Vt59qywosZRamOzCDaB5JWAY96ZX8bzJE1p1ISX n8A5ZnAxXMTkQ0HU9Y5qEhoQj2IJh5XuemVj2jyMCtpYKkdGwhRXcwh5qgX9YMYUNDF4 fjAIoog+In0aA8cPKaoxSlNNGCQNriaFbxaRofEhtxk2o25F+/TOPfX/slQCFfyl2C3u t0tFhMomxBpXPTDqyxRPDkCAxg7pKLe1OX7DmrWFZCXGPq6Ilo/Xavpt/87HNMT+lsaY UFhg==; 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-154434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154434-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c29-20020a630d1d000000b005f07f356d1asi8683384pgl.716.2024.04.22.19.53.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 19:53:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-154434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154434-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 54568B220F7 for ; Tue, 23 Apr 2024 02:51:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4905918659; Tue, 23 Apr 2024 02:51:18 +0000 (UTC) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) (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 3848117BD2; Tue, 23 Apr 2024 02:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.35 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713840677; cv=none; b=ghEtYNsZc8yXg9s3ZYaGwQHUmjxljgyioxK8x1XSJvN/CrMSPzZz6QKd5mTWsjBCqwTxAO0lP3D4lhzkyZGnQTx8725Wp2kJsItOZU7P2Z0T6/3K+5NpqFJ6kTe+8J/YC7/UW8VqnwrKL6m+p9TjdCBomjH+JKwx4NjSf9hN6zA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713840677; c=relaxed/simple; bh=yo4EegpD5LBqfXVY4c3Tp5+JOb8sTd/ERASSILbGP5k=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=COkIYGTD+jJ0wJl2075rRnXrBWt5VF2lXeOEF2vPEg/3ztjNQKVNO9R36iQ63YNTZ/8buXOkKn7o9HsJiChvWznffpIcbdyx93MKG3IeF2E6BTqLT6tjDsb9dednfrIHF2SZCf52cqvmekDrAEGy/l/+YVzIoPPG1XhZXbMrThA= 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.35 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 szxga07-in.huawei.com (SkyGuard) with ESMTP id 4VNmkw0qPrz1RChk; Tue, 23 Apr 2024 10:48:08 +0800 (CST) Received: from dggpeml500023.china.huawei.com (unknown [7.185.36.114]) by mail.maildlp.com (Postfix) with ESMTPS id 814A61A016C; Tue, 23 Apr 2024 10:51:11 +0800 (CST) Received: from hulk-vt.huawei.com (10.67.174.26) 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; Tue, 23 Apr 2024 10:51:11 +0800 From: Xiu Jianfeng To: , , , CC: , Subject: [PATCH v2 -next] cgroup/cpuset: Avoid clearing CS_SCHED_LOAD_BALANCE twice Date: Tue, 23 Apr 2024 02:44:39 +0000 Message-ID: <20240423024439.1064922-1-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500023.china.huawei.com (7.185.36.114) In cpuset_css_online(), CS_SCHED_LOAD_BALANCE will be cleared twice, the former one in the is_in_v2_mode() case could be removed because is_in_v2_mode() can be true for cgroup v1 if the "cpuset_v2_mode" mount option is specified, that balance flag change isn't appropriate for this particular case. Signed-off-by: Xiu Jianfeng --- v2: remove the one in is_in_v2_mode() case. --- kernel/cgroup/cpuset.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index d8d3439eda4e..bb9bf25889c9 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -4051,11 +4051,6 @@ static int cpuset_css_online(struct cgroup_subsys_state *css) cs->effective_mems = parent->effective_mems; cs->use_parent_ecpus = true; parent->child_ecpus_count++; - /* - * Clear CS_SCHED_LOAD_BALANCE if parent is isolated - */ - if (!is_sched_load_balance(parent)) - clear_bit(CS_SCHED_LOAD_BALANCE, &cs->flags); } /* -- 2.34.1