Re: Periodic rant about SCHED_ULE

From: Peter <pmc_at_citylink.dinoex.sub.org>
Date: Sun, 26 Mar 2023 01:17:39 UTC
On Sat, Mar 25, 2023 at 11:09:56PM +0100, Mateusz Guzik wrote:

! So far it's look like it's not syscall usage per se, but "voluntary"
! time spent off cpu.

No.

! Any time a thread goes off in a manner different than preemption it
! adds to counters which ULE interprets to mean the thread is "less
! interactive" and threads which do stay on cpu on their own should be
! preferred -- this is how syscall-less hog is considered important.

No.

! The mechanism lacks distinction between sleeps on purpose, waitpid,
! yield and similar vs going off cpu due to lock contention or
! initiating i/o. Even then, I don't know if the mechanism works at
! all.

No.

I've said it often enough: preemption does not schedule, it immediately
resumes the thread afterwards. Syscalls do schedule, therefore
syscalls get into disadvantage.

And my patch does nothing else than schedule the thread after
preemption, so that preemption is on par with syscalls. That costs a
few cycles, but it might also increase responsiveness slightly.
Anyway I need a balanced system, not a superfast one.