swapin_readahead(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… swapin_readahead(9) ✨

okay bestie, this one's straight out of the Kernel API Manual and it's giving "pre-game your memory access" energy 🫢


🌸 NAME 🌸

swapin_readahead β€” swap in pages in hope we need them soon πŸ’–


✨ SYNOPSIS ✨

struct folio * swapin_readahead (swp_entry_t entry , gfp_t gfp_mask ,
struct vm_fault *vmf );

πŸŽ€ ARGUMENTS πŸŽ€

  • entry β€” the swap entry of this memory, iykyk πŸŒ€
  • gfp_mask β€” the memory allocation flags, iconic little permission slips ✨
  • vmf β€” fault information, the receipts of the fault situation πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

So it returns the struct folio for entry and addr, after queueing swapin. periodt. πŸ’–

It's literally the main entry function for swap readahead πŸ”₯. By the configuration, it will read ahead blocks by cluster-based (ie, physical disk based) or vma-based (ie, virtual address based on faulty address) readahead. no cap, those are the two vibes 🌈

not me being obsessed with a readahead function, but here we are 😭

πŸ”₯ SEE ALSO πŸ”₯

the kernel file ./mm/swap_state.c is the source bestie, and the whole squad is:


xoxo, your kernel bestie πŸ’– this one's sourced from ./mm, dated October 2026 β€” slay and goodbye πŸŽ€βœ¨

πŸ“¦ where this page comes from