Mesa 20.3 Lands Rewritten AMD Zen L3 Cache Optimization

Written by Michael Larabel in Mesa on 30 October 2020 at 06:30 AM EDT. 10 Comments
MESA
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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week