The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] sched: Fix SCHED_FLAG_KEEP_PARAMS side effects
@ 2026-07-30  5:50 Andrea Righi
  2026-07-30  5:50 ` [PATCH 1/2] sched: Skip class callbacks with SCHED_FLAG_KEEP_PARAMS Andrea Righi
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Andrea Righi @ 2026-07-30  5:50 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot
  Cc: Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Valentin Schneider, K Prateek Nayak, Tejun Heo, Patrick Bellasi,
	linux-kernel

SCHED_FLAG_KEEP_PARAMS allows sched_setattr() to update generic task
attributes while retaining the task's existing scheduling parameters and
class.

Two paths in __sched_setscheduler() still act on the requested policy
before the guarded parameter update. One marks the operation as a class
change and invokes class transition callbacks even though the class remains
unchanged. The other performs deadline admission control and can account
bandwidth for a non-deadline task that never enters the deadline class.

Prevent both side effects when SCHED_FLAG_KEEP_PARAMS is set.

Andrea Righi (2):
      sched: Skip class callbacks with SCHED_FLAG_KEEP_PARAMS
      sched/deadline: Skip bandwidth accounting with SCHED_FLAG_KEEP_PARAMS

 kernel/sched/syscalls.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

base-commit: bafb78898eb70fcaa979608a2d7ae9bad86124a1

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

end of thread, other threads:[~2026-07-30 11:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30  5:50 [PATCH 0/2] sched: Fix SCHED_FLAG_KEEP_PARAMS side effects Andrea Righi
2026-07-30  5:50 ` [PATCH 1/2] sched: Skip class callbacks with SCHED_FLAG_KEEP_PARAMS Andrea Righi
2026-07-30  7:29   ` K Prateek Nayak
2026-07-30  8:57     ` Andrea Righi
2026-07-30  9:57     ` Peter Zijlstra
2026-07-30 11:42       ` Andrea Righi
2026-07-30  5:56 ` [PATCH 2/2] sched/deadline: Skip bandwidth accounting " Andrea Righi
2026-07-30 10:04   ` Peter Zijlstra
2026-07-30  9:32 ` [PATCH 0/2] sched: Fix SCHED_FLAG_KEEP_PARAMS side effects Peter Zijlstra
2026-07-30  9:52   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox