TTM Multihop Code Revised For Improving Linux GPU Buffer Management
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.
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.
Add A Comment