Linux 7.3 to Get the First vRAM Management Improvements for Games
Translated by a model; the original is in Russian.
Earlier this year, Natalya Fock of Valve's Linux graphics team proposed a series of patches aimed at improving the gaming experience on systems with modest amounts of video memory. Now that vRAM management work is reaching the kernel: the first changes have already landed in the DRM-Next branch and should be part of Linux 7.3. But the developer has no intention of stopping there — further improvements lie ahead, first and foremost for the AMDGPU driver.
What's been done
In a fresh blog post, Fock takes a detailed look at the intricacies of video memory management, the mechanics of data eviction, and testing results. A telling experiment was carried out with the game Indiana Jones: The Great Circle: the settings were cranked up so that the game tried to occupy 9 GB of video memory while only 8 GB was available. Despite overshooting by a full gigabyte, the game remained quite playable on an 8-gigabyte graphics card.
Eviction is a delicate matter
The conclusion the author reaches sounds cautiously optimistic. In her words, even when part of the data is evicted to system RAM, the performance loss often turns out to be surprisingly small — sometimes you can preserve a significant share of the frames after offloading a gigabyte or more. But this, of course, is the favorable scenario: let the “wrong” block end up in RAM, and the drops become noticeable. Eviction is hard to tune perfectly, and some slowdown is inevitable. If a game is already barely holding 30 frames with all its data in vRAM, additional offloading may simply fail to keep it at that mark.
The main takeaway of the post, however, lies elsewhere: overflowing video memory is not the catastrophe it seems at first glance. The driver (primarily the kernel one) is able to make overcommit as fast as possible, and the applications themselves can help too, coordinating their actions with the driver stack to soften the consequences of having their data evicted.
Where you can already try it
These developments already ship in the SteamOS kernel — in both the stable and preview channels. Beyond the base set for Linux 7.3, further improvements are still being prepared for inclusion in one of the future versions of the mainline kernel. Anyone who wants to try them right now outside the world of SteamOS can use the vramstuff-rebase branch with all the patches.
Source: Phoronix
Comments
Sign in, to comment.