madv-populate-read · shipping · also madvise read population

MADV_POPULATE_READ

MADV_POPULATE_READ is a Linux operation that prefaults an existing virtual-memory range for read access and reports population errors.

Related Observatory article: Read on hesela.com

Available since Linux 5.14, this operation requires readable mappings and can target a subrange. Unlike mmap with MAP_POPULATE, explicit population reports errors; an error can still leave partial effects. [1]

Read preparation: the Linux v6.14 path faults pages for reading, without the write-fault flag. Anonymous memory can use a shared zero page, and private file mappings need not acquire private copies. Read population does not pre-break copy-on-write for later stores. [2] [3]

Boundary: page-table preparation is not a retained snapshot or a writeback operation. Population does not itself establish a memory lock; pages may later require faults again. mlock addresses residency under its own lifetime and resource constraints. [2] [4]

Relations

related
MADV_POPULATE_WRITE, Memory locking (mlock), Memory-mapped file

Advantages

  • Can expose population failures before the application dereferences an existing mapping.

Limitations

  • Does not prevent later truncation or other concurrent changes to the backing object.
  • May incur allocation, I/O and memory-pressure costs.

Citations

  1. Linux man-pages: madvise(2), explicit read/write population and errors (accessed 2026-12-01)
  2. Linux v6.14: faultin_page_range, access flags and dirty marking (accessed 2026-12-01)
  3. Linux v6.14: do_fault, private COW and shared write-fault paths (accessed 2026-12-01)
  4. Linux man-pages: mlock(2), residency guarantees and lock lifetime (accessed 2026-12-01)
Sources & caveats
  • API documentation and Linux v6.14 source review; implementation scope is distinct from the recorded host kernel.
  • A separate 24-observation Linux probe checks access permissions and partial population beyond EOF, not latency, allocation, memory pressure or durability: https://hesela.dev/research/madv-populate/README.md.

JSON: /data/terms/madv-populate-read.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. MADV_POPULATE_READ. Hesela. 2026-12-01. https://hesela.dev/terms/madv-populate-read/