]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cgroup/cpuset: Don't track # of local child partitions
authorWaiman Long <longman@redhat.com>
Mon, 20 Oct 2025 02:32:06 +0000 (22:32 -0400)
committerTejun Heo <tj@kernel.org>
Mon, 20 Oct 2025 17:01:48 +0000 (07:01 -1000)
commitd5cf4d34a3331aa1dba954949ea71b5eafcbf0a8
treefab365d7cbb2a3c89066873b5ae7bd085c2ecdfe
parent211ddde0823f1442e4ad052a2f30f050145ccada
cgroup/cpuset: Don't track # of local child partitions

The cpuset structure has a nr_subparts field which tracks the number
of child local partitions underneath a particular cpuset. Right now,
nr_subparts is only used in partition_is_populated() to avoid iteration
of child cpusets if the condition is right. So by always performing the
child iteration, we can avoid tracking the number of child partitions
and simplify the code a bit.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset-internal.h
kernel/cgroup/cpuset.c