TTM Multihop Code Revised For Improving Linux GPU Buffer Management
Written by Michael Larabel in Linux Kernel on 9 November 2020 at 08:30 AM EST. Add A Comment
LINUX KERNEL --
Among the many open-source graphics driver improvements being worked on recently by Red Hat's David Airlie from Lavapipe to OpenCL 3.0 Clover work, another recent effort has been around TTM "multihop" as an improvement for this memory management infrastructure used by the likes of the AMDGPU kernel driver.

Airlie has been working on patches in recent weeks to extend the TTM memory management infrastructure with a "multihop" feature. Right now when needing to move a buffer temporarily across address spaces such as from system RAM to/from video RAM, the driver functions are called upon that add further complexity to the driver code. TTM Multihop allows the core TTM memory management code handle this temporary placement of buffers to/from vRAM to sRAM in order to avoid call stack issues with existing path of the drivers handling it.

TTM Multihop adds around five dozen lines of code to the core TTM code but then removing the existing functionality in each driver saves 100+ lines of code. AMDGPU, for example, in transitioning to TTM Multihop drops 136 lines of code from the driver in using the common functionality. The Radeon and Nouveau DRM drivers are also adapted to use this multihop code and in turn see similar L.O.C. reductions.

The latest TTM Multihop patches were published this weekend on dri-devel.
Related News
About The Author
Author picture

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 or contacted via MichaelLarabel.com.

Popular News This Week