This week a final batch of DRM-Misc-Next feature material was submitted for DRM-Next to queue ahead of the Linux 7.3 merge window opening later in the month. Most notable is the TTM memory management code is now being more agressive when allocating below protection limits. This is an improvement coming thanks to Valve's open-source Linux graphics team. Since last year Natalie Vock of Valve's Linux graphics team has been exploring cases where device memory protection fails to prevent allocations from ending up in the GTT whe nvRAM is scarce and applications/games begin competing for video memory space. After going through eight rounds of revisions, these improvements to the common TTM memory management code and cgroup device memory code are now set to be merged for Linux 7.3. Vock summarized the situation in the patch cover letter: "I've been looking into some cases where dmem protection fails to prevent allocations from ending up in GTT when VRAM gets scarce and apps start competing hard. In short, this is because other (unprotected) applications end up filling VRAM before protected applications do. This causes TTM to back off and try allocating in GTT before anything else, and that is where the allocation is placed in the end. The existing eviction protection cannot prevent this, because no attempt at evicting is ever made (although you could consider the backing-off as an immediate eviction to GTT). This series tries to alleviate this by adding a special case when the allocation is protected by cgroups: Instead of backing off immediately, TTM will try evicting unprotected buffers from the domain to make space for the protected one. This ensures that applications can actually use all the memory protection awarded to them by the system, without being prone to ping-ponging (only protected allocations can evict unprotected ones, never the other way around)." Vock is the one that has been working on improving the Linux gaming experience for systems with limited vRAM capacity. Those patches are part of this week's drm-misc-next pull. It also includes DMEMCG support for eviction and it being enabled for both the AMDGPU and Xe drivers. The UDMABUF code has also removed an artificial 64MB limit that was discovered by Xaver Hugl during the recent work on improving the KDE multi-GPU/eGPU experience. The Allwinner Sun4i DRM driver also has improvements for YUV and 4K support. The Nouveau driver also now has Device Memory Control Group (DMEMCG) support that was authored by Natalie Vock as part of the other improvements.
TTM Memory Management For Graphics To Be More Aggresive With Linux 7.3
Full Article
Original Source
Read the full article at Phoronix →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.