Experimental Zero-Copy Support For Nouveau With GNOME Mutter

Written by Michael Larabel in GNOME on 26 October 2023 at 08:04 AM EDT. 5 Comments
GNOME
Ubuntu desktop developer Daniel Van Vugt has been working on enabling zero-copy support for discrete GPUs within GNOME's Mutter compositor to deliver faster performance. This appears to be working so far with the Nouveau open-source NVIDIA driver.

Van Vugt has been focusing on improving secondary GPU support within GNOME when running under Wayland. Part of that effort has been working on zero-copy support from dGPUs, which he has working with the Nouveau driver.

Daniel explained in the draft merge request:
"Zero copy was written for and previously only attempted on DisplayLink (where it always works in my experience). Now we try it on discrete GPUs too. This only seems to work for nouveau but the benefit is huge:

Before: 6.9ms secondary GPU copy
After: 0.8ms zero copy"

Going from 6.9ms for a secondary GPU copy to 0.8ms with zero-copy support is a significant savings. Though using the Nouveau driver right now is also a mixed bag... It also looks like this may end up only working with Nouveau/NVIDIA and not other hardware. Red Hat's Michel Dänzer wrote in a comment:
"Zero-copy means that the secondary GPU directly scans out from the buffer imported from the primary GPU, right? If so, that can't work with at least AMD & Intel secondary dGPUs, since those can scan out only from VRAM, but a buffer shared between different GPUs is normally pinned to system memory. I suppose it's theoretically possible Nvidia dGPUs can scan out from system memory, would be kind of surprising though."

Van Vugt followed-up that he successfully confirmed that zero-copy is indeed working with Nouveau. It will be interesting to see where this work leads and if it ends up being suitable for mainlining this GNOME cycle.
Related News
About The Author
Michael Larabel

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

Popular News This Week