📺
YouTube · The Linux Foundation
5 YouTube-Aufrufe
Flexible Paging in Linux: Per-process Page Size - Dev Jain, Arm Ltd
Applications often run faster on a 64K page size kernel than on 4K. This is because larger pages reduce TLB pressure and pagetable walk overhead, greatly improving memory access speed. But, sysadmins are hesitant to use a 16K/64K kernel as most applications have been historically tuned for 4K pages, and larger pages can increase memory waste due to internal fragmentation. This creates a tradeoff between performance and memory waste.
We propose a design that changes the game by separating the page size of the user and the kernel. Instead of enforcing a single system-wide page size, processes can operate under different page-size ABIs. A performance-critical app can use a 64K page-size ABI while still running on a 4K kernel. We achieve this by enabling Linux to provide memory in 64K chunks via 16 contiguous 4K pages, and by translating operations on the 4K page table into a 64K “native” page table that serves as the actual hardware page table.
At the same time, lightweight or memory-sensitive applications can continue using 4K pages to minimize memory waste. All of this happens on the same Linux kernel, without requiring separate builds of the kernel.
Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf youtube.com.