Perforated Page: Supporting Fragmented Memory Allocation for Large Pages

Perforated Page: Supporting Fragmented Memory Allocation for Large Pages
复制标题

穿孔页:支持大页的碎片内存分配

DOI:
--
复制
发表时间:
2020
期刊:
International Symposium on Computer Architecture
影响因子:
--
通讯作者:
Jaehyuk Huh
Jaehyuk Huh
中科院分区:
--
文献类型:
--
作者:
Chang Hyun Park;Sanghoon Cha;Bokyeong Kim;Youngjin Kwon;D. Black;Jaehyuk Huh

文献摘要

被引文献

相似文献

大型页面的可用性大大提高了使用大量连续记忆区域的应用的地址翻译效率。但是,由于内存碎片,不可移动的页面,或者需要将大页面分成常规页面时,大页面可能很难分配。此外,由于稀疏访问应用程序数据引起的内存膨胀,它们也可能很昂贵。在这项工作中,即使在存在碎片的物理记忆的情况下,我们也可以分配大型2MB页面。穿孔的页面允许OS在分配给大页的物理地址范围内打4KB页面大小的孔,并根据需要将其重新映射到其他地址。这不仅使系统在碎裂存在的情况下从大页面中受益,而且还允许在大页面中存在不同的权限,从而增强了共享灵活性。此外,它允许在其他地方使用大页的未使用部分,从而减轻内存膨胀。为了最大程度地减少系统的更改,穿孔的页面重复使用4Kblevel Page表条目存储孔位置并将孔转换为常规的4KB页面。为了性能,提出的技术缓存了TLB中的孔页面的翻译,并通过L2 TLB中的缓存位图跟踪孔。通过在存在物理记忆碎片的情况下启用大型页面,穿孔页面增加了大页面的适用性和益处,而硬件和操作系统只有很小的变化。在这项工作中,我们通过定时模拟在各种和现实的碎片场景下评估了穿孔页面的有效性。我们的结果表明,即使有零散的内存,穿孔的页面也可以通过理想的内存分配来实现93.2%至99.9%的性能,而在传统系统中运行的具有零碎的内存的传统系统的性能要好2.0%至11.5%。
The availability of large pages has dramatically improved the efficiency of address translation for applications that use large contiguous regions of memory. However, large pages can be difficult to allocate due to fragmented memory, non-movable pages, or the need to split a large page into regular pages when part of the large page is forced to have a different permission status from the rest of the page. Furthermore, they can also be expensive due to memory bloating caused by sparse accesses to application data. In this work, we enable the allocation of large 2MB pages even in the presence of fragmented physical memory via perforated pages. Perforated pages permit the OS to punch 4KB page-sized holes in the physical address range allocated to a large page and re-map them to other addresses as needed. This not only enables the system to benefit from large pages in the presence of fragmentation, but also allows for different permissions to exist within a large page, enhancing sharing flexibility. In addition, it allows unused parts of a large page to be used elsewhere, mitigating memory bloating. To minimize changes to the system, perforated pages reuse the 4KBlevel page table entries to store the hole locations and translates holes into regular 4KB pages. For performance, the proposed technique caches the translations for hole pages in the TLBs and track holes via cached bitmaps in the L2 TLB. By enabling large pages in the presence of physical memory fragmentation, perforated pages increase the applicability and resulting benefits of large pages with only minor changes to the hardware and OS. In this work, we evaluate the effectiveness of perforated pages with timing simulations under diverse and realistic fragmentation scenarios. Our results show that even with fragmented memory, perforated pages accomplish 93.2% to 99.9% of the performance achievable by ideal memory allocation, and 2.0% to 11.5% better performance over the conventional system running with fragmented memory.