diff options
author | Waiman Long <[email protected]> | 2024-11-09 21:50:22 -0500 |
---|---|---|
committer | Tejun Heo <[email protected]> | 2024-11-12 09:07:09 -1000 |
commit | a040c351283e3ac75422621ea205b1d8d687e108 (patch) | |
tree | cefbd5aad992265a32ddb79d8329a2b60b9b5a63 /drivers/pwm/pwm-imx-tpm.c | |
parent | bcd7012afd7bcd45fcd7a0e2f48e57b273702317 (diff) |
cgroup/cpuset: Enforce at most one rebuild_sched_domains_locked() call per operation
Since commit ff0ce721ec21 ("cgroup/cpuset: Eliminate unncessary
sched domains rebuilds in hotplug"), there is only one
rebuild_sched_domains_locked() call per hotplug operation. However,
writing to the various cpuset control files may still casue more than
one rebuild_sched_domains_locked() call to happen in some cases.
Juri had found that two rebuild_sched_domains_locked() calls in
update_prstate(), one from update_cpumasks_hier() and another one from
update_partition_sd_lb() could cause cpuset partition to be created
with null total_bw for DL tasks. IOW, DL tasks may not be scheduled
correctly in such a partition.
A sample command sequence that can reproduce null total_bw is as
follows.
# echo Y >/sys/kernel/debug/sched/verbose
# echo +cpuset >/sys/fs/cgroup/cgroup.subtree_control
# mkdir /sys/fs/cgroup/test
# echo 0-7 > /sys/fs/cgroup/test/cpuset.cpus
# echo 6-7 > /sys/fs/cgroup/test/cpuset.cpus.exclusive
# echo root >/sys/fs/cgroup/test/cpuset.cpus.partition
Fix this double rebuild_sched_domains_locked() calls problem
by replacing existing calls with cpuset_force_rebuild() except
the rebuild_sched_domains_cpuslocked() call at the end of
cpuset_handle_hotplug(). Checking of the force_sd_rebuild flag is
now done at the end of cpuset_write_resmask() and update_prstate()
to determine if rebuild_sched_domains_locked() should be called or not.
The cpuset v1 code can still call rebuild_sched_domains_locked()
directly as double rebuild_sched_domains_locked() calls is not possible.
Reported-by: Juri Lelli <[email protected]>
Closes: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Waiman Long <[email protected]>
Tested-by: Juri Lelli <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-imx-tpm.c')
0 files changed, 0 insertions, 0 deletions