From nobody Sun Feb 8 20:27:31 2026 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (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 2475B33121E; Tue, 11 Nov 2025 13:39:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762868376; cv=none; b=e5xYctIHV1gr9/E5D133qoR+wR6759UxflPaNOrsXOp2u1Ec3AxwR88m9dudTvr/hPsNdjxdz1wKvZHOq5WDa/R/pejvu7O3SDZ2D0lDw2fPZouFfvXQg46LT/Nb1+xfVHg0chCVK0V437UGlWhAxHq8QlGWVV0J5I3hAZXO8vA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762868376; c=relaxed/simple; bh=uCfWoPN8J85W8IJ1RDl6gTNYyFDWCaJAL4I8xCrPM+I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=EJJHEdb5C85UmK86tY2ZLlSSTq9eMLSXM384bYMmzbeWpW5I+Q12GBFWcqFv2RwCur9Cnu1wQHkrW0A5LCdOevhRArFSdDj8CNRtl5OZg9JrVibd5kCwWnTlm0bq5qoFYHg0q32EAAnsmeVWHY3SzsmfMerXmR3t1HfpBH0g9dQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTPS id 4d5SLV2B2lzKHM0R; Tue, 11 Nov 2025 21:39:14 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 6D3E11A0B97; Tue, 11 Nov 2025 21:39:30 +0800 (CST) Received: from hulk-vt.huawei.com (unknown [10.67.174.121]) by APP4 (Coremail) with SMTP id gCh0CgBXgF2EPBNpML6FAQ--.14435S3; Tue, 11 Nov 2025 21:39:30 +0800 (CST) From: Chen Ridong To: longman@redhat.com, tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, lujialin4@huawei.com, chenridong@huawei.com Subject: [PATCH -next v2 1/3] cpuset: simplify node setting on error Date: Tue, 11 Nov 2025 13:24:27 +0000 Message-Id: <20251111132429.950343-2-chenridong@huaweicloud.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251111132429.950343-1-chenridong@huaweicloud.com> References: <20251111132429.950343-1-chenridong@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: gCh0CgBXgF2EPBNpML6FAQ--.14435S3 X-Coremail-Antispam: 1UD129KBjvJXoW7tw1kur43CrW3ZFy5JF17GFg_yoW8Ww1UpF W7G3WUArW5Jry3G395J39xWFyqg348JF9rGFnFqa4fCasFyF9FkF1DXwnFyFW7JasxCF15 JF4SyFW8uF9rt37anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9Kb4IE77IF4wAFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGw A2048vs2IY020Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMc Ij6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_ Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr4 1l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK 67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI 8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAv wI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14 v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU7qjgUUUUU X-CM-SenderInfo: hfkh02xlgr0w46kxt4xhlfz01xgou0bp/ From: Chen Ridong There is no need to jump to the 'done' label upon failure, as no cleanup is required. Return the error code directly instead. Signed-off-by: Chen Ridong Reviewed-by: Waiman Long Reviewed-by: Michal Koutn=C3=BD --- kernel/cgroup/cpuset.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 8238fd8c0c29..c90476d52f09 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2897,21 +2897,19 @@ static int update_nodemask(struct cpuset *cs, struc= t cpuset *trialcs, */ retval =3D nodelist_parse(buf, trialcs->mems_allowed); if (retval < 0) - goto done; + return retval; =20 if (!nodes_subset(trialcs->mems_allowed, - top_cpuset.mems_allowed)) { - retval =3D -EINVAL; - goto done; - } + top_cpuset.mems_allowed)) + return -EINVAL; + + /* No change? nothing to do */ + if (nodes_equal(cs->mems_allowed, trialcs->mems_allowed)) + return 0; =20 - if (nodes_equal(cs->mems_allowed, trialcs->mems_allowed)) { - retval =3D 0; /* Too easy - nothing to do */ - goto done; - } retval =3D validate_change(cs, trialcs); if (retval < 0) - goto done; + return retval; =20 check_insane_mems_config(&trialcs->mems_allowed); =20 @@ -2921,8 +2919,7 @@ static int update_nodemask(struct cpuset *cs, struct = cpuset *trialcs, =20 /* use trialcs->mems_allowed as a temp variable */ update_nodemasks_hier(cs, &trialcs->mems_allowed); -done: - return retval; + return 0; } =20 bool current_cpuset_is_being_rebound(void) --=20 2.34.1 From nobody Sun Feb 8 20:27:31 2026 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) (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 1E40831BC82; Tue, 11 Nov 2025 13:39:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762868375; cv=none; b=gungtp9JpuOhkuZFG+b8ecT/zqZiKuLBdsKgicE0S7jHp2SdjQ7gc4UrBHnL/MoRVBP39UK9IMr22vL+HSpCH19npvlfGNNNGG+Vy8pgIhPwOmCbG/xVEx1lCB4MMrq4O9zVwHt0P69C02t37tEX4PBHQeN8VXgcVu2mKpfE1+s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762868375; c=relaxed/simple; bh=vDeFJjPaqNu9AzI1Ua5NHaSJ+NS89tf72O3NKbu8X+Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=geVLOomsLsiNAreDLdT40rXBClgx5/1vQaIaYzwxFu9c09fH00iR16y5CzEsa0qSND+Gpw5c3wXWtaUURRI754O1zax364ZcxjxdxJuEshnXySCV0dOOtP3QCF3aFJpNwo9w/Es2fwNfehszBvy4YnUvx1R0Bu+zB34j43tO7Go= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4d5SLH4tFTzYQtyb; Tue, 11 Nov 2025 21:39:03 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 7CC981A07C0; Tue, 11 Nov 2025 21:39:30 +0800 (CST) Received: from hulk-vt.huawei.com (unknown [10.67.174.121]) by APP4 (Coremail) with SMTP id gCh0CgBXgF2EPBNpML6FAQ--.14435S4; Tue, 11 Nov 2025 21:39:30 +0800 (CST) From: Chen Ridong To: longman@redhat.com, tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, lujialin4@huawei.com, chenridong@huawei.com Subject: [PATCH -next v2 2/3] cpuset: remove global remote_children list Date: Tue, 11 Nov 2025 13:24:28 +0000 Message-Id: <20251111132429.950343-3-chenridong@huaweicloud.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251111132429.950343-1-chenridong@huaweicloud.com> References: <20251111132429.950343-1-chenridong@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: gCh0CgBXgF2EPBNpML6FAQ--.14435S4 X-Coremail-Antispam: 1UD129KBjvJXoWxAFyxJr15WryfCF4rJF4ktFb_yoWrAF1kpF 1DCF4xGFWUtr15Ca47JFs7u3s3Kwn7JFW7Kw13X34fAF13Za4qkFyjk398Aa4jvrykWry5 ZFs093yxZ3ZrAFUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9Kb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUXw A2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMc Ij6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_ Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr4 1l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK 67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI 8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAv wI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14 v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUcTmhUUUUU X-CM-SenderInfo: hfkh02xlgr0w46kxt4xhlfz01xgou0bp/ From: Chen Ridong The remote_children list is used to track all remote partitions attached to a cpuset. However, it serves no other purpose. Using a boolean flag to indicate whether a cpuset is a remote partition is a more direct approach, making remote_children unnecessary. This patch replaces the list with a remote_partition flag in the cpuset structure and removes remote_children entirely. Signed-off-by: Chen Ridong Reviewed-by: Waiman Long --- kernel/cgroup/cpuset-internal.h | 10 +++++++--- kernel/cgroup/cpuset.c | 13 ++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/kernel/cgroup/cpuset-internal.h b/kernel/cgroup/cpuset-interna= l.h index 5cac42c5fd97..01976c8e7d49 100644 --- a/kernel/cgroup/cpuset-internal.h +++ b/kernel/cgroup/cpuset-internal.h @@ -158,6 +158,13 @@ struct cpuset { /* partition root state */ int partition_root_state; =20 + /* + * Whether cpuset is a remote partition. + * It used to be a list anchoring all remote partitions =E2=80=94 we can = switch back + * to a list if we need to iterate over the remote partitions. + */ + bool remote_partition; + /* * number of SCHED_DEADLINE tasks attached to this cpuset, so that we * know when to rebuild associated root domain bandwidth information. @@ -172,9 +179,6 @@ struct cpuset { /* Handle for cpuset.cpus.partition */ struct cgroup_file partition_file; =20 - /* Remote partition silbling list anchored at remote_children */ - struct list_head remote_sibling; - /* Used to merge intersecting subsets for generate_sched_domains */ struct uf_node node; }; diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index c90476d52f09..aff3ddc67393 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -94,9 +94,6 @@ static bool isolated_cpus_updating; static cpumask_var_t boot_hk_cpus; static bool have_boot_isolcpus; =20 -/* List of remote partition root children */ -static struct list_head remote_children; - /* * A flag to force sched domain rebuild at the end of an operation. * It can be set in @@ -219,7 +216,7 @@ static struct cpuset top_cpuset =3D { BIT(CS_MEM_EXCLUSIVE) | BIT(CS_SCHED_LOAD_BALANCE), .partition_root_state =3D PRS_ROOT, .relax_domain_level =3D -1, - .remote_sibling =3D LIST_HEAD_INIT(top_cpuset.remote_sibling), + .remote_partition =3D false, }; =20 /* @@ -1572,7 +1569,7 @@ static int compute_trialcs_excpus(struct cpuset *tria= lcs, struct cpuset *cs) =20 static inline bool is_remote_partition(struct cpuset *cs) { - return !list_empty(&cs->remote_sibling); + return cs->remote_partition; } =20 static inline bool is_local_partition(struct cpuset *cs) @@ -1621,7 +1618,7 @@ static int remote_partition_enable(struct cpuset *cs,= int new_prs, =20 spin_lock_irq(&callback_lock); partition_xcpus_add(new_prs, NULL, tmp->new_cpus); - list_add(&cs->remote_sibling, &remote_children); + cs->remote_partition =3D true; cpumask_copy(cs->effective_xcpus, tmp->new_cpus); spin_unlock_irq(&callback_lock); update_isolation_cpumasks(); @@ -1651,7 +1648,7 @@ static void remote_partition_disable(struct cpuset *c= s, struct tmpmasks *tmp) WARN_ON_ONCE(!cpumask_subset(cs->effective_xcpus, subpartitions_cpus)); =20 spin_lock_irq(&callback_lock); - list_del_init(&cs->remote_sibling); + cs->remote_partition =3D false; partition_xcpus_del(cs->partition_root_state, NULL, cs->effective_xcpus); if (cs->prs_err) cs->partition_root_state =3D -cs->partition_root_state; @@ -3603,7 +3600,6 @@ cpuset_css_alloc(struct cgroup_subsys_state *parent_c= ss) __set_bit(CS_SCHED_LOAD_BALANCE, &cs->flags); fmeter_init(&cs->fmeter); cs->relax_domain_level =3D -1; - INIT_LIST_HEAD(&cs->remote_sibling); =20 /* Set CS_MEMORY_MIGRATE for default hierarchy */ if (cpuset_v2()) @@ -3874,7 +3870,6 @@ int __init cpuset_init(void) nodes_setall(top_cpuset.effective_mems); =20 fmeter_init(&top_cpuset.fmeter); - INIT_LIST_HEAD(&remote_children); =20 BUG_ON(!alloc_cpumask_var(&cpus_attach, GFP_KERNEL)); =20 --=20 2.34.1 From nobody Sun Feb 8 20:27:31 2026 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (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 246DB328277; Tue, 11 Nov 2025 13:39:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762868376; cv=none; b=sm5PWBEZMrdk0uXuJWT4JbzqlaQP3Pa7rT1xRcu2+yWN/Vl/d7tFkMw1RrxvoNkKUzs/svoXdYKKUdmrVi68GQUODkfOAdKXJEg5j4L30EMv3IyTy8x5og78hOokrpTzYGAegcZ5orGDbUd1ISQ4Xz+AYFBeiizJsScoSD5sXiw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762868376; c=relaxed/simple; bh=pwVxCRUPp5+Zn44tSgim/k9yo2MGA/pWe1cXTxwMLKg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=co+9JBz5UEv+y6TeSjqIvZJUbnHqZpCQTYCTgnKUW+wv/GBGcuCet6GcBsfCmW60pk1+BdnK83fUnEbZs+Sn44TiV3rYnMGzdGJu0UPqwSF6YH7F+izj3WWHfzTCxpj4K9vi/H9deb83rH4Si4guTvnr0UiCh7XVQOcIGiCGz7M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTPS id 4d5SLV2zLnzKHMLB; Tue, 11 Nov 2025 21:39:14 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 8AC1A1A0B89; Tue, 11 Nov 2025 21:39:30 +0800 (CST) Received: from hulk-vt.huawei.com (unknown [10.67.174.121]) by APP4 (Coremail) with SMTP id gCh0CgBXgF2EPBNpML6FAQ--.14435S5; Tue, 11 Nov 2025 21:39:30 +0800 (CST) From: Chen Ridong To: longman@redhat.com, tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, lujialin4@huawei.com, chenridong@huawei.com Subject: [PATCH -next v2 3/3] cpuset: remove need_rebuild_sched_domains Date: Tue, 11 Nov 2025 13:24:29 +0000 Message-Id: <20251111132429.950343-4-chenridong@huaweicloud.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251111132429.950343-1-chenridong@huaweicloud.com> References: <20251111132429.950343-1-chenridong@huaweicloud.com> 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-CM-TRANSID: gCh0CgBXgF2EPBNpML6FAQ--.14435S5 X-Coremail-Antispam: 1UD129KBjvJXoW7KrW5tryDWFWkGF4DWF4rKrg_yoW8GrWrpF 1Duayjqayjqr1Uuw4DAay7Zr9aka9Fvr9rtas8G3sYqF17t3W2g3Wjg3W3Jr9I9rn7CF17 AFnF9w42qF10yrJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9Kb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUWw A2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMc Ij6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_ Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr4 1l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK 67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI 8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAv wI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14 v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUwhFxUUUUU X-CM-SenderInfo: hfkh02xlgr0w46kxt4xhlfz01xgou0bp/ Content-Type: text/plain; charset="utf-8" From: Chen Ridong Previously, update_cpumasks_hier() used need_rebuild_sched_domains to decide whether to invoke rebuild_sched_domains_locked(). Now that rebuild_sched_domains_locked() only sets force_rebuild, the flag is redundant. Hence, remove it. Signed-off-by: Chen Ridong Reviewed-by: Waiman Long --- kernel/cgroup/cpuset.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index aff3ddc67393..daf813386260 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2184,7 +2184,6 @@ static void update_cpumasks_hier(struct cpuset *cs, s= truct tmpmasks *tmp, { struct cpuset *cp; struct cgroup_subsys_state *pos_css; - bool need_rebuild_sched_domains =3D false; int old_prs, new_prs; =20 rcu_read_lock(); @@ -2348,15 +2347,12 @@ static void update_cpumasks_hier(struct cpuset *cs,= struct tmpmasks *tmp, if (!cpumask_empty(cp->cpus_allowed) && is_sched_load_balance(cp) && (!cpuset_v2() || is_partition_valid(cp))) - need_rebuild_sched_domains =3D true; + cpuset_force_rebuild(); =20 rcu_read_lock(); css_put(&cp->css); } rcu_read_unlock(); - - if (need_rebuild_sched_domains) - cpuset_force_rebuild(); } =20 /** --=20 2.34.1