From nobody Tue Feb 10 15:44:54 2026 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: quoted-printable X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500023.china.huawei.com (7.185.36.114) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Waiman Long --- 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_st= ate *css) cs->effective_mems =3D parent->effective_mems; cs->use_parent_ecpus =3D 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); } =20 /* --=20 2.34.1