folio_isolate_lru(9)
okay so bestie, welcome to folio_isolate_lru(9) from the Kernel API Manual π
β this is the LRU-isolation glow-up you didnβt know you needed. Weβre gonna keep every detail, no cap, and make it make sense. π
πΈ NAME πΈ
folio_isolate_lru β try to isolate a folio from its LRU list. π«Ά
β¨ SYNOPSIS β¨
bool folio_isolate_lru (struct folio *folio );
π ARGUMENTS π
folioβ the folio to isolate from its LRU list. π¦
π DESCRIPTION π
Okay so the main character here is isolating a folio from an LRU list, and adjusting the vmstat statistic that corresponds to whatever LRU list the folio was on. β¨
After that: the folio will have its LRU flag cleared. If it was found on the active list, it will have the Active flag set. If it was found on the unevictable list, it will have the Unevictable flag set. Heads up, bestie: these flags may need to be cleared by the caller before letting the page go. π«Ά
Now the rules, and yes they are giving strict:
- Must be called with an elevated refcount on the folio. This is a fundamental difference from
isolate_lru_folios(which is called without a stable reference). π₯ - The
lru_lockmust not be held. π - Interrupts must be enabled. β
π«§ CONTEXT π«§
Blank in the original β no context notes here, just vibes. π«§
π¦ RETURN π¦
trueif the folio was removed from an LRU list. πfalseif the folio was not on an LRU list. π
π SEE ALSO π
Kernel file ./mm/vmscan.c β thatβs the source file mentioned. Then the squad:
writeback_throttling_sane(9)lruvec_lru_size(9)remove_mapping(9)folio_putback_lru(9)check_move_unevictable_folios(9)
xoxo from ./mm, dated October 2026 πβ¨ β bestie, go isolate responsibly. π
π¦ 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