folio_add_lru_vma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 🌈

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