vm_normal_page_pmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vm_normal_page_pmd(9) β€” like, the "get the struct page for a PMD" girlie ✨

okay so this is a page from the Kernel API Manual, bestie β€” section 9, kernel dev vibes only. pull up a chair πŸŽ€


🌸 NAME 🌸

vm_normal_page_pmd β€” literally just gets you the "struct page" that's associated with a PMD. that's the whole gig. iconic behavior, no notes πŸ’–


✨ SYNOPSIS ✨

struct page * vm_normal_page_pmd (struct vm_area_struct *vma , unsigned
long addr , pmd_t pmd );

so she takes three things and gives you back a struct page *, periodt 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • vma β€” the VMA that's mapping the pmd. like, the neighborhood the pmd lives in 🏑
  • addr β€” the address where the pmd is mapped. the exact spot, no cap πŸ“
  • pmd β€” the PMD. yeah. it's the PMD. that's it. that's the argument πŸ’€

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so β€” get the "struct page" associated with a PTE. yes, we know the function name says PMD and this sentence says PTE, we're just relaying the lore, don't come for us 😭

if you want the details on what counts as a "normal" mapping versus a "special" mapping, go read __vm_normal_page β€” she's the main character who explains all of that. this one's just the PMD-flavored sibling πŸ’…


🌈 RETURN 🌈

  • returns the "struct page" if this is a "normal" mapping βœ… slay
  • returns NULL if this is a "special" mapping 🚫 so if you get NULL, don't panic, that's just the vibe check result

πŸŽ€ SEE ALSO πŸŽ€

all the sister functions and neighbors, fr fr β€” the whole group chat lives in the kernel file ./mm/memory.c:


πŸ’€ friendly reminder: NULL back does not mean something broke β€” it means "special" mapping. read the room before you file a bug, bestie.

and that's the page!! shipped from ./mm, dated October 2026 🌸 stay hydrated, keep your struct page * checks honest, and remember: normal mappings get a page, special mappings get NULL, and you get to slay πŸ’œβœ¨

πŸ“¦ where this page comes from