GCMA: Guaranteed Contiguous Memory Allocator
The importance of physically contiguous memory has increased in modern computing environments, including both low- and high-end systems. Existing physically contiguous memory allocators generally have critical limitations. For example, the most commonly adopted solution, the memory reservation technique, wastes a significant amount of memory space. Scatter/Gather direct memory access (DMA) and input-output memory management units (IOMMUs) avoid this problem by utilizing additional hardware for address space virtualization. However, additional hardware means an increase in costs and power consumption, which is especially disadvantageous for small systems and they do not provide real contiguous memory. Linux Contiguous Memory Allocator (CMA) aims to provide both contiguous memory allocation and to maximize memory utilization based on page migration, but they suffer from unpredictably long latency and a high probability of allocation failure. Therefore, we introduce a new solution to this problem, the guaranteed contiguous memory allocator (GCMA). This guarantees efficient memory space utilization, short latency, and successful allocation. The GCMA uses a reservation scheme and increases memory utilization by sharing the memory with immediately discardable data. Our evaluation of a GCMA on a Raspberry Pi 2 finds a latency that is 15-130 times lower compared to a CMA, and a latency that is up to 10 times lower when taking a photo. Using a large working set in a memory-fragmented high-end system, the GCMA is able to produce a 2.27× speedup.
Source Code
The source code for this version has been submitted to LKML for discussion. A complete git tree is also available at Github.
Publications and Presentations
- SeongJae Park, Minchan Kim, Heon Y. Yeom, GCMA: Guaranteed Contiguous Memory Allocator. In Transactions on Computers, March 2019. Link
- SeongJae Park, GCMA: Guaranteed Contiguous Memory Allocator. In The Linux Kernel Summit, November 2018. Slides, Video, Link
- SeongJae Park, Minchan Kim, Heon Y. Yeom, GCMA: Guaranteed Contiguous Memory Allocator. In 45th issue of ACM SIGBED Review, January 2016. Paper, Link
- SeongJae Park, Minchan Kim, Heon Y. Yeom, GCMA: Guaranteed Contiguous Memory Allocator. In Embedded Operating Systems Workshop (EWiLi), October 2015. Paper, Slides
- SeongJae Park, Minchan Kim, GCMA: Guaranteed Contiguous Memory Allocator. In Linux Foundation Korea Linux Forum (LFKLF), October 2014. Slides