[RFC PATCH -v4 07/22] cpuset: use partition_enable() for remote partition enablement

From: Ridong Chen

Date: Sun Nov 01 2026 - 06:46:02 EST


From: Chen Ridong <chenridong@xxxxxxxxxx>

Now that the partition_enable() helper is available, replace the
existing implementation for remote partition enablement with this
centralized function to unify the enablement logic.

Signed-off-by: Chen Ridong <chenridong@xxxxxxxxxx>
Signed-off-by: Ridong Chen <chenridong@xxxxxxxxxx>
---
kernel/cgroup/cpuset.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 23ae548c3994..d7f9f6e1fa3c 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -1895,14 +1895,7 @@ static int remote_partition_enable(struct cpuset *cs, int new_prs,
if (prstate_housekeeping_conflict(new_prs, PRS_ROOT, tmp->new_cpus, NULL))
return PERR_HKEEPING;

- spin_lock_irq(&callback_lock);
- partition_xcpus_add(new_prs, NULL, tmp->new_cpus);
- cs->remote_partition = true;
- cpumask_copy(cs->effective_xcpus, tmp->new_cpus);
- spin_unlock_irq(&callback_lock);
- cpuset_force_rebuild();
- WRITE_ONCE(cs->prs_err, 0);
-
+ partition_enable(cs, NULL, new_prs, tmp->new_cpus);
/*
* Propagate changes in top_cpuset's effective_cpus down the hierarchy.
*/
--
2.34.1