folio_evictable(9)
π folio_evictable β a Kernel API Manual moment (section 9, bestie)
okay so this is folio_evictable(9) from the Kernel API Manual and honestly? it's a little vibe check for your memory. keep up π«Ά
β¨ NAME β¨
folio_evictable β literally just testing whether a folio is evictable. that's it. that's the function π
πΈ SYNOPSIS πΈ
bool folio_evictable (struct folio *folio );
π ARGUMENTS π
folioβ the folio you're testing. the main character of this whole operation π
π¦ DESCRIPTION π¦
so what this does: it tests whether folio is evictable β meaning, should it go on the active/inactive lists, or does it belong on the unevictable list? it's giving sorting-hat energy fr fr π
and the reasons a folio might not be evictable? there are exactly two and i need you to memorize them:
- the folio's mapping is marked unevictable π
- one of the pages in the folio is part of an
mlockedVMA π«Ά
that's the whole test. no cap.
π SEE ALSO π
the kernel file ./mm/internal.h and its little friend group π:
folio_pte_batch_flags(9)pte_move_swp_offset(9)pte_next_swp_offset(9)swap_pte_batch(9)sync_with_folio_pmd_zap(9)vma_filebacked_address(9)vma_anon_address(9)
ok that's the whole page bestie, go forth and evict (or don't) π
and for the sign-off: this iconic little number lives in ./mm, version dated October 2026, and yes it's folio_evictable(9) β periodt. πβ¨
π¦ 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