4 ms·
Rust-Written LAVD Kernel Scheduler Shows Promising Results for Linux Gaming
- yla92 3y agoNoob question: Is it something that only beneficial for games or also be beneficial as generic scheduler ?
- jvanderbot 3y agoI bet (as does TFA) that this is mostly targeted towards dedicated gaming devices. Schedulers are very workload specific, once the basics are in place.
- alexgartrell 3y agoThe 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)
- Twirrim 3y agoIt 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/ 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.
- surajrmal 3y agoIf 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.
- Twirrim 3y agoTrue. 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.
- WhereIsTheTruth 3y ago[flagged]
- littlestymaar 3y ago3 days ago: https://news.ycombinator.com/item?id=40080861 https://news.ycombinator.com/item?id=40080861 2 days ago: https://news.ycombinator.com/item?id=40084335 https://news.ycombinator.com/item?id=40084335 Edit: oh interestingly enough this one is the post from 3 days ago that has been moved again to the front page with a reset on the submission time.
- sneakinsnake 3y agoCan the same outcomes be achieved using C or C++?
- IshKebab 3y agoOf 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.
- orwin 3y agoI 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".
- orbital-decay 3y agoIt's BPF-based so I imagine the meaningful part is already written in C.
- pjmlp 3y agoIt 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++.
- deleted 3y ago[deleted]
- IAmLiterallyAB 3y agoOh neat, had this guy as a professor for "Linux Kernel Programming". Good to see he's still doing cool stuff
- 0xfedbee 3y ago[flagged]
- manifault 3y agoNote: Phoronix incorrectly reported this as a rust scheduler. There's a very small user space component written in rust, but the vast majority of the actual scheduling logic is written in C (i.e. as the BPF program) which runs in kernel space: https://github.com/sched-ext/scx/blob/main/scheds/rust/scx_lavd/src/bpf/main.bpf.c https://github.com/sched-ext/scx/blob/main/scheds/rust/scx_l...