Nerd showing a paper about Linux Scheduler ... and inevitably Nerd-Folks slide into ranting about Linus? Yeah!
I
did a (brief) overview about this paper... so lets see...
Spoiler (TL;DR)
Quote:
“Nobody actually creates perfect code the first time
around, except me. But there’s only one of me.”
Linus Torvalds, 2007 [44] (from page 5 of this paper)
I actually LIKE this insane and sarcastic troll of a guy
(and am quite glad that I do not work near him)
Now what is the paper really about... new hardware had turned the once already solved scheduler problem
into a complex nightmare and its implementations full of bugs...
So they have crafted
new tools to detect invariant violations and proposed bugfixesWell, AND they could not resist to spice it all by citing Linus endless reservoire of sayings
################################
Quote:
scheduler must maintain the following, simple, invariant:
make sure that ready threads are scheduled on available
cores.
Quote:
Our recent experience with the Linux scheduler revealed
that the pressure to work around the challenging properties
of modern hardware, such as non-uniform memory access
latencies (NUMA), high costs of cache coherency and synchronization,
and diverging CPU and memory latencies, resulted in a scheduler with an incredibly complex implementation.
Quote:
The bugs we described resulted from developers want-
ing to put more and more optimizations into the scheduler,
whose purpose was mostly to cater to complexity of modern
hardware.
Quote:
This occurs even though the scheduler is not explicitly configured to save
power by purposefully leaving cores unused so they can be brought into a
low-power state.
Quote:
We provide fixes to these bugs, and observe substantial performance improvements.