Supporting the Allocation of Large Contiguous Regions of MemoryMel Gorman (email@example.com)
Some modern processors such as later Opterons and Power are able to support very large pages sizes such as 1GiB and 16GiB pages. These page sizes are impractical to reserve at boot time because of the amount of memory that may be potentially wasted. However, Linux as it currently stands is ill-suited to support multiple page sizes, not least because it makes no effort to satisfy allocations for contiguous regions of memory. This paper will discuss features under development that aim to support the allocation of medium to large contiguous areas.
This paper begins by discussing the current status of mechanisms to reduce external fragmentation in the page allocator. The reduction of external fragmentation still results a situation where there are many sparsely populated superpages that must be reclaimed. We introduce a memory compaction mechanism that migrates pages from sparsely populated to dense regions when there is available memory. We then illustrate how in low memory situations poor reclaim decisions offset the performance benefits of superpages, before describing how page reclaim can intelligently reclaim contiguous ranges. We then show how parallel allocators prevent contiguous allocations by taking free pages from ranges being reclaimed. We conclude by describing how a range of pages can be made temporarily unavailable for allocators.