[PATCH RESEND -next 21/21] cpuset: Remove unnecessary validation in partition_cpus_change

Chen Ridong posted 21 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH RESEND -next 21/21] cpuset: Remove unnecessary validation in partition_cpus_change
Posted by Chen Ridong 1 month, 2 weeks ago
From: Chen Ridong <chenridong@huawei.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@huawei.com>
---
 kernel/cgroup/cpuset.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 23c0ad5ed37e..87decf96a577 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2311,16 +2311,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