folio_move_anon_rmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– folio_move_anon_rmap(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” yes, the Kernel API Manual, we're doing kernel internals today and honestly? kind of iconic of us. this page is about folio_move_anon_rmap, and no cap, it's a little one-pager with a big glow-up energy. let's get into it ✨


πŸŽ€ NAME πŸŽ€

folio_move_anon_rmap β€” move a folio to our anon_vma 🫢

like, it's literally right there in the name. we're moving a folio. it's becoming ours. main character move.


🌸 SYNOPSIS 🌸

void folio_move_anon_rmap (struct folio *folio , struct vm_area_struct
*vma );

no return value, no drama, just vibes and two arguments. periodt πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • folio β€” The folio to move to our anon_vma. this is the lil guy we're relocating. it's coming home with us 🏠
  • vma β€” The vma the folio belongs to. gotta know which vma it's repping, iykyk.

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea β˜• β€” when a folio belongs exclusively to one single process after a COW event (yes, copy-on-write, we know her), that folio is free to be moved into the anon_vma that belongs to just that one process. just. that. process.

the way that this works is genuinely so satisfying: because the folio is now living its solo era in that process's own anon_vma, the rmap code will not search the parent or sibling processes anymore. no more scrolling through the whole family group chat. it goes straight to the one person it needs. efficiency slay πŸ”₯

lowkey important: this is a post-COW-exclusive situation only β€” the whole point is that nobody else is sharing it anymore. that's the vibe check that makes the move valid πŸ’―

⭐ SEE ALSO ⭐

everything below lives in the kernel file ./mm/rmap.c and honestly it's giving rmap extended universe 🌈:

go read those too bestie, they're all in ./mm/rmap.c, they're all waiting 🧚


🌷 the cute sign-off 🌷

this lil masterpiece comes from the source ./mm, dated October 2026 β€” mark your calendars, screenshot it, put it in the group chat. and that's the whole page, bestie. you ate. we ate. the folio is home. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from