Re: [RESEND PATCH] sched/syscalls: Allow setting niceness using sched_param struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxx> wrote:

> On Monday, September 16th, 2024 at 07:13, Peter Zijlstra <peterz@xxxxxxxxxxxxx> 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





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux