TLDR: Sometimes games lag because the cpu wants to sleep between each frame. AMD patch adds a per-core cpu performance profile, which lets games run on their cpu core(s) at full speed (no mid-frame sleeps) without setting the whole cpu into a battery-sucking performence mode.
wants to sleep between each frame
Key fact: This only happens in battery saving mode. The patch doesn’t help other modes.
That’s not exactly it. It’s the game that sleeps (e.g. because it’s waiting for the graphics driver to be ready for more work or there’s a framerate limiter). When it sleeps, the CPU core running that thread temporarily goes to idle speed, then when the sleep finishes, it initially clocks back to a medium speed and only goes back to full speed after it’s run for a while because someone somewhere assumed that processes that sleep of their own volition don’t care if they don’t run quickly. That’s not true for games, so they take longer to prepare the next frame than they should.
The patch makes it so that if a core goes into the C0 state (maximum speed) and has already been in the C0 state for most of the time for a few milliseconds, it temporarily sets a preference for that core to go straight to full speed after a sleep instead of to medium speed, and doesn’t remove that preference until it’s not been in in C0 for 300ms. That gets rid of the slow start after each frame’s sleep.
Wow 300ms is really long in terms of game performance. For gaming they could’ve gotten the desired result with like 50ms.
I wonder what kind of workloads that number was chosen for (a lot of productivity work is constant for minutes at a time) or if it’s instead based on hardware characteristics (like if it takes more power to clock down and back up than the power used to keep it up for 300ms)
It’s not that uncommon for games to stutter for 50 ms, e.g. when an async task on a worker thread takes too long and holds up the rest of the game, or when something needs loading. For a Unity-based game, garbage collection can block the main thread for that long if the developer wasn’t careful, too. It’s also only sampling every 10 ms rather than recording every power state change, so a game that takes less than 10 ms to actually do its processing has a decent chance of missing any sampling points for a while.
The exact quote from the mailing list is:
The 300 ms decay is sized so that a render thread which is only 50-80% busy from periodic vsync and GPU-fence waits holds the boost across its whole busy period at a couple of CPPC_REQ writes total, while an idle core sheds the boost well before it can matter. The energy exposure of a wide window is small because EPP only influences behavior in C0 and an idle core sits in CC6 regardless. If folks want me to make these tunable I am happy to expose them.
What are they refering when they say “1%”?
In game benchmarks, a lot of sites and reviewers tend to show the bottom 1 percent of framerate in their graphs, so the 1% here would be the lowest/worst part of the average performance. Boosting the 1% would essentially be raising the minimum performance and make performance drops less severe.
Thank you for explaining!
You’re welcome! 🙏
To clarify further: They aren’t saying “1%” they are saying “1% lows”. If you only take the bottom (lowest) 1% of all frame rate measurements (and average them), that is what this refers to. The reason this is important is that it gives a good indication if a game “feels laggy”. Occasional dips to low fps or stutters in general will lower this number.
And to add even more, the reason this is important, is because in-game fps counters/overlays use an average over a short period. Quick lag spikes can make a game feel horrible while the counter displays a solid 60fps.
If you only take the bottom (lowest) 1% of all frame rate measurements (and average them)
I don’t think that is the methodology. I think it is taking the 99th percentile frame time. So basically if took the time it took to generate every single frame this is the time that 99% of frames were faster than and 1% were slower than.
If this number goes down it means that the worst frames are less bad. This is a pretty important part of the experience as even if you have good average frame time (and decent FPS) having a few slow frames really makes the game feel choppy and can make precise inputs difficult.
refers to the absolute lowest FPS you experience in a game, usually in the most demanding portions

Your signature made me giggle
:D

Now imagine we could have Linux mainline on Android phones :)









