Re: [PATCH-next v2 3/3] cgroup/cpuset: Disallow CPU 0 from being used in isolated partition
From: Frederic Weisbecker
Date: Mon Nov 23 2026 - 16:39:05 EST
Le Sun, Nov 22, 2026 at 11:12:09PM -0500, Waiman Long a écrit :
> Domain isolating CPU 0 can be problematic and may even cause panic in
> some cases. In the near future, we are going to enable dynamic change to
> the nohz_full CPUs to include the CPUs that are in isolated partitions
> via the CPU hotplug mechanism. However, CPU 0 can't be made offline
> for some architectures like x86. IOW, putting CPU 0 in an isolated
> partition may not have the same degree of isolation than other CPUs
> in the isolated partition in the future. For all these reasons, it is
> better to disable its use in an isolated partition.
>
> Add a new partition error code to indicate to the users that CPU 0 cannot
> be used in an isolated partition. The prstate_housekeeping_conflict()
> function is modified to return the partition error code directly as it
> can be either PERR_HKEEPING or PERR_ISOLCPU0.
>
> Some existing test cases in test_cpuset_prs.sh are modified to remove
> the use of CPU 0 in isolated partition setup and explicit new test cases
> are added to test that. The NOHZ_FULL test cases also modified to run if
> the "nohz_full" parameters includes all the CPUs except CPU 1-7 instead
> of 0-7. Though it is not recommended to put CPU 0 in the nohz_full boot
> parameter, it is the only way we can test that the cpuset code is able to
> correctly disallow isolating the last nohz_full/domain housekeeping CPU.
>
> With CPU 0 likely not allowed in the nohz_full list except for powerpc
> and with CPU 0 also disallowed from being domain isolated and offline,
> we will likely have CPU 0 being an always present online housekeeping
> CPU for most kernels. For those kernels, we will not be able to trigger
> partition invalidation due to using up the last nohz_full/domain
> housekeeping CPU in an isolated partition and the NOHZ_FULL test cases
> in test_cpuset_prs.sh will not be run.
>
> The cgroup-v2.rst documentation file is also modified to indicate that
> CPU 0 cannot be used in an isolated partition.
>
> Signed-off-by: Waiman Long <longman@xxxxxxxxxx>
Acked-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
--
Frederic Weisbecker
SUSE Labs