一句话:提出 DVM,通过让虚拟地址与物理地址几乎始终相同,用区域级验证替代页级地址翻译,降低加速器与 CPU 的虚拟内存开销。
加速器正成为计算增长的重要驱动力,而共享虚拟内存虽能简化编程并保证安全的数据共享,其地址翻译开销对加速器而言比通用处理器更高。直接访问物理内存性能高,但既不安全也更难编程。本文提出 Devirtualized Memory(DVM),通过分配内存使物理地址与虚拟地址几乎总是相同(VA==PA),将页级地址翻译大部分替换为更快的区域级 Devirtualized Access Validation(DAV);在读访问时还可将 DAV 与数据取回重叠,以隐藏虚拟内存开销。DVM 只需少量 OS 与 IOMMU 改动,并对应用透明。作者在 Linux 4.10 中实现 DVM,在图处理加速器上平均将虚拟内存开销降至 1.6%,相比优化的传统虚拟内存实现性能提升 2.1 倍,动态能耗降低 3.9 倍;并进一步讨论将 DVM 扩展到 CPU 的潜力,可将平均虚拟内存开销从传统方案的 29% 降至 5%。
Accelerators are increasingly recognized as one of the major drivers of future computational growth. For accelerators, shared virtual memory (VM) promises to simplify programming and provide safe data sharing with CPUs. Unfortunately, the overheads of virtual memory, which are high for general-purpose processors, are even higher for accelerators. Providing accelerators with direct access to physical memory (PM) in contrast, provides high performance but is both unsafe and more difficult to program. We propose Devirtualized Memory (DVM) to combine the protection of VM with direct access to PM. By allocating memory such that physical and virtual addresses are almost always identical (VA==PA), DVM mostly replaces page-level address translation with faster region-level Devirtualized Access Validation (DAV). Optionally on read accesses, DAV can be overlapped with data fetch to hide VM overheads. DVM requires modest OS and IOMMU changes, and is transparent to the application. Implemented in Linux 4.10, DVM reduces VM overheads in a graph-processing accelerator to just 1.6% on average. DVM also improves performance by 2.1X over an optimized conventional VM implementation, while consuming 3.9X less dynamic energy for memory management. We further discuss DVM's potential to extend beyond accelerators to CPUs, where it reduces VM overheads to 5% on average, down from 29% for conventional VM.
DOI 原文 ·
@inproceedings{paperbot4257,
title = {Devirtualizing Memory in Heterogeneous Systems},
author = {Swapnil Haria and Mark D. Hill and Michael M. Swift},
booktitle = {ASPLOS},
year = {2018},
doi = {10.1145/3173162.3173194}
}