Shared Virtual Memory Support For Nouveau With HMM
Jerome posted some experimental patches providing shared virtual memory support for HMM in the Nouveau driver. What this means in basic terms is that "GPU threads spawn by GPU driver for a specific user process can access any valid CPU address in that process. A valid pointer is a pointer inside an area coming from mmap of private, share or regular file. Pointer to a mmap of a device file or special file are not supported."
Jerome does confirm that this is part of their effort for getting "OpenCL 2.0 for Nouveau inside Mesa."
The timeline is exciting as he shares some bits could even be working in just a matter of weeks, "I expect
we will have a somewhat working userspace in the coming weeks, work being well underway and some patches have already been posted on mesa mailing list."
The thousand plus lines of new code for SVM HMM support for Nouveau can be found on dri-devel in its current experimental form.
It's certainly going to be interesting to see what Red Hat's ultimate play is with investing heavily in open-source Nouveau compute support... Besides Jerome's HMM code, Karol Herbst and Rob Clark of Red Hat have been working on the SPIR-V and Clover patches for Nouveau in Mesa. Getting OpenCL 2.0 will be a great achievement but still won't be too practical unless somehow they have plans for getting re-clocking to work on newer NVIDIA GPUs to be able to run the cores and memory clocks at their rated frequencies for delivering sufficient performance. It will certainly be an interesting year ahead.