Faster & Fewer Page Faults

We have improved the Linux page fault mechanism to reduce the number of faults and handle them more quickly when they do happen. By managing memory in large folios, we reduce the number of page faults. The 4KiB page used on many architectures is simply too small for the amount of memory we need to manage today. When you take a page fault, the kernel can allocate multiple pages and map them all at the same time. By managing VMAs in a Maple Tree, we handle page faults more quickly. The Maple Tree is shallower than the red-black tree and uses the CPU cache more effectively. When you take a page fault, the kernel can find the information it needs to handle the page fault more quickly. These two projects together result in a significant reduction of time spent handling page faults and allow your computer to spend more of its time running user code. No cars were crashed in the execution of this project.

Matthew Wilcox

Matthew has been a Linux kernel hacker for 25 years. He has worked on many parts of the kernel including the Arm, PA-RISC and ia64 architectures, TASK_KILLABLE, PCI, SCSI, NVMe, USB, filesystems, file locking, DAX and the  XArray. He works for Oracle on a variety of projects including memory management and filesystems. He recently appointed himself the page cache maintainer.