Heterogeneous Memory Management Is Coming Along For The Linux Kernel
Jerome Glisse at Red Hat has been a longtime contributor to the open-source Radeon graphics stack dating back to the short-lived Avivo driver that came before AMD's open-source friendliness and the RadeonHD driver. With not major patch-sets or significant work to talk about from Glisse recently, for those wondering what he's been up to, the answer is Heterogeneous Memory Management.
Jerome published the Heterogeneous Memory Management patches today in their seventh public revision to the kernel mailing list. HMM serves as a kernel subsystem to provide an easy-to-use API for mirroring a process address on a device with minimal hardware requirements. Jerome explains, "It intends to supersede [the ATS and PASID PCI-E] extensions by allowing to move system memory to device memory in a transparent fashion for core kernel [memory management] code (i.e. cpu page fault on page residing in device memory will trigger migration back to system memory)."
In terms of the HMM intended usage for Linux, "We want to be able to mirror a process address space so that compute API such as OpenCL or other similar API can start using the exact same address space on the GPU as on the CPU. This will greatly simplify usages of those API. Moreover we believe that we will see more and more specialize unit functions that will want to mirror process address using their own MMU. The migration side is simply because GPU memory bandwidth is far beyond than system memory bandwith and there is no sign that this gap is closing (quite the opposite)."
HMM doesn't affect the Linux kernel memory management code in any significant way. To be implemented on top of HMM will be DMA and other functionality. For those wishing to learn more about the internals of the Heterogeneous Memory Management system for Linux, see the HMM v7 mailing list post by Jerome Glisse. The earliest we could see this merged to mainline would be Linux 3.20 but given the scale of the work could very well be still a few releases out.