folio_putback_lru(9)
β¨ folio_putback_lru(9) β¨
okay bestie, welcome to the Kernel API Manual π β this is the folio_putback_lru page and it's literally the "oops put it back" of the memory-management world. no cap.
π NAME π
folio_putback_lru β put a previously isolated folio back onto the appropriate LRU list. it's giving "return to sender, but make it kernel" π¦
πΈ SYNOPSIS πΈ
void folio_putback_lru (struct folio *folio );
that's it. that's the whole signature. no return value, no drama, no hidden parameters. slay π
β ARGUMENTS β
folioβ the folio that's getting returned to an LRU list. that's your main character right there π
π DESCRIPTION π
so here's the vibe: you take a folio that was previously isolated and you add it to the appropriate LRU list. that's the whole job. iconic, low-effort, high-impact π«Ά
and like β big caveat incoming β the folio may still be unevictable for other reasons. so don't go thinking this magically makes it reclaimable, bestie, because it does not π it just goes back on the list. folio_putback_lru does not read the room on your behalf.
π§ CONTEXT π§
listen closely, this part is non-negotiable:
lru_lockmust not be held ππ«- interrupts must be enabled β‘β
get either of those wrong and, like, don't. just don't π
π¦ SEE ALSO π¦
- Kernel file
./mm/vmscan.c writeback_throttling_sane(9)lruvec_lru_size(9)remove_mapping(9)folio_isolate_lru(9)check_move_unevictable_folios(9)
go read folio_isolate_lru(9) next, it's the prequel ππ₯
fr fr: this page lives in./mm, it's the October 2026 edition, and it'sfolio_putback_lru(9)all the way down. now go put that folio back where it belongs ππ
π¦ 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