[论文解读] Scalable and Efficient Virtual Memory Sharing in Heterogeneous SoCs with TLB Prefetching and MMU-Aware DMA Engine
本文提出了一种基于混合IOMMU的异构SoC虚拟内存共享解决方案,通过编译器生成的预取辅助线程和修改后的DMA引擎,消除TLB缺失停顿,并将缓冲内存减少256倍。该方案通过主动管理TLB条目并实现无需额外缓冲的突发DMA传输,使不规则内存访问的性能最高提升4倍,规则访问模式的性能提升达60%。
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.
研究动机与目标
- 解决异构SoC上共享虚拟内存(SVM)系统中因TLB缺失导致的高运行时开销问题。
- 消除传统IOMMU中为吸收TLB缺失DMA突发而需要大容量片上缓冲的需求,避免内存浪费和所有主设备的停顿。
- 通过将TLB缺失处理与数据缓冲解耦,实现可扩展、高吞吐量的DMA传输至SVM。
- 通过减少TLB缺失延迟和频率,提升多核加速器中不规则和规则内存访问模式的性能。
提出的方法
- 引入由编译器插入的预取辅助线程(PHTs),利用运行时访问模式主动填充TLB,降低TLB缺失率。
- 使用可变数量的并行缺失处理辅助线程(MHTs)并行处理TLB缺失,确保在并行度增加时仍保持恒定的缺失处理延迟。
- 通过轻量级硬件修改DMA引擎,使其能够检测TLB缺失并仅停顿受影响的传输,避免对大容量数据缓冲的需求。
- 将混合IOMMU与支持突发传输至SVM的DMA引擎集成,无需额外缓冲,依赖TLB预取和每传输的缺失处理机制。
- 设计系统以根据工作负载特性,在编译时或运行时配置PHTs和MHTs。
- 仅使用64 B的退休缓冲区来跟踪突发元数据,与传统数据缓冲相比,将内存开销降低256倍。
实验结果
研究问题
- RQ1编译器生成的预取能否降低异构SoC上共享虚拟内存系统中的TLB缺失率?
- RQ2并行且可扩展的TLB缺失处理能否提升高并发和不规则内存访问模式工作负载的性能?
- RQ3通过修改DMA引擎以支持TLB缺失感知,能否在不增加片上内存缓冲的前提下支持SVM的突发DMA传输?
- RQ4与传统IOMMU相比,所提出的混合IOMMU解决方案在内存密集型内核的性能和内存效率方面有多大的优势?
主要发现
- 与现有最佳方案相比,该方案使加速器在不规则内存访问模式下的性能最高提升4倍。
- 对于规则内存访问模式,性能提升最高达60%,归因于TLB缺失开销降低和高效的突发DMA。
- 系统将用于缓冲TLB缺失DMA突发的内存减少256倍,从16 KiB降至仅64 B。
- 与理想IOMMU相比,所有操作强度下的开销均低于25%,在约每字节4个周期的操作强度下低于10%。
- 增加多个MHTs和PHTs可进一步提升性能,添加第二个MHT使性能提升40%,在内存受限场景中PHTs带来20%至40%的增益。
- 最优配置可在编译时选择或在运行时调整,实现对多样化工作负载的性能可扩展性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。