]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cpuset: Remove unnecessary checks in rebuild_sched_domains_locked
authorChen Ridong <chenridong@huawei.com>
Wed, 26 Nov 2025 09:11:58 +0000 (09:11 +0000)
committerTejun Heo <tj@kernel.org>
Mon, 8 Dec 2025 19:02:42 +0000 (09:02 -1000)
commit6ee43047e8ada63c4dfee01e2ea7e7eadfcda2ab
treea3085b2a5332e310fb23fffe3f6e86ce3d0a2e5a
parent82d7e59ea707b55dc6c3ba3c56ded36742741bd4
cpuset: Remove unnecessary checks in rebuild_sched_domains_locked

Commit 406100f3da08 ("cpuset: fix race between hotplug work and later CPU
offline") added a check for empty effective_cpus in partitions for cgroup
v2. However, this check did not account for remote partitions, which were
introduced later.

After commit 2125c0034c5d ("cgroup/cpuset: Make cpuset hotplug processing
synchronous"), cpuset hotplug handling is now synchronous. This eliminates
the race condition with subsequent CPU offline operations that the original
check aimed to fix.

Instead of extending the check to support remote partitions, this patch
removes all the redundant effective_cpus check. Additionally, it adds a
check and warning to verify that all generated sched domains consist of
active CPUs, preventing partition_sched_domains from being invoked with
offline CPUs.

Signed-off-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c