[PATCH 0/2] cgroup/cpuset: Limit v2 sibling checks to nonempty exclusive masks
From: Chuyi Zhou
Date: Wed Dec 02 2026 - 05:45:06 EST
This series follows up on "cgroup/cpuset: Skip sibling checks for v2
members without exclusive CPUs" [1]. On v2, validate_change() skips the
sibling walk only for members whose cpuset.cpus.exclusive stays empty.
Ridong pointed out that the walk can be skipped whenever the proposed
exclusive CPU mask is empty [2]. An empty mask cannot overlap a
sibling's exclusive CPUs or contain a sibling's nonempty allowed CPU
mask. Only the top cpuset is memory-exclusive on v2, and it has no
siblings.
Patch 1 skips the sibling walk for partition roots with an empty
explicit exclusive CPU mask and for cpusets that clear their mask.
Patch 2 separates the v1 CPU and memory checks from the v2 CPU checks
so the hierarchy is selected once before the sibling walk.
[1] https://lore.kernel.org/lkml/7b9ec8acd1d5fbc2e977ac08450aaf5de5952ce0.1796039668.git.zhouchuyi@xxxxxxxxxxxxx/
[2] https://lore.kernel.org/r/825c0c94-8565-4c4c-82c7-9c0f5872e6a9@xxxxxxxxx
Thanks,
Chuyi
Chuyi Zhou (2):
cgroup/cpuset: Skip v2 sibling checks with an empty exclusive CPU mask
cgroup/cpuset: Separate v1 and v2 sibling exclusivity checks
kernel/cgroup/cpuset-internal.h | 6 +--
kernel/cgroup/cpuset-v1.c | 36 +++++++++----
kernel/cgroup/cpuset.c | 90 +++++++++++++--------------------
3 files changed, 62 insertions(+), 70 deletions(-)
base-commit: d2184674694f407e88b378f1f99b88d20e01d9da
--
2.20.1