folio_add_lru_vma(9)
β¨ folio_add_lru_vma β¨
okay so first things first, this is a page from the Kernel API Manual bestie, and it's all about getting a folio onto the right LRU list for a given VMA. very specific, very niche, very demure. let's get into it π
πΈ SYNOPSIS πΈ
void folio_add_lru_vma (struct folio *folio , struct vm_area_struct *vma
);
like yes, that's the whole signature, she's not complicated π
π¦ ARGUMENTS π¦
folioβ the folio that's getting added to the LRU. that's her, that's the main character of this function π«Άvmaβ the VMA that the folio is mapped in. literally where she lives.
π₯ DESCRIPTION π₯
so here's the vibe check: if the VMA is mlocked, the folio gets added to the unevictable list. she's staying put, no eviction era for her, periodt π
otherwise? if the VMA isn't mlocked, it's handled exactly the same way as folio_add_lru. same treatment, different path, iykyk β¨
ngl this is one of those "small function, very important consequences" situations. which list a folio lands on is kind of a whole thing in the kernel π§
π SEE ALSO π
- Kernel file
./mm/folio.c folio_mark_accessed(9)folio_add_lru(9)deactivate_file_folio(9)folio_mark_lazyfree(9)lru_cache_drain_for_folio(9)folios_put_refs(9)release_pages(9)folio_batch_remove_exceptionals(9)
like, go read those too, they're the friend group and they all hang out in ./mm π
and that's the page!! no cap, that's everything. sourced from ./mm, dated October 2026, and yes the title line was folio_add_lru_vma(9) in case you forgot already π go add some folios to some LRUs responsibly, bestie π
β¨
π¦ 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