Mesa 20.3 Lands Rewritten AMD Zen L3 Cache Optimization
You may recall going back to 2018 that well known open-source AMD Mesa driver developer Marek Olsak was working on Mesa optimizations around the AMD Zen architecture. In particular, better handling of Mesa for Zen's L3 cache design. A rewritten implementation of that has now landed along with some other improvements.
Marek discovered his L3 cache topology code was incorrect and ended up rewriting it to "make Mesa on my AMD CPU faster." The code is catering to AMD Ryzen processors but it's also possible Xeon / multi-CPU systems could employ a similar optimization should anyone be interested in pursuing it.
Marek's now-merged code also changes around the L3 cache pinning optimization for OpenGL threading "glthread" so that it's more effective. In terms of the glthread optimization, on a Ryzen 9 3900X there was as much as a 33% improvement found by Marek in an absolute best case scenario if the kernel's CPU scheduler doesn't move the main thread too often. But for actual game performance impact most software will be impacted much less but we'll fire up some benchmarks soon to see how these AMD Zen optimizations pay off.
The merged code also incorporates OS-agnostic thread affinity and get CPU functions that even works under Windows now for code portability.
Those reworked AMD Zen optimizations are now in Mesa 20.3-devel with great timing ahead of next week's AMD Ryzen 5000 series availability. The changes are in Mesa 20.3 which will see its stable release in December along with many other new features and optimizations in tow.
Marek discovered his L3 cache topology code was incorrect and ended up rewriting it to "make Mesa on my AMD CPU faster." The code is catering to AMD Ryzen processors but it's also possible Xeon / multi-CPU systems could employ a similar optimization should anyone be interested in pursuing it.
Marek's now-merged code also changes around the L3 cache pinning optimization for OpenGL threading "glthread" so that it's more effective. In terms of the glthread optimization, on a Ryzen 9 3900X there was as much as a 33% improvement found by Marek in an absolute best case scenario if the kernel's CPU scheduler doesn't move the main thread too often. But for actual game performance impact most software will be impacted much less but we'll fire up some benchmarks soon to see how these AMD Zen optimizations pay off.
The merged code also incorporates OS-agnostic thread affinity and get CPU functions that even works under Windows now for code portability.
Those reworked AMD Zen optimizations are now in Mesa 20.3-devel with great timing ahead of next week's AMD Ryzen 5000 series availability. The changes are in Mesa 20.3 which will see its stable release in December along with many other new features and optimizations in tow.
10 Comments