Re: [RFC PATCH -v4 03/22] cpuset: generalize the validate_partition() interface

From: Ridong Chen

Date: Tue Nov 03 2026 - 08:18:08 EST




On 11/3/2026 6:25 PM, Guopeng Zhang wrote:


在 2026/11/1 19:41, Ridong Chen 写道:
From: Chen Ridong <chenridong@xxxxxxxxxx>

Refactor validate_partition() to take the parent partition, the new
partition root state, the new effective exclusive CPUs and the CPUs to
be deleted, instead of a trial cpuset. A NULL parent stands for a
remote partition, whose CPUs come from top_cpuset. This makes the
interface flexible enough to handle both local and remote partition
validation.

The housekeeping conflict check is folded into validate_partition(). It
is skipped when the parent is not a valid partition root, as @cs can't
be a valid local partition in that case.

Use the new interface for local partition enablement in
update_parent_effective_cpumask() and in partition_cpus_change(),
replacing the open-coded checks there. The order of the checks is now
the same for both paths: empty CPUs, housekeeping conflict, then no CPU
left for tasks.

Signed-off-by: Chen Ridong <chenridong@xxxxxxxxxx>

nit: is this old tag still needed?

Thanks,
Guopeng


Hi Guopeng,

Thanks for the review.

Yes, I think it is still needed. This patch was originally written
and posted while I was at Huawei, so it keeps the original author and
Signed-off-by, and the second Signed-off-by records that I am now
carrying and resubmitting it.

--
Best regards
Ridong