cgroup/cpuset: Extract out CS_CPU_EXCLUSIVE & CS_SCHED_LOAD_BALANCE handling
authorWaiman Long <longman@redhat.com>
Tue, 27 Jun 2023 14:35:01 +0000 (10:35 -0400)
committerTejun Heo <tj@kernel.org>
Mon, 10 Jul 2023 21:00:12 +0000 (11:00 -1000)
commita86ce68078b200a5dcc263da01154ee926c25188
tree882514d74b9228f92e8d33ce20494f2665c032c9
parentc8c926200c55454101f072a4b16c9ff5b8c9e56f
cgroup/cpuset: Extract out CS_CPU_EXCLUSIVE & CS_SCHED_LOAD_BALANCE handling

Extract out the setting of CS_CPU_EXCLUSIVE and CS_SCHED_LOAD_BALANCE
flags as well as the rebuilding of scheduling domains into the new
update_partition_exclusive() and update_partition_sd_lb() helper
functions to simplify the logic. The update_partition_exclusive()
helper is called mainly at the beginning of the caller, but it may be
called at the end too. The update_partition_sd_lb() helper is called
at the end of the caller.

This patch should reduce the chance that cpuset partition will end up
in an incorrect state.

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