Re: [PATCH v5 26/29] sched/debug: Show the deadline bandwidth of each runqueue

From: Juri Lelli

Date: Thu Nov 12 2026 - 05:41:12 EST


Hello,

On 08/11/26 13:54, Mathieu Desnoyers wrote:
> For each CPU, sched_debug prints the deadline bandwidth of its root
> domain. It does not print the two sums of its runqueue. this_bw is the
> bandwidth of the deadline tasks assigned to the CPU. running_bw is the
> part of it that belongs to active tasks.
>
> GRUB reclaiming depends on both sums. grub_reclaim() takes this_bw -
> running_bw as the inactive bandwidth of the CPU. The more inactive
> bandwidth, the slower a reclaiming task uses up its runtime.
>
> The kernel warns when a sum wraps around, and when running_bw exceeds
> this_bw. Bandwidth left behind in this_bw triggers no warning.
>
> Print both sums. The deadline_bw_test selftest added later in this
> series reads this_bw in its params_waking and random_mix cases. It
> checks that this_bw is back to its first value once their tasks are
> gone.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
> ---
> kernel/sched/debug.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
> index e0d6cd3bd607..3dbe1d7d2d77 100644
> --- a/kernel/sched/debug.c
> +++ b/kernel/sched/debug.c
> @@ -1174,6 +1174,8 @@ void print_dl_rq(struct seq_file *m, int cpu, struct dl_rq *dl_rq)
> SEQ_printf(m, " .%-30s: %lu\n", #x, (unsigned long)(dl_rq->x))
>
> PU(dl_nr_running);
> + PU(running_bw);
> + PU(this_bw);

OK, but we will still not printing additional useful information like
extra_bw, etc. Not sure if you are aware of tools/sched/dl_bw_dump.py
drgn script; maybe that is already useful for the needed additional
debugging information?

Thanks,
Juri