All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] sched: Fix DL server starvation under core scheduling
@ 2026-11-12 16:15 Fernand Sieber
  2026-11-12 16:15 ` [PATCH 1/5] sched/core: Clear stale rq->dl_server when core-sched replaces a pick Fernand Sieber
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Fernand Sieber @ 2026-11-12 16:15 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Juri Lelli, Vincent Guittot,
	Shuah Khan
  Cc: Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Valentin Schneider, K Prateek Nayak, Daniel Bristot de Oliveira,
	Joel Fernandes, Josh Don, linux-kernel, linux-kselftest,
	nh-open-source, Fahad Mubeen, David Woodhouse, Misha Karataiev,
	Hendrik Borghorst, Ibrahim Elshahed, Fernand Sieber

Under core scheduling the class a DL server reserves CPU time for gets
almost nothing. With the default fair server (50 ms / 1 s), a CFS task
spinning on one SMT sibling beside a cookied SCHED_FIFO task on the
other measures 0.000% of its CPU instead of the reserved 5%. The ext
server starves sched_ext tasks the same way.

Two independent mechanisms are at fault. The core-wide selection
mishandles the rq->dl_server hand-off: a stale link is passed to idle
(which then forces the siblings idle and trips the forced-idle WARN), a
sibling's link is lost on the fast path, and picks are ranked before
p->dl_server is set (patches 1-3, Fixes: bd9bbc96e835). Independently,
a deferred server is charged its rq's forced-idle time, so its runtime
runs out while it is still throttled, replenish_dl_new_period() pushes
the activation a full period out, and the next period of forced idle
pushes it again (patch 4, Fixes: a110a81c52a9). Either fix alone leaves
the share at ~0%.

Patch 5 adds cs_dl_server_test to selftests/sched: a cookied FIFO
spinner on one sibling, an uncookied CFS spinner on the other, and a
check of the CFS share of that CPU against half the fair server's
reservation, 2.5% by default. Run under QEMU with -smp 4,cores=2,threads=2.

Over a 5 s window, plain tip fails 10/10 at 0.000%, and with the whole
series it passes 31/31 at 3.99-5.19%.

This series was prepared with the help of an AI coding assistant. I
have reviewed and tested all of it.

Fernand Sieber (5):
  sched/core: Clear stale rq->dl_server when core-sched replaces a pick
  sched/core: Keep a sibling's DL server link in the core-wide pick
  sched/core: Rank DL server picks as deadline in the core-wide pick
  sched/deadline: Don't charge core-sched forced idle to the DL servers
  selftests/sched: Add a core-sched forced-idle DL server test

 kernel/sched/core.c                           |  59 ++-
 kernel/sched/idle.c                           |   7 +
 kernel/sched/sched.h                          |  15 +
 tools/testing/selftests/sched/.gitignore      |   1 +
 tools/testing/selftests/sched/Makefile        |   4 +-
 tools/testing/selftests/sched/config          |   4 +-
 .../selftests/sched/cs_dl_server_test.c       | 402 ++++++++++++++++++
 7 files changed, 471 insertions(+), 21 deletions(-)
 create mode 100644 tools/testing/selftests/sched/cs_dl_server_test.c


base-commit: d7e670601af6c564ccf6d3b2ddf70ee4f41a6d1c
-- 
2.47.3




Amazon Development Centre (South Africa) (Proprietary) Limited
29 Gogosoa Street, Observatory, Cape Town, Western Cape, 7925, South Africa
Registration Number: 2004 / 034463 / 07


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-12 16:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 16:15 [PATCH 0/5] sched: Fix DL server starvation under core scheduling Fernand Sieber
2026-11-12 16:15 ` [PATCH 1/5] sched/core: Clear stale rq->dl_server when core-sched replaces a pick Fernand Sieber
2026-11-12 16:15 ` [PATCH 2/5] sched/core: Keep a sibling's DL server link in the core-wide pick Fernand Sieber
2026-11-12 16:15 ` [PATCH 3/5] sched/core: Rank DL server picks as deadline " Fernand Sieber
2026-11-12 16:15 ` [PATCH 4/5] sched/deadline: Don't charge core-sched forced idle to the DL servers Fernand Sieber
2026-11-12 16:15 ` [PATCH 5/5] selftests/sched: Add a core-sched forced-idle DL server test Fernand Sieber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.