Re: [PATCH-next 4/6] cgroup/cpuset: Minor fixes to prstate_housekeeping_conflict()

From: Guopeng Zhang

Date: Thu Oct 22 2026 - 10:26:13 EST




在 2026/10/22 11:16, Waiman Long 写道:
> Commit 9527ff78a413 ("group/cpuset: Consider all the exclusive CPUs when
> doing housekeeping check") changes the way prstate_housekeeping_conflict()
> is being used by considering all the exclusive xcpus to be owned by the
> partition when doing housekeeping check. However there are two minor
> issues reported by sashiko with that patch:
>
> 1) In partition_cpus_change(), prstate_housekeeping_conflict() can
> be called with an invalid partition root. In that case, there are
> no isolated CPUs that are going to be returned back to the system to
> become housekeeping CPUs, so the calculation of the del_cpus cpumask
> is meaningless.
>
> 2) The checking of del_cpus in prstate_housekeeping_conflict() to see
> if it can contain an active housekeeping CPU that can be returned to the
> system ignores the fact that an active CPU not in HK_TYPE_DOMAIN_BOOT HK
> cpumask will not become an active housekeeping CPU when it is released
> by an isolated partition.
>
> Update the existing code to handle these two issues properly to make
> prstate_housekeeping_conflict() produce more accurate result.
>
> Fixes: 9527ff78a413 ("group/cpuset: Consider all the exclusive CPUs when doing housekeeping check")

One trivial nit: the commit message says "group/cpuset" (missing 'c') in
two places, including the Fixes: line.

Thanks,
Guopeng