Heterogeneous Memory Management Is Coming Along For The Linux Kernel

Written by Michael Larabel in Linux Kernel on 22 December 2014 at 12:14 PM EST. 20 Comments
Jerome Glisse remains hard at work on readying his Heterogeneous Memory Management (HMM) patch-set for eventual integration into the mainline Linux kernel. This HMM memory management will benefit HSA/OpenCL workloads on Linux.

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.
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