diff options
author | Valentin Schneider <vschneid@redhat.com> | 2023-08-11 12:20:44 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-09-25 10:25:29 +0200 |
commit | 612f769edd06a6e42f7cd72425488e68ddaeef0a (patch) | |
tree | 4bbd52c2071b974710ae085124491ab733bd82a9 /kernel/sched/debug.c | |
parent | 3eafe225995c67f8c179011ec2d6e4c12b32a53d (diff) | |
download | linux-612f769edd06a6e42f7cd72425488e68ddaeef0a.tar.gz linux-612f769edd06a6e42f7cd72425488e68ddaeef0a.tar.bz2 linux-612f769edd06a6e42f7cd72425488e68ddaeef0a.zip |
sched/rt: Make rt_rq->pushable_tasks updates drive rto_mask
Sebastian noted that the rto_push_work IRQ work can be queued for a CPU
that has an empty pushable_tasks list, which means nothing useful will be
done in the IPI other than queue the work for the next CPU on the rto_mask.
rto_push_irq_work_func() only operates on tasks in the pushable_tasks list,
but the conditions for that irq_work to be queued (and for a CPU to be
added to the rto_mask) rely on rq_rt->nr_migratory instead.
nr_migratory is increased whenever an RT task entity is enqueued and it has
nr_cpus_allowed > 1. Unlike the pushable_tasks list, nr_migratory includes a
rt_rq's current task. This means a rt_rq can have a migratible current, N
non-migratible queued tasks, and be flagged as overloaded / have its CPU
set in the rto_mask, despite having an empty pushable_tasks list.
Make an rt_rq's overload logic be driven by {enqueue,dequeue}_pushable_task().
Since rt_rq->{rt_nr_migratory,rt_nr_total} become unused, remove them.
Note that the case where the current task is pushed away to make way for a
migration-disabled task remains unchanged: the migration-disabled task has
to be in the pushable_tasks list in the first place, which means it has
nr_cpus_allowed > 1.
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20230811112044.3302588-1-vschneid@redhat.com
Diffstat (limited to 'kernel/sched/debug.c')
-rw-r--r-- | kernel/sched/debug.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 5e34a8cb2c76..c4253bd2dfb0 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -724,9 +724,6 @@ void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq) SEQ_printf(m, " .%-30s: %Ld.%06ld\n", #x, SPLIT_NS(rt_rq->x)) PU(rt_nr_running); -#ifdef CONFIG_SMP - PU(rt_nr_migratory); -#endif P(rt_throttled); PN(rt_time); PN(rt_runtime); |