Nouveau Driver Picks Up SVM Support Via HMM
The Nouveau DRM driver has support for SVM via the Heterogeneous Memory Management infrastructure that's been part of the mainline kernel for a while. Nouveau patches have been worked on for a while but finally on trajectory for mainline. The NVIDIA proprietary driver has also been working to make use of HMM.
SVM support was one of the reasons that's been provided by NVIDIA why their proprietary OpenCL driver doesn't fully expose OpenCL 2.0+. Though with OpenCL-Next this year, it's believed that requirement will be relaxed among other features made optional and NVIDIA will move ahead in officially supporting that next yet-to-be-released version of OpenCL. But while the Nouveau driver doesn't have its OpenCL support aligned yet, there is this Shared Virtual Memory support for the open-source driver.
Ben Skeggs of Red Hat who landed this support into the Nouveau development tree commented, "This uses HMM to mirror a process' CPU page tables into a channel's page tables, and keep them synchronised so that both the CPU and GPU are able to access the same memory at the same virtual address."
This SVM support is currently enabled for Pascal GPUs but with time will come to Volta and Turing but is currently disabled there due to channel recovery being unreliable with the current Nouveau driver.
This Nouveau SVM support should be part of the upcoming Linux 5.1 kernel cycle.
Meanwhile, Karol Herbst, Rob Clark, and others at Red Hat continue working on the user-space bits for bringing up compute support to Nouveau with the OpenCL Gallium3D state tracker and NIR support for Nouveau. That work has yet to be mainlined. But Red Hat's intentions around their investments into Nouveau compute remain a bit of a mystery as even if they get everything going for compute, the performance is still severely limited since GTX 900 Maxwell and newer still can't re-clock from their boot frequencies to achieve optimal performance... With currently being locked to a low performance state, the compute potential is very limited just as we've seen out of the current OpenGL performance. But hopefully this major roadblock will somehow be resolved by NVIDIA and Red Hat.