Re: Stop using PUSER in tsleep(9)

2019-07-09 Thread Martin Pieuchot
On 09/07/19(Tue) 14:29, Alexandre Ratchov wrote:
> [...] 
> Why do you want to differenciate sleeping priorities from running
> priorities?

To be able to simplify the scheduler logic.  Sleeping priorities are
something we could question.  But by doing this separation it makes
it simpler to get rid of/refactor the multiple places that do:

if (p->p_priority >= PUSER)
...

You can look at my big scheduler change if you want to see the details.

I'm currently splitting it in reviewable pieces x)



Re: Stop using PUSER in tsleep(9)

2019-07-09 Thread Alexandre Ratchov
On Mon, Jul 08, 2019 at 06:43:34PM -0300, Martin Pieuchot wrote:
> PUSER has been used since the import of ___thrsleep(2) / librthread.
> This value has been then copied to futex(2).  No other tsleep(9) call
> use this value.  I'd like to stop using it to be able to differentiate
> sleeping priorities that will be always < PUSER, to running priorities.
> The only running priorities that could be < PUSER are the one of niced
> programs like sndiod(9).
> 
> Ok?

Seems correct. Use of PWAIT shouldn't hurt interactive programs which
use PSOCK (or better).

Why do you want to differenciate sleeping priorities from running
priorities?