All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] sched/deadline: Fix assorted dl_bw accounting bugs
@ 2026-11-03 11:26 Juri Lelli
  2026-11-03 11:26 ` [PATCH 1/4] sched/deadline: Fix stale root domain in cpuset bandwidth transfer Juri Lelli
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Juri Lelli @ 2026-11-03 11:26 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	K Prateek Nayak, Luca Abeni
  Cc: linux-kernel, Tejun Heo, Weiheng Qiu, Ingo Molnar, Juri Lelli

This series fixes several SCHED_DEADLINE bandwidth accounting bugs that
can cause total_bw to leak or underflow, eventually blocking new
SCHED_DEADLINE admissions and CPU offlining with -EBUSY.

Patch 1 fixes stale root domain lookups during cpuset bandwidth
transfers for sleeping tasks, by using the task's cpus_mask instead of
the potentially stale task_rq(p)->rd.

Patch 2 fixes a total_bw leak when switching a non-queued task away
from SCHED_DEADLINE, where neither switched_from_dl() nor the inactive
timer would release the reserved bandwidth.

Patch 3 rejects the contradictory combination of SCHED_FLAG_KEEP_PARAMS
with a policy change that would switch the scheduling class, which
corrupts bandwidth accounting via spurious switched_from_dl() calls.

Patch 4 rejects sched_setattr(SCHED_DEADLINE) on exited (zombie) tasks,
which charge total_bw but never release it since the task will not run
again.

Series also available at

https://github.com/jlelli/linux.git b4/sched-dl-bw-fixes

Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
---
Juri Lelli (4):
      sched/deadline: Fix stale root domain in cpuset bandwidth transfer
      sched/deadline: Fix total_bw leak when switching away from SCHED_DEADLINE while !queued
      sched: Reject SCHED_FLAG_KEEP_PARAMS when it would change scheduling class
      sched/deadline: Reject SCHED_DEADLINE on exited tasks

 kernel/sched/deadline.c | 63 ++++++++++++++++++++++++++++++++++++++-----------
 kernel/sched/syscalls.c | 23 +++++++++++++++++-
 2 files changed, 71 insertions(+), 15 deletions(-)
---
base-commit: b99b7f60c5b473d374c68b53753153b4aa9e0702
change-id: 20261103-b4-sched-dl-bw-fixes-9b921aa91b71

Best regards,
--  
Juri Lelli <juri.lelli@redhat.com>


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

end of thread, other threads:[~2026-11-05 11:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 11:26 [PATCH 0/4] sched/deadline: Fix assorted dl_bw accounting bugs Juri Lelli
2026-11-03 11:26 ` [PATCH 1/4] sched/deadline: Fix stale root domain in cpuset bandwidth transfer Juri Lelli
2026-11-03 13:26   ` [tip: sched/urgent] " tip-bot2 for Juri Lelli
2026-11-05 10:20   ` [PATCH 1/4] " Marek Szyprowski
2026-11-05 10:38     ` Juri Lelli
2026-11-05 11:16       ` Marek Szyprowski
2026-11-05 11:22       ` Ingo Molnar
2026-11-05 11:32         ` Juri Lelli
2026-11-03 11:26 ` [PATCH 2/4] sched/deadline: Fix total_bw leak when switching away from SCHED_DEADLINE while !queued Juri Lelli
2026-11-03 13:26   ` [tip: sched/urgent] " tip-bot2 for Juri Lelli
2026-11-03 11:26 ` [PATCH 3/4] sched: Reject SCHED_FLAG_KEEP_PARAMS when it would change scheduling class Juri Lelli
2026-11-03 13:26   ` [tip: sched/urgent] " tip-bot2 for Juri Lelli
2026-11-03 11:26 ` [PATCH 4/4] sched/deadline: Reject SCHED_DEADLINE on exited tasks Juri Lelli
2026-11-03 13:25   ` [tip: sched/urgent] " tip-bot2 for Juri Lelli

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.