Skip to content

sched: Fix SCHED_FLAG_KEEP_PARAMS side effects

Andrea Righi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sched: Skip class callbacks with SCHED_FLAG_KEEP_PARAMSkernel/sched/syscalls.c+2 -14 replies
2/2sched/deadline: Skip bandwidth accounting with SCHED_FLAG_KEEP_PARAMSkernel/sched/syscalls.c+2 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] sched: Fix SCHED_FLAG_KEEP_PARAMS side effects

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