Re: [PATCH] cgroup/cpuset: Properly disable partition when partition state switching fails

From: Waiman Long

Date: Tue Sep 29 2026 - 14:22:18 EST



On 9/29/26 12:42 PM, Tejun Heo wrote:
Hello,

On Tue, Sep 29, 2026 at 03:40:27PM +0800, Guopeng Zhang wrote:
However, after the parent is created, the ownership of full housekeeping
CPUs can still change, so passing the check at creation time doesn't seem
to guarantee that returning CPUs later is still safe.
I think any CPU under an isolated partition should count as isolated when
testing whether the system has a housekeeping CPU left, whether child
partitions carved some out or not. Those CPUs go back to the isolated
parent whenever the child partition is disabled or invalidated, so they
can't be counted on for housekeeping. In your example, making C isolated
would then fail.

I am now thinking about treating the whole user defined exclusive CPUs (exclusive_cpus or cpus) as wholly owned by the cpuset in question from the housekeeping check perspective.  That will require reworking the current housekeeping checking code and will require more extensive changes. So it will take some time before a patchset will be ready for review. This will prevent housekeeping check failure when a child partition is disabled and its CPU are moved back to its parent.

Cheers,
Longman