Skip to content

sched/syscalls: Allow setting niceness using sched_param struct

Michael C. Pratt lkml ltp oe-lkp stable 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 3/31 patch 5 repliesIn review
  2. v1 posting 2/31 patch 5 repliesSuperseded
  3. v1 posting 1/31 patch 0 repliesSuperseded

Patches in v1 posting 3/3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1sched/syscalls: Allow setting niceness using sched_param structkernel/sched/syscalls.c+19 -25 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH RESEND 2 0/1] sched/syscalls: Allow setting niceness using sched_param struct

Dear Linus and devs,

I don't want to take much of your time, this is a very simple patch. I am concerned that it is being ignored without a good reason. This is my third time sending it, the first being within the merge window for 6.12 which I was hoping this would be included in.

This patch is a short and safe way to expand the current ABI regarding the ability to set a process priority at the moment of process creation. For example, there currently is no way to set a process priority for normal processes made with the posix_spawn*() family of functions.

Since it is unsafe to directly change the static priority
for non-RT processes, the niceness value is modified instead
in order to result in the same effective priority as what is requested. Any requested priority outside the effect of the niceness range is invalid.

Peter had responded with a concern that the value passed in to sched_priority should be the niceness value itself in this case, however, for the functions used to query the accepted range, sched_get_priority_max() and sched_get_priority_min(),
as defined by POSIX, a negative value indicates failure. This would also be inconsistent with other usage of the value. Therefore, I believe this remains to be the correct way to implement it. I replied as such and got no reply back.

I still think I have a good idea here, but for whatever reason, this being in my opinion one of the simplest and most sensible patches that I have tried to send so far, is being met with
mostly dead silence or misunderstanding of the situation... So I am opening up the conversation to a wider audience.

Thanks for reading