one more detail I forgot: it actually would not be compliant for niceness as the input...
On Monday, September 16th, 2024 at 15:23, Michael Pratt mcpratt@pm.me wrote:
On Monday, September 16th, 2024 at 07:13, Peter Zijlstra peterz@infradead.org wrote:
Worse, you're proposing a nice ABI that is entirely different from the normal [-20,19] range.
... ... ...
Otherwise, we have a confusing conflation between the meaning of the two values, where a value of 19 makes sense for niceness, but is obviously invalid for priority for SCHED_NORMAL, and a negative value makes sense for niceness, but is obviously invalid for priority in any policy.
POSIX doesn't allow a negative value for the ABI at all:
If successful, the sched_get_priority_max() and sched_get_priority_min() functions return the appropriate maximum or minimum values, respectively. If unsuccessful, they return a value of -1 and set errno to indicate the error.
-- MCP