diff options
author | 2024-11-14 14:28:10 +0000 | |
---|---|---|
committer | 2024-12-02 12:01:31 +0100 | |
commit | d4742f6ed7ea6df56e381f82ba4532245fa1e561 (patch) | |
tree | c2f00910af7ccf10fc76da69c022d39870efe1db /kernel/sched/core.c | |
parent | sched/deadline: Restore dl_server bandwidth on non-destructive root domain changes (diff) | |
download | wireguard-linux-d4742f6ed7ea6df56e381f82ba4532245fa1e561.tar.xz wireguard-linux-d4742f6ed7ea6df56e381f82ba4532245fa1e561.zip |
sched/deadline: Correctly account for allocated bandwidth during hotplug
For hotplug operations, DEADLINE needs to check that there is still enough
bandwidth left after removing the CPU that is going offline. We however
fail to do so currently.
Restore the correct behavior by restructuring dl_bw_manage() a bit, so
that overflow conditions (not enough bandwidth left) are properly
checked. Also account for dl_server bandwidth, i.e. discount such
bandwidth in the calculation since NORMAL tasks will be anyway moved
away from the CPU as a result of the hotplug operation.
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Phil Auld <pauld@redhat.com>
Tested-by: Waiman Long <longman@redhat.com>
Link: https://lore.kernel.org/r/20241114142810.794657-3-juri.lelli@redhat.com
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 4ffaef81db42..29f6b2475fdb 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8185,7 +8185,7 @@ static void cpuset_cpu_active(void) static int cpuset_cpu_inactive(unsigned int cpu) { if (!cpuhp_tasks_frozen) { - int ret = dl_bw_check_overflow(cpu); + int ret = dl_bw_deactivate(cpu); if (ret) return ret; |