folio_alloc_swap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_alloc_swap(9) β€” like, the Kernel API Manual page, bestie πŸŽ€

okay so picture this: we're in the Kernel API Manual and this little icon is about to get swap space sorted for a folio. yes we're doing kernel memory management in the group chat. slay. πŸ’–


✨ NAME ✨

folio_alloc_swap β€” allocate swap space for a folio πŸ¦‹


🌸 SYNOPSIS 🌸

int folio_alloc_swap (struct folio *folio );

literally copy that exactly, don't @ me about the spacing πŸ™ˆ


πŸŽ€ ARGUMENTS πŸŽ€

  • folio β€” the folio we want to move to swap. that's the whole vibe. she's the main character here πŸ‘‘

⭐ DESCRIPTION ⭐

So what she does: allocate swap space for the folio, then add the folio to the swap cache. that's it, that's the function. two jobs, both iconic, no notes. ✨


🫢 CONTEXT 🫢

Heads up bestie: the caller needs to hold the folio lock before calling this. no lock, no entry. πŸ”’

πŸ’œ RETURN πŸ’œ

Returns whether the folio was added to the swap cache. yes/no energy. iykyk. 🌈


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./mm/swapfile.c β€” plus the whole friend group:


okay that's the whole page!! πŸŽ‰ this lives under ./mm, it's from October 2026, and it's folio_alloc_swap(9) forever and always. go forth and swap your folios, bestie β€” ily, drink some water, and may your locks always be held πŸ’…πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from