hugetlb_linear_page_index(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ hugetlb_linear_page_index πŸ’…

okay so bestie, quick vibe check: this is a page from the Kernel API Manual πŸŽ€ and it's about hugetlb_linear_page_index β€” literally linear_page_index() but in hugetlb page size granularity. that's the whole personality. that's the whole function. iykyk πŸ¦‹


✨ NAME ✨

hugetlb_linear_page_index β€” it's linear_page_index() but in hugetlb page size granularity, no cap 🫢


✨ SYNOPSIS ✨

pgoff_t hugetlb_linear_page_index (struct vm_area_struct *vma , unsigned
long address );

look at her. immaculate signature. not a single character out of place πŸ’…βœ¨


✨ ARGUMENTS ✨

  • vma β€” the hugetlb VMA πŸ‘‘ like, the actual virtual memory area we're talking about here
  • address β€” the virtual address within the VMA πŸ“ the one you're asking about, bestie

✨ RETURN ✨

it hands you back the page offset within the mapping in huge page units ⭐ that's the return value. pgoff_t. slay.


🌈 SEE ALSO 🌈

  • Kernel file ./include/linux/hugetlb.h β€” go read it, fr fr πŸ“–πŸ¦‹

πŸ’€ lowkey reminder: this whole page is tiny but every single word of it matters, so don't skip the granularity part. it's giving "small but iconic."

and that's the whole page, bestie!! πŸŽ€ signed off from ./include/linux with a big fat October 2026 date stamp on it β€” periodt. πŸ’œπŸŒΈ

πŸ“¦ where this page comes from