[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251117024627.1128037-22-chenridong@huaweicloud.com>
Date: Mon, 17 Nov 2025 02:46:27 +0000
From: Chen Ridong <chenridong@...weicloud.com>
To: longman@...hat.com,
tj@...nel.org,
hannes@...xchg.org,
mkoutny@...e.com
Cc: cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org,
lujialin4@...wei.com,
chenridong@...wei.com
Subject: [PATCH -next 21/21] cpuset: Remove unnecessary validation in partition_cpus_change
From: Chen Ridong <chenridong@...wei.com>
When user-configured CPUs (including cpuset.cpus and cpuset.cpus.exclusive)
are modified, the partition may either be disabled or updated. Both local
and remote partitions update can fully validate their own validity: if the
validation fails, the partition will be disabled. Therefore, the
validationin partition_cpus_change is redundant and can be removed.
Signed-off-by: Chen Ridong <chenridong@...wei.com>
---
kernel/cgroup/cpuset.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index b795af41eff8..59c1592280b0 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2465,16 +2465,9 @@ static int cpus_allowed_validate_change(struct cpuset *cs, struct cpuset *trialc
static void partition_cpus_change(struct cpuset *cs, struct cpuset *trialcs,
struct tmpmasks *tmp)
{
- enum prs_errcode prs_err;
-
if (cs_is_member(cs))
return;
- prs_err = validate_partition(cs, trialcs->partition_root_state,
- trialcs->effective_xcpus, trialcs->effective_xcpus, NULL);
- if (prs_err)
- trialcs->prs_err = prs_err;
-
if (is_remote_partition(cs)) {
if (trialcs->prs_err)
remote_partition_disable(cs, trialcs->prs_err, tmp);
--
2.34.1
Powered by blists - more mailing lists