vma_mmu_pagesize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– vma_mmu_pagesize πŸ’–

okay so bestie, welcome to section 9 of the Kernel API Manual β€” we're talking vma_mmu_pagesize(9) today and honestly? she's lowkey iconic. this is the page about the default MMU page size granularity for a VMA, and yes we're gonna get into it πŸŽ€


✨ NAME ✨

vma_mmu_pagesize β€” Default MMU page size granularity for this VMA.

like literally that's it, that's her whole job πŸ’…


🌸 SYNOPSIS 🌸

unsigned long vma_mmu_pagesize (struct vm_area_struct *vma );

so she takes one (1) pointer and hands you back an unsigned long. no drama. no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • vma β€” The user mapping. that's the struct vm_area_struct * bestie, the whole reason we're here ✨

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the vibe check πŸ‘‘

In the common case (the normal one, the default one, the one that just works 😌), the default page size used by the MMU matches the default page size used by the kernel β€” and if you wanna peep that one, go look at vma_kernel_pagesize. cute little sibling energy fr fr πŸ“

But on architectures where it differs?? that's where it gets spicy πŸ”₯ β€” an architecture-specific 'strong' version of this symbol is required. like, required required. not optional. the arch has to bring its own, periodt πŸ’€

And here's the important part, the part where nobody's allowed to be confused πŸ™ˆ: the default MMU page size is not affected by:

  • Transparent Huge Pages being in effect β€” nope, doesn't touch it, THP can be doing its whole thing and this value stays unbothered πŸ’β€β™€οΈ
  • any usage of larger MMU page sizes β€” also no, and that includes either architectural huge-page mappings or other explicit/implicit coalescing of virtual ranges performed by the MMU 🧚
bestie please internalise this one: THP and big pages are living their lives and they do NOT change what this function returns. it's giving "unaffected queen" 🌈

⭐ RETURN ⭐

The default MMU page size granularity for this VMA. that's the whole return value, that's what you get, slay πŸ’–


πŸŽ€ SEE ALSO πŸŽ€

Kernel file ./mm/vma.c β€” and the whole friend group πŸ’•

go read them, they're all main character energy in their own way πŸ˜­πŸ‘‘


ngl the moral of the story: this is the default MMU page size granularity for a VMA, it matches the kernel's default in the common case, archs that differ must supply a 'strong' version, and bigger pages do not change it. iykyk 🧚✨

and that's the page!! πŸŽ‰ sign-off time: this lil beauty came out of the ./mm source tree, dated October 2026, and it lives in the Kernel API Manual. mwah, go touch some page tables πŸ’…πŸ«ΆπŸŒΈ

πŸ“¦ where this page comes from