diff options
author | Valentin Schneider <vschneid@redhat.com> | 2023-09-28 17:02:51 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-09-29 10:20:21 +0200 |
commit | 5fe7765997b139e2d922b58359dea181efe618f9 (patch) | |
tree | b5d83d3fb109f3043e0b34622f00b27acb453c57 /kernel/sched/debug.c | |
parent | 612f769edd06a6e42f7cd72425488e68ddaeef0a (diff) | |
download | linux-stable-5fe7765997b139e2d922b58359dea181efe618f9.tar.gz linux-stable-5fe7765997b139e2d922b58359dea181efe618f9.tar.bz2 linux-stable-5fe7765997b139e2d922b58359dea181efe618f9.zip |
sched/deadline: Make dl_rq->pushable_dl_tasks update drive dl_rq->overloaded
dl_rq->dl_nr_migratory is increased whenever a DL entity is enqueued and it has
nr_cpus_allowed > 1. Unlike the pushable_dl_tasks tree, dl_rq->dl_nr_migratory
includes a dl_rq's current task. This means a dl_rq can have a migratable
current, N non-migratable queued tasks, and be flagged as overloaded and have
its CPU set in the dlo_mask, despite having an empty pushable_tasks tree.
Make an dl_rq's overload logic be driven by {enqueue,dequeue}_pushable_dl_task(),
in other words make DL RQs only be flagged as overloaded if they have at
least one runnable-but-not-current migratable task.
o push_dl_task() is unaffected, as it is a no-op if there are no pushable
tasks.
o pull_dl_task() now no longer scans runqueues whose sole migratable task is
their current one, which it can't do anything about anyway.
It may also now pull tasks to a DL RQ with dl_nr_running > 1 if only its
current task is migratable.
Since dl_rq->dl_nr_migratory becomes unused, remove it.
RT had the exact same mechanism (rt_rq->rt_nr_migratory) which was dropped
in favour of relying on rt_rq->pushable_tasks, see:
612f769edd06 ("sched/rt: Make rt_rq->pushable_tasks updates drive rto_mask")
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Juri Lelli <juri.lelli@redhat.com>
Link: https://lore.kernel.org/r/20230928150251.463109-1-vschneid@redhat.com
Diffstat (limited to 'kernel/sched/debug.c')
-rw-r--r-- | kernel/sched/debug.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index c4253bd2dfb0..4580a450700e 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -745,7 +745,6 @@ void print_dl_rq(struct seq_file *m, int cpu, struct dl_rq *dl_rq) PU(dl_nr_running); #ifdef CONFIG_SMP - PU(dl_nr_migratory); dl_bw = &cpu_rq(cpu)->rd->dl_bw; #else dl_bw = &dl_rq->dl_bw; |