vm_normal_folio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ vm_normal_folio(9) ✨

okay bestie, so this is a page from the Kernel API Manual and it's about the little function vm_normal_folio β€” she's a whole vibe in mm/memory.c, and honestly? iconic. πŸ’…


🌸 NAME 🌸

vm_normal_folio β€” literally just getting the struct folio that goes with a PTE 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

struct folio * vm_normal_folio (struct vm_area_struct *vma , unsigned
long addr , pte_t pte );

like, she takes three things and gives you back a struct folio * β€” no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • vma β€” the VMA that's mapping the pte. like, where this whole thing lives 🏠
  • addr β€” the address where the pte is mapped. the actual spot πŸ“
  • pte β€” the PTE itself. the main character of this story πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so basically: get the struct folio associated with a PTE. that's it, that's the job πŸ’…

if you wanna know the whole lore about what counts as a "normal" mapping vs a "special" mapping, go read __vm_normal_page β€” she has all the details, iykyk πŸ“–βœ¨


🌈 RETURN 🌈

she returns the struct folio if this is a "normal" mapping πŸ’–

she returns NULL if this is a "special" mapping πŸ’€ like okay noted


⭐ SEE ALSO ⭐

kernel file ./mm/memory.c β€” and the whole squad, fr fr:


quick reminder bestie: "normal" gets you a folio, "special" gets you NULL β€” don't be out here dereferencing without a vibe check πŸ™ˆ

and that's the page!! sourced from ./mm, dated October 2026, and yeah β€” vm_normal_folio(9) ate and left no crumbs πŸ“πŸ’œ slay!! 🧚✨

πŸ“¦ where this page comes from