Open-Source AMD OpenGL Driver Drops Support For Smart Access Memory / ReBAR

Written by Michael Larabel in Radeon on 8 March 2023 at 06:30 PM EST. 22 Comments
RADEON
Since late 2020 there had been work by AMD Linux engineers on adding Smart Access Memory (Resizable BAR) support to RadeonSI as the Gallium3D OpenGL driver and improved since that point in the name of performance. However, for this OpenGL driver now they've come to realize the benefits haven't necessarily panned out and the developers went ahead and disabled this SAM/ReBAR support followed by removing the support from this driver.

With today's Mesa 22.3.7 stable update, set for the next Mesa 23.0 point release, and in Mesa 23.1-devel Git the past few days is the removal of SAM/ReBAR support from the RadeonSI Gallium3D driver. AMD Smart Access Memory is designed to "harness the full potential of the graphics card memory" by making the entirety of the vRAM frame-buffer accessible to the CPU at once. AMD Smart Access Memory is just PCIe Resizable BAR (ReBAR) but branded for AMD Ryzen + AMD Radeon system combinations.

AMD Ryzen + Radeon GPU


The performance benefits aren't necessarily working out in clear favor for the OpenGL driver and thus was decided to just remove the code. The support in RADV as the Mesa open-source Radeon Vulkan driver remains: this code change is just regarding the RadeonSI OpenGL driver.

The removal of AMD Smart Access Memory from this driver was attributed to "CPU access has large overhead."

RadeonSI removes Smart Access Memory


The performance issue came up via this Mesa bug ticket over the game Hyperdimension Neptunia Re;Birth1 performing very slowly with AMD Ryzen processor and Radeon graphics.

The extremely low performance was attributed to AMD Smart Access Memory and when disabling the support in the BIOS, the performance improved or when running with environment variables to override the behavior. Going through this issue led well known AMD open-source Mesa developer Marek Olšák to decide on just ripping out the Smart Access Memory code from RadeonSI since it wasn't a focus and not properly tested. So rather than white/black-listing games based on if ReBAR/SAM support is helping or not, the code was just removed from this Gallium3D driver. Again, the SAM/ReBAR support does remain within the RADV Vulkan driver, which after all is more important for modern Linux gaming than OpenGL.

Update: Marek has commented in the forums with additional context around this change:
If you have a case where the radeonsi version of SAM improves performance, please let me know.

SAM isn't really removed. The behavior that's removed is an aggressive use of VRAM for everything when SAM is enabled in the BIOS, which has slower CPU access.

SAM is still used if an app specifically asks for VRAM and then demands full CPU access to it. The kernel handles that optimally if SAM is enabled in the BIOS.
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