swapin_readahead(9)
π 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:
swap_cache_get_folio(9)swap_cache_has_folio(9)swap_cache_get_shadow(9)__swap_cache_add_check(9)__swap_cache_add_folio(9)__swap_cache_del_folio(9)swap_cache_del_folio(9)__swap_cache_replace_folio(9)swap_cache_alloc_folio(9)swap_update_readahead(9)swapin_sync(9)swap_cluster_readahead(9)swap_vma_readahead(9)
xoxo, your kernel bestie π this one's sourced from ./mm, dated October 2026 β slay and goodbye πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms