New AMDGPU Linux Patches From Valve Aim To Reduce Stuttering With Steam Play Games

Natalie Vock of Valve's Linux graphics driver team sent out a new version of AMDGPU kernel driver patches today that aim to provide "significant reductions in stuttering" for some newer Windows games running on Linux by way of Steam Play (Proton). After recently working to improve Linux vRAM management for graphics cards with limited amounts of video memory, Vock's latest work is on reducing stuttering for games. The effort is centered around reworking the virtual memory update operations for batching and explicit sync. Vock explained in today's patch series: "The motivator is that many games have come to heavily use sparse bindings, and they often rely on being able to overlap frame work on gfx/compute queues with sparse binding work on sdma. If PRT mappings are synced to every other submissions like they are right now, heavy sparse binding load can stall the gfx/compute submissions for quite a long while, leading to very noticeable stutters and hitches. Another problem is that each sparse binding update requires a separate ioctl, so the CPU will also spend significant time constantly switching between user and kernel mode to execute the binding changes one at a time. To remedy this, this patchset introduces a "VM update context" structure. This context encapsulates some state that is carried around different VM update functions, in patch 1 this is the mappings that were freed along the way. amdgpu_vm_clear_freed then only clears the mappings that were actually freed in the update operation, which is a requirement for being able to explicitly sync that unmap. In later patches, the update context is expanded to hold a set of pending mapping changes, so that a future ioctl that changes many mappings at a time has a place to keep pending changes while every change is validated, before applying everything atomically if things look okay." With the new AMDGPU_GEM_VA2 ioctl, there is said to be a "significant reduction in stuttering" for applications/games hammering lots of sparse operations. No specific numbers were provided in the patches for quantifying the impact on affected titles under Proton. Those interested can find these AMDGPU Linux driver patches on the kernel mailing list. We'll see if this work manages to cross the finish line for Linux v7.5 or will require more time to bake.

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.