sched/deadline: dl_server fixes from 6.19
Status from this message: Queued the series for 6.12, thanks.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | sched/deadline: Fix dl_server time accountingkernel/ kernel/ kernel/ +1 more | +33 | 0 replies | |
| 2/4 | sched/deadline: Fix dl_server stop conditioninclude/ kernel/ | +47 | 0 replies | |
| 3/4 | sched: Provide idle_rq() helperinclude/ kernel/ kernel/ | +29 | 0 replies | |
| 4/4 | sched/deadline: Fix server stopping with runnable taskskernel/ | +9 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 6.12.y 0/4] sched/deadline: dl_server fixes from 6.19
Hello,
This is the 6.12.y backport of the dl_server fixes discussed in the parent thread: on 6.12.y, the deferred fair server can run a SCHED_OTHER task ahead of SCHED_FIFO tasks on an almost idle CPU. The same four commits are requested for 6.18.y, where they cherry-pick cleanly.
Adaptations for 6.12 (noted in each patch):
- 1/4: rq->donor does not exist in 6.12, rq->curr is used.
- 3/4: rq->ttwu_pending only exists with CONFIG_SMP in 6.12.
- 4/4: context conflict in dl_server_start(), which still initializes the fair server in 6.12.
2/4 applies as is. The series builds and boots on v6.12.118 with the Debian 6.12 rt config (PREEMPT_RT).
Tests, KVM guest, reproducer from the parent thread (3 ms spin), sleep 1.00, 1.02 and 1.03 s, 90 s per run, late = FIFO wake-up later than 500 us:
v6.12.118 8 late wake-ups in 270 s, ~2900 us
v6.12.118 + this series 0 in 270 s, max 15 us
With the v6.12-rt queue on top (as Debian ships it), which makes the window much easier to hit, an equivalent backport (same code, the idle_rq() helper added without moving available_idle_cpu()) went from 14 to 15 late wake-ups per 30 s to 0.
Starvation check (SCHED_OTHER task on the CPU of a SCHED_FIFO 50 busy loop, 4.5 s window): 4.9% of the CPU with this series, 4.7% without, 0% with the fair_server runtime at 0.
Thanks,
Florent
Gabriele Monaco (1):
sched/deadline: Fix server stopping with runnable tasks
Peter Zijlstra (3):
sched/deadline: Fix dl_server time accounting
sched/deadline: Fix dl_server stop condition
sched: Provide idle_rq() helper
include/linux/sched.h | 16 ++++---- kernel/sched/deadline.c | 89 +++++++++++++++++++++++++++-------------- kernel/sched/fair.c | 9 +---- kernel/sched/idle.c | 16 +++++++- kernel/sched/sched.h | 31 +++++++++++++- kernel/sched/syscalls.c | 32 +-------------- 6 files changed, 116 insertions(+), 77 deletions(-)
base-commit: b869a5313cbfe7102873d3de318ddb68675146d0
Signature · 1 line
2.39.3 (Apple Git-146)