Originally posted by jabl
View Post
Lazy Preemption Merged Along With Other Scheduler Improvements For Linux 6.13
Collapse
X
-
-
-
Originally posted by jabl View PostEEVDF doesn't by itself cause any more or less context switches than any other scheduler....
....Now it may be that these choices about which process to run leads to more context switches, if EEVDF more often selects some process that uses a tiny amount of CPU then goes to sleep again...
Not sure how much a context switch "cost" these days, or if this time cost is part of the lag calculation in EEVDF somehow, but I can imagine it won't matter much unless the CPU is fully loaded anyway, but it is still interesting.
Leave a comment:
-
-
Originally posted by jabl View PostIn case someone wonders what this lazy preempt thing is, I wrote up an explanation in the other thread at https://www.phoronix.com/forums/foru...21#post1504521
Leave a comment:
-
-
Originally posted by waxhead View Post
Understood, but assuming the EEVDF does what it is supposed to e.g. smoothing out lag, would not this in theory "chop up" the processing, resulting in more potential context switches on a less that fully loaded system? Or in other words less throughout and possibly even more latency? Something the CFS would not care so much about. I admit to not understanding the fine details here but that's how it seems to me. Maybe I'm wrong.
Now it may be that these choices about which process to run leads to more context switches, if EEVDF more often selects some process that uses a tiny amount of CPU then goes to sleep again (like updating the mouse cursor position on the screen etc.), necessitating the scheduler to run again to select something else.
Leave a comment:
-
-
Originally posted by jabl View Post
It's kind of orthogonal. After the current thread has been preempted, the scheduler code (EEVDF, CFS, whatever) is run to decide which thread to switch to.
EDIT: That is to say, the scheduler code per se doesn't decide when to preempt, it only decides what to do after preemption has already happened.
Leave a comment:
-
-
Originally posted by jabl View Post
AFAIU the PREEMPT_LAZY work was inspired by something roughly similar that was part of (or experimented with in) the PREEMPT_RT tree (not sure if it was merged when PREEMPT_RT became part of mainline). So yes, it's definitely possible.
However, unfortunately this does not mean that PREEMPT_RT could run non-RT tasks as quickly as the other PREEMPT_* modes. In the name of minimizing the time the kernel is in a non-preemptible state, the PREEMPT_RT mode changes a lot of things, like converting most spinlocks (which are non-preemptible) to mutexes (which are sleepable, that is, preemptible), converting all interrupt handlers to run in threads, etc. All this helps with achieving deterministic latency, but come at a definitive cost in throughput also for non-RT tasks.
Leave a comment:
-
-
Originally posted by davidbepo View Postit gives me an idea tho, could preempt_rt be combined with preempt_lazy? i assume its possible since rt is code changes, not model
i think this could give an scenario where you can have both RT and full perf just by setting tasks priorities right
However, unfortunately this does not mean that PREEMPT_RT could run non-RT tasks as quickly as the other PREEMPT_* modes. In the name of minimizing the time the kernel is in a non-preemptible state, the PREEMPT_RT mode changes a lot of things, like converting most spinlocks (which are non-preemptible) to mutexes (which are sleepable, that is, preemptible), converting all interrupt handlers to run in threads, etc. All this helps with achieving deterministic latency, but come at a definitive cost in throughput also for non-RT tasks.
Leave a comment:
-
-
Originally posted by jabl View PostIn case someone wonders what this lazy preempt thing is, I wrote up an explanation in the other thread at https://www.phoronix.com/forums/foru...21#post1504521
it gives me an idea tho, could preempt_rt be combined with preempt_lazy? i assume its possible since rt is code changes, not model
i think this could give an scenario where you can have both RT and full perf just by setting tasks priorities right
Leave a comment:
-
-
Originally posted by waxhead View Post
That was a good read. Just curious - what would the impact of lazy be on EEVDF vs CFS (or even the NEST approach)? Not that it matters much since CFS is in the history books but I am still curious.
EDIT: That is to say, the scheduler code per se doesn't decide when to preempt, it only decides what to do after preemption has already happened.Last edited by jabl; 20 November 2024, 05:46 AM.
Leave a comment:
-
-
Originally posted by jabl View PostIn case someone wonders what this lazy preempt thing is, I wrote up an explanation in the other thread at https://www.phoronix.com/forums/foru...21#post1504521
Leave a comment:
-
Leave a comment: