cgroup/cpuset: Fix load balance state in update_partition_sd_lb()
authorWaiman Long <longman@redhat.com>
Tue, 5 Sep 2023 13:32:37 +0000 (09:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:58:53 +0000 (11:58 +0100)
commitd6e21bf76eadc0d56b7874a67bfb4186b1f5a0a1
tree0e43a2ac432ebb39e9a1fc664f05e62d9b2da572
parentc711e86388dc14f7b71029f31be9705c7d72cb46
cgroup/cpuset: Fix load balance state in update_partition_sd_lb()

[ Upstream commit 6fcdb0183bf024a70abccb0439321c25891c708d ]

Commit a86ce68078b2 ("cgroup/cpuset: Extract out CS_CPU_EXCLUSIVE
& CS_SCHED_LOAD_BALANCE handling") adds a new helper function
update_partition_sd_lb() to update the load balance state of the
cpuset. However the new load balance is determined by just looking at
whether the cpuset is a valid isolated partition root or not.  That is
not enough if the cpuset is not a valid partition root but its parent
is in the isolated state (load balance off). Update the function to
set the new state to be the same as its parent in this case like what
has been done in commit c8c926200c55 ("cgroup/cpuset: Inherit parent's
load balance state in v2").

Fixes: a86ce68078b2 ("cgroup/cpuset: Extract out CS_CPU_EXCLUSIVE & CS_SCHED_LOAD_BALANCE handling")
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