Re: [PATCH] cgroup/cpuset: prevent overlapping local and remote partition creation
From: Hui Peng
Date: Sun Sep 20 2026 - 04:23:45 EST
Hi Guopeng,
On Sun, Sep 20, 2026 at 02:30:23PM +0800, Guopeng Zhang wrote:
> Should this return PERR_NOCPUS instead?
>
> + if (cpumask_intersects(tmp->new_cpus, subpartitions_cpus))
> + return PERR_NOCPUS;
>
...
> Would using PERR_NOCPUS here be more appropriate? This would keep the
> initial remote-partition enable path consistent with the CPU update path
> for an existing remote partition, and it also seems to describe the
> failure more accurately: the CPU itself is not invalid, but has already
> been allocated to another partition, so the parent can no longer
> distribute it downstream.
Agreed, returning PERR_NOCPUS when tmp->new_cpus intersects
subpartitions_cpus is much more accurate and keeps remote_partition_enable()
consistent with remote_cpus_update(). I have updated this in v2.
Thanks,
Hui