Re: [PATCH v12 00/43] sched/deadline: bandwidth accounting fixes and selftests

From: Juri Lelli

Date: Mon Nov 30 2026 - 12:15:58 EST


Hello,

On 27/11/26 09:35, Mathieu Desnoyers wrote:
> Hi Ingo, Juri,
>
> This series fixes bugs of SCHED_DEADLINE in 35 patches. It applies on
> top of the first series [1], with its updated patch 10 [2]. This is
> v12. The changes since v11 are at the end.

Thanks for the respin, and for the quick turnaround on 23 and 27!

To set expectations: I have roughly a week's worth of work left before
the holiday break :)), and I'll probably spend it on what looks highest
priority, the crash and hang fixes (23, 27, and 20 with them) plus 25
and 26 for the first series. I'm not sure I'll get to the rest before
January, so feel free to keep iterating, but expect slower (or no :P)
feedback from me until then. Having the pressing fixes at the top of the
next version, as you plan for 23 and 27, already helps a lot!

Some high level impressions on the rest, FWIW.

The rtmutex/PI part makes me a bit nervous. Beyond the memory safety and
hang fixes, it grows DEADLINE PI quite a bit (held boosts, donor
periods, an irq_work calling rt_mutex_setprio() from hard irq context),
while proxy execution is meant to replace this code. I'd rather keep
changes there to what is needed for correctness and weigh the rest
against that, and it will need Peter's and Thomas' eyes anyway. 22 also
looks like an old RT priority bug that might be worth sending out
separately?

On the accounting side, I've been playing with a different approach:
keep the bandwidth of each task in a per-CPU sum (on the CPU recorded
with it), so that a rebuild only sums the CPUs of each root domain. It
visits no tasks, keeps departed tasks for free, and seems to remove a
good part of the departed list, dl_bw_gen and attach bookkeeping. It's
still WIP; I'll try to post it as an RFC, most likely in January, so
that we can compare, if you are up for it?

...

> Ingo, Juri, a question on patches 25 and 26. Would you rather have
> them in the first series, after its patch 10?

Either way works for me, as long as they come right after it: as I said
on 25, at the top of the next version (with 23 and 27) is fine too. I
think 26 first needs a fix for the race Sashiko reported (its first two
findings on 26 look right to me).

> Peter, Juri, a question on patch 37. Would you take a follow-up for
> tasks with an implicit deadline?

I think so, it's what the XXX in sched_dl_overflow() asks for.

> Peter, Juri, a question on patch 37. It is large: it adds about 600
> lines. It is one rule, applied in several places that depend on each
> other, so I kept it whole. Would you like it split?

I'd find it easier to review split, yes. The period_start /
dl_next_period() part, for instance, looks like it could stand alone.

Thanks a lot!
Juri