arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1804.11265cs.OScs.AR
收藏

Mosaic:一种应用透明的GPU软硬件协同内存管理器

Mosaic: An Application-Transparent Hardware-Software Cooperative Memory Manager for GPUs

Rachata Ausavarungnirun, Joshua Landgraf, Vance Miller, Saugata Ghose, Jayneel Gandhi, Christopher J. Rossbach, Onur Mutlu

摘要:

现代GPU面临着一个权衡问题,即用于存储管理的页面大小如何影响地址转换和按需分页。对多个页面大小的支持可以帮助放松页面大小的权衡,以便地址转换和按需分页优化协同工作。但是,现有的页面合并和拆分策略需要进行成本高昂的基页面迁移,这削弱了多个页面大小提供的好处。在本文中,我们观察到GPGPU应用程序提供了一个支持多个页面大小而无需昂贵的数据迁移的机会,因为应用程序可以执行大部分内存分配(即,它们一次分配大量的基页)。我们表明,这种增强分配使我们能够创建智能的内存分配策略,确保在虚拟内存中连续的基本页面被分配给连续的物理内存页面。因此,合并和拆分操作不再需要迁移基页。我们介绍Mosaic,一个GPU内存管理器,为多种页面大小提供应用程序透明的支持。Mosaic使用基页在系统I/O总线上传输数据,并以(1)保持基页连续性和(2)确保大页帧仅包含来自单个内存保护域的页的方式分配物理内存。这种机制允许TLB使用大页面,从而减少地址转换开销。在数据传输过程中,这种机制使GPU能够通过系统I/O总线仅传输应用程序所需的基本页面,从而保持较低的需求分页开销。

英文摘要:

Modern GPUs face a trade-off on how the page size used for memory management affects address translation and demand paging. Support for multiple page sizes can help relax the page size trade-off so that address translation and demand paging optimizations work together synergistically. However, existing page coalescing and splintering policies require costly base page migrations that undermine the benefits multiple page sizes provide. In this paper, we observe that GPGPU applications present an opportunity to support multiple page sizes without costly data migration, as the applications perform most of their memory allocation en masse (i.e., they allocate a large number of base pages at once). We show that this en masse allocation allows us to create intelligent memory allocation policies which ensure that base pages that are contiguous in virtual memory are allocated to contiguous physical memory pages. As a result, coalescing and splintering operations no longer need to migrate base pages. We introduce Mosaic, a GPU memory manager that provides application-transparent support for multiple page sizes. Mosaic uses base pages to transfer data over the system I/O bus, and allocates physical memory in a way that (1) preserves base page contiguity and (2) ensures that a large page frame contains pages from only a single memory protection domain. This mechanism allows the TLB to use large pages, reducing address translation overhead. During data transfer, this mechanism enables the GPU to transfer only the base pages that are needed by the application over the system I/O bus, keeping demand paging overhead low.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑