Implementing CPU-Local Free-Page Management for an Explicit Virtual-Memory Interface in Linux

Memory-Mapped I/O (MMIO) is attractive for applications because the OS takes care of the memory management. However, its speed is limited by high overheads, whose effects are exacerbated by new fast block storage. Certain applications like databases can also face consistency problems because the OS can write memory back to disk at any point during transactions.

Exmap is a new operating system interface for managing memory separate from the system's memory management within a limited address range. With exmap, applications can explicitly control allocation and eviction of 4K pages. Additionally, exmap outperforms the MMIO provided by Linux significantly, and can easily saturate multiple modern high-speed SSDs.

The memory area managed by exmap contains a fixed number of pages taken from the system, which are not returned during its lifetime. This limited pool of free pages has to be distributed within exmap. Currently, exmap is controlled via a number of interfaces, each with their own list of free pages. Previously, for allocations where no pages are available locally on an interface, pages would be stolen from another interface, which was quite slow. Now, free pages are managed in bundles of 512, taken from or returned to a global free list when necessary.

As the free page management is performance-critical, optimizing its speed is a central concern. In this thesis, alternative methods should be designed and evaluated, including a CPU-local approach for which the per-thread interfaces would no longer be necessary.