cgroup/cpuset: Inherit parent's load balance state in v2
authorWaiman Long <longman@redhat.com>
Tue, 27 Jun 2023 14:35:00 +0000 (10:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:42:49 +0000 (09:42 +0200)
commit8199a46af2ea7b65a0ad24db3fdee1b7034005c1
tree9fafcab45cf50f5635c906c770cc63a4df9a1732
parent590b45e5cd1202e81c691f5b66f21a2afd7dba0a
cgroup/cpuset: Inherit parent's load balance state in v2

[ Upstream commit c8c926200c55454101f072a4b16c9ff5b8c9e56f ]

Since commit f28e22441f35 ("cgroup/cpuset: Add a new isolated
cpus.partition type"), the CS_SCHED_LOAD_BALANCE bit of a v2 cpuset
can be on or off. The child cpusets of a partition root must have the
same setting as its parent or it may screw up the rebuilding of sched
domains. Fix this problem by making sure the a child v2 cpuset will
follows its parent cpuset load balance state unless the child cpuset
is a new partition root itself.

Fixes: f28e22441f35 ("cgroup/cpuset: Add a new isolated cpus.partition type")
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/cgroup/cpuset.c