this post was submitted on 16 Jan 2024
173 points (97.8% liked)

Linux

48372 readers
1769 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 10 months ago (2 children)

Not quite running in userspace. To the best of my own understanding:

The new kernel feature is to allow writing schedulers in eBPF, a "language" the kernel runs in kernelspace that is heavily restricted.

For example, all eBPF programs must complete in bounded time, and the kernel's static checker must be able to verify that before the program can even begin executing. eBPF is a rare language that is not touring complete.

"For scx_simple, suspending the scheduler process doesn't affect scheduling behavior because all that the userspace component does is print statistics. This doesn't hold for all schedulers."

So, it may be that eBPF also makes it easier to write a truly userspace scheduler, but that's not the primary purpose, and it's not what is being done with scx_simple.

https://lwn.net/Articles/909095/ for more about (e)BPF.

[–] trivial_wannabe 3 points 10 months ago

Thank you for the correction! Reading up on eBPF is fascinating.

Additional resource that adds to your secondary point that this is more than just allowing schedulers to be run in userland: https://github.com/sched-ext/scx/blob/main/scheds/c/README.md

[–] someacnt_ 1 points 10 months ago

Is eBPF dependently typed?