Linux 7.3 To Land Initial Code Improving vRAM Management, More Improvements Coming

Earlier this year Natalie Vock of Valve's Linux graphics team laid out some patches for improving the Linux gaming experience for systems with limited vRAM . The kernel work for improving that video memory management is set to be introduced in the Linux 7.3 kernel. While that's a celebration on its own, Vock is pursuing more improvements still for bettering the Linux GPU driver video memory management behavior.

With the initial patches having been queued into DRM-Next and slated for merging within the next two weeks for the Linux 7.13 merge window, Natalie Vock published a new blog post today to outline the latest work and results on bettering Linux vRAM management, especially for the AMDGPU driver.

Vock's lengthy but detailed blog post highlights a number of nuances around video memory management, eviction handling, and testing that was done with Indiana Jones: The Great Circle where maxing out the settings in an attempt to consume 9GB of video memory while only having 8GB of vRAM available. Even with 1GB over-committed, the game ended up still being quite playable for an 8GB graphics card.


Vock concluded in the latest post:
"When all is said and done, how well does running out of VRAM hold up?

I’d say it’s quite alright! In many cases, you may be surprised how much performance you can retain even when evicting a gigabyte or more of memory! Then again, that’s of course a rather optimistic case, and the wrong thing ending up in CPU RAM can very quickly cause very significant slowdowns. Eviction is tricky to get just right, and to an extent, performance will always be dragged down. If a game is struggling to hit 30fps even with everything in VRAM, needing to evict something on top of all that could sometimes just unavoidably result in that 30fps target being missed.

Regardless, what I hope this blogpost can demonstrate is that even if you end up with some memory evicted to system RAM, the slowdown can be manageable. There’s measures that drivers (particularly, the kernel driver) can take to make overcommit work as fast as possible, and even applications can do their part in coordinating with the driver stack to mitigate the effects of their memory being evicted. With everything in place, VRAM overcommit isn’t really as big of a deal as one may think it is at first sight."

This work is already shipping in the SteamOS kernel both for the stable and preview channels. Beyond the initial upstreaming work for Linux 7.3, the further improvements are still being worked on for upstreaming into a future mainline Linux kernel release. This branch as "vramstuff-rebase" has all those patches for those wanting to test it right now outside of the SteamOS world.

Read the blog post in full via Natalie Vock's blog .