[Paper Review] Scalable and Efficient Virtual Memory Sharing in Heterogeneous SoCs with TLB Prefetching and MMU-Aware DMA Engine
This paper proposes a hybrid IOMMU-based virtual memory sharing solution for heterogeneous SoCs that uses compiler-generated prefetching threads and a modified DMA engine to eliminate TLB miss stalls and reduce buffer memory by 256×. It achieves up to 4× speedup for irregular memory access and 60% improvement for regular patterns by proactively managing TLB entries and enabling burst DMA without additional buffers.
Shared virtual memory (SVM) is key in heterogeneous systems on chip (SoCs), which combine a general-purpose host processor with a many-core accelerator, both for programmability and to avoid data duplication. However, SVM can bring a significant run time overhead when translation lookaside buffer (TLB) entries are missing. Moreover, allowing DMA burst transfers to write SVM traditionally requires buffers to absorb transfers that miss in the TLB. These buffers have to be overprovisioned for the maximum burst size, wasting precious on-chip memory, and stall all SVM accesses once they are full, hampering the scalability of parallel accelerators. In this work, we present our SVM solution that avoids the majority of TLB misses with prefetching, supports parallel burst DMA transfers without additional buffers, and can be scaled with the workload and number of parallel processors. Our solution is based on three novel concepts: To minimize the rate of TLB misses, the TLB is proactively filled by compiler-generated Prefetching Helper Threads, which use run-time information to issue timely prefetches. To reduce the latency of TLB misses, misses are handled by a variable number of parallel Miss Handling Helper Threads. To support parallel burst DMA transfers to SVM without additional buffers, we add lightweight hardware to a standard DMA engine to detect and react to TLB misses. Compared to the state of the art, our work improves accelerator performance for memory-intensive kernels by up to 4x and by up to 60% for irregular and regular memory access patterns, respectively.
Motivation & Objective
- Address the high runtime overhead caused by TLB misses in shared virtual memory (SVM) systems on heterogeneous SoCs.
- Eliminate the need for large on-chip buffers to absorb TLB-missing DMA bursts in conventional IOMMUs, which waste memory and stall all masters.
- Enable scalable, high-throughput DMA transfers to SVM by decoupling TLB miss handling from data buffering.
- Improve performance for both irregular and regular memory access patterns in many-core accelerators by reducing TLB miss latency and frequency.
Proposed method
- Introduce compiler-inserted Prefetching Helper Threads (PHTs) that proactively populate the TLB using runtime access patterns, reducing TLB miss rates.
- Use a variable number of parallel Miss Handling Helper Threads (MHTs) to handle TLB misses in parallel, ensuring constant miss handling latency under increasing parallelism.
- Modify the DMA engine with lightweight hardware to detect TLB misses and stall only the affected transfer, avoiding the need for large data buffers.
- Integrate the hybrid IOMMU with a DMA engine that supports burst transfers to SVM without additional buffering, relying on TLB prefetching and per-transfer miss handling.
- Design the system to allow compile-time or runtime configuration of PHTs and MHTs based on workload characteristics.
- Use a retirement buffer of only 64 B to track burst metadata, reducing memory overhead by a factor of 256 compared to conventional data buffers.
Experimental results
Research questions
- RQ1Can compiler-generated prefetching reduce TLB miss rates in shared virtual memory systems on heterogeneous SoCs?
- RQ2Can parallel, scalable TLB miss handling improve performance for workloads with high concurrency and irregular memory access patterns?
- RQ3Can burst DMA transfers to SVM be supported without additional on-chip memory buffers by modifying the DMA engine for TLB miss awareness?
- RQ4To what extent does the proposed hybrid IOMMU solution outperform conventional IOMMUs in terms of performance and memory efficiency for memory-intensive kernels?
Key findings
- The proposed solution improves accelerator performance by up to 4× for irregular memory access patterns compared to the state of the art.
- For regular memory access patterns, performance improves by up to 60% due to reduced TLB miss overhead and efficient burst DMA.
- The system reduces the memory required to buffer TLB-missing DMA bursts by a factor of 256, from 16 KiB to just 64 B.
- The overhead compared to an ideal IOMMU is reduced to below 25% across all operational intensities and below 10% at an operational intensity of approximately 4 cycles per byte.
- Adding multiple MHTs and PHTs increases performance further, with a 40% improvement when adding a second MHT and a 20–40% gain from PHTs in memory-bound scenarios.
- The optimal configuration can be selected at compile time or adjusted at runtime, enabling performance scaling across diverse workloads.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.