folio_add_lru(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_add_lru β€” from the Kernel API Manual, bestie

okay so real talk, this one's a kernel-function page (folio_add_lru(9)) and it's short but it's mighty, so let's get into it 🫢


✨ NAME ✨

folio_add_lru β€” literally just: add a folio to an LRU list. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

void folio_add_lru (struct folio *folio );

no return value, it's a void girlie β€” she does the thing and dips πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • folio β€” the folio that's getting added to the LRU. that's it, that's the whole argument, she's low maintenance ✨

πŸ”₯ DESCRIPTION πŸ”₯

so what's actually happening: you queue the folio for addition to the LRU. not "add it right now" β€” queue. subtle but iconic 😌

the whole decision on whether the page goes on the [in]active [file|anon] list? highkey deferred until the folio_batch is drained. she's not rushing, she's strategising ⭐

and the reason for that little delay is genuinely cute: it gives the caller of folio_add_lru a chance to have the folio added to the active list instead, by using folio_mark_accessed. it's giving main character energy for the caller, fr fr 🧚


🌈 SEE ALSO 🌈


okay that's the whole page, no cap πŸ’– she lives in ./mm, and the fine humans of the kernel docs stamped her October 2026 β€” so go forth and queue those folios responsibly, bestie πŸ‘‘ 🌸

πŸ“¦ where this page comes from