20 comments

[ 3.5 ms ] story [ 46.5 ms ] thread
Noob question: Is it something that only beneficial for games or also be beneficial as generic scheduler ?
I bet (as does TFA) that this is mostly targeted towards dedicated gaming devices. Schedulers are very workload specific, once the basics are in place.
The core framework (sched_ext) was written for general workloads and can quite beneficial. It lowers the costs of creating and iterating on schedulers quite a bit.

To be honest, when they started working on it I don’t think any of us expected for it to be a source of collaboration with gaming companies :)

(I’m a middle manager at Meta)

It may do, but the CFS scheduler is really good for generic purposes, and the new replacement for it, EEVDF, that became default in a recent kernel, does even better.

What I think is more interesting in this project is it's one of the first "real world" uses of sched_ext, https://lwn.net/Articles/922405/, which makes it trivial to build and experiment with new schedulers. It'll be interesting to see what will come out of the research opportunities this now provides.

If your general workload has no humans involved maybe. Trying to do anything interactive while also running something CPU intensive is very much a poor experience on Linux compared to osx and Windows. Using nice and cgroups help but are ultimately unable to fully solve the issues.
True. I tend to shove stuff in to cgroups and adjust niceness to compensate, so e.g. slack and email client are both lower priority and cpu restricted.
Can the same outcomes be achieved using C or C++?
Of course. You can't do anything fundamentally in Rust that you couldn't do in C or C++ or Assembly. You can just do it a lot easier and with fewer bugs.
I think Rust+C is way more effective (and by that i mean easy to write) than Rust or C alone, and i would bet that "Rust-written" in the title really mean "Rust+C".
It can even be done in BASIC for that matter, provided there is a compiler toolchain that supports eBPF as target.

Yes, it can be done in C and C++.

(comment deleted)
Oh neat, had this guy as a professor for "Linux Kernel Programming". Good to see he's still doing cool stuff