Linux mmap() file access page faults explained
This article explores the mechanics of the mmap() syscall in Linux systems, explaining how virtual memory mapping, page tables, and page faults operate during file access. The author demonstrates how to inspect memory mappings and track major versus minor page faults using diagnostic tools like pmap, sar, and perf trace. Additionally, the text details the behavior of the MADV_DONT_NEED flag and how the kernel handles page cache eviction under memory pressure. Open article →