I would love an ELI5 if anyone is offering!
I read the article but still don’t really understand.
The CPU has a power saving mode that lets it slow down whenever a thread is sleeping (even a few milliseconds). In games, the main thread does short bursts of work then sleeps briefly. So the CPU keeps waking up “cold” at a low speed, causing occasional slow frames (the “1% lows”).
The patch adds a window where the CPU won’t go into the power saving state immediately, so when the thread starts working again the CPU is at full speed already.
Premature optimization is the root of all evil…
It has a use case, gaming is not it.
Could you elaborate a bit?
“Premature optimization is the root of all evil” is a quote from Donald Knuth, one of the grand oldies of Computer Science. Basically get everything working and tested in the real world before even thinking about optimizing, it may be unnecessary or needed somewhere you didn’t expect.
In this case the optimization of spinning down as fast as possible is good in the use case of servers to save power and heat, but not good for gaming.
That makes much more sense. I though you considered this fix a premature optimization.
Ultimately, I guess it depends on the workload.
IIUC: Cpu cores can be set to sleep immediately after stopping activity to save energy but takes an amount of time to “wake” so game rendering has a lot of pauses in computations that make this effect less performative but more energy saving. Mobile game devices rely on this for more battery power.
Disabling said sleep would make the core on all the time and not energy efficient.
This change seems to find ways to keep gaming computations that were recently used and will likely happen again very soon, from sleeping too aggressively but still allow sleeping as much as makes sense to balance frame computation and energy efficiency.
It’ll be interesting to see whether this stays a gaming-specific heuristic or ends up benefiting other bursty workloads as well. Browsers and desktop GUIs tend to have pretty similar burst/sleep patterns.




