The final session in the memory-management track of the 2025 Linux Storage, Filesystem, Memory-Management, and BPF Summit was a brief, last-minute addition run by Kalesh Singh. The kernel's readahead mechanism is generally good for performance; it ensures that data is present by the time an application gets around to asking for it. Sometimes, though, readahead can go a little too far.
2025 年 Linux 存储、文件系统、内存管理和 BPF 峰会中,内存管理议题的最后一场会议是由 Kalesh Singh 临时追加并简要主持的一次讨论。内核的预读(readahead)机制通常对性能有益;它可以确保应用程序在访问数据时,数据已提前加载到内存中。然而,有时预读会“过度热情”,带来反效果。
Singh had a couple of example cases; the first had to do with ELF binaries that include extra padding for compatibility with systems that have a large base-page size. On systems with smaller pages, that padding is just useless data that could happily remain on disk, but the readahead machinery is reading it into the page cache anyway. That creates useless I/O and wastes memory with