6 ms·
An EEVDF CPU Scheduler for Linux
- mrtweetyhack 4y ago[dead]
- loeg 4y agoEEVDF is an acronym, and capitalized in the original article (title on HN is currently "An Eevdf CPU Scheduler for Linux").
- steponlego 4y agoIt's a shame that userspace governor was dropped by Intel, it worked amazingly for laptops.
- binkHN 4y agoFor those, like me, who don't know what this is: > The "Earliest Eligible Virtual Deadline First" (EEVDF) scheduling algorithm is not new; it was described in [a] 1995 paper by Ion Stoica and Hussein Abdel-Wahab. Its name suggests something similar to the Earliest Deadline First algorithm used by the kernel's deadline scheduler but, unlike that scheduler, EEVDF is not a realtime scheduler, so it works in different ways.
- 867-5309 4y agostill none the wiser..
- Osiris 4y agoWhat I’m looking for is a governor that makes sure processes like X/Wayland that handle user input are always available to handle user input at the cost of other processes. If I’m running a video encoding using all available CPUs, I don’t want that to cause lag with all my other processes. This happens to me a lot when running node processes like unit tests that running on all cores. It slows everything else down. I even set the nice value on node to always be the lowest priority and it only helps a little. I’ve actually had Linux become completely unresponsive when running many large node instances. That shouldn’t happen.
- pengaru 4y agoYour compositor could already be run at realtime priority... the risk is if the process has bugs which may result in infinite loops, you may lose the ability to interact with the system.
- PlutoIsAPlanet 4y agoWouldn't you also need some kind of priority system in the graphics system? If you have a game open using all the available GPU resources, doesn't matter if you can't block input if you can't get any updates to the screen.
- pengaru 4y agoWell, for anything actually putting pixels on the screen under the compositor's purview, the compositor controls the framerate of the game and there needs to be context switching involving the scheduler to get things displayed. I'm not clear on what mechanisms exist today for preventing things like a DoS of GPU resources in something of a single entry to the GPU driver without returning to userspace. We've all seen things like GPU stalls reported in dmesg, so clearly the drivers are tasked with preventing that sort of hang where a process enters the driver and stays there far too long.
- jlokier 4y agoThe Linux kernel since 2.6.25 provides CPU time limits on real-time priority so that runaway real-time tasks don't prevent other interactive processes from having some CPU time. So you can still interact with the system. "man 7 sched" provides a lot of detail about the real-time scheduling policies and options. (Of course if the compositor is essential to the kinds of interaction you need, e.g via the GUI, you'll still be stuck if the compositor stops working. But that's not a real-time priority problem.)
- mochomocha 4y agoWhile this looks like a step in the right direction to provide user-space per-process control of the latency VS throughput tradeoffs (lower runqueue latency at the expense of shorter timeslices), I'd rather see the SCHED_EXT patch [1] merged, so there's a lower barrier to entry when it comes to implementing alternative scheduling policies (eBPF vs in-kernel). It's also much faster to iterate user-space if you don't have to upgrade kernels every time, especially in large fleet deployment setups where AB testing is available. On a more controversial note, I trust more Meta & Google engineers proposing alternative schedulers that have been properly AB tested on millions of servers running a wide range of heterogeneous software VS small-scale synthetic benchmarks even when run by experts/maintainers. [1]: https://lwn.net/ml/linux-kernel/20221130082313.3241517-1-tj@kernel.org/ https://lwn.net/ml/linux-kernel/20221130082313.3241517-1-tj@...
- jeffbee 4y agoI guess I wouldn't hold your breath, since the gatekeeper of this subsystem replied with typical l-k assholery, to wit "If you expect me to read this, please as to provide something readable, not markup gibberish." This is why I greatly desire the death of Linux. Its major subsystems are maintained by people with the social skills of a hyena and little to no relevant field experience.
- akdor1154 4y agoSaid gatekeeper is also the author of the implementation in TFA...
- xeeeeeeeeeeenu 4y agoI'm surprised the article doesn't mention BFS/MuQSS because it's also based on the EEVDF algorithm.