thp_size(9)
π¦ thp_size β how big even IS this transparent huge page, bestie
okay so this one is from thp_size(9), straight out of the Kernel API Manual, and it's genuinely one of the shortest little guys in the whole kernel doc set β but that doesn't mean we're not gonna give it the full main-character treatment π
β¨ NAME β¨
thp_size β literally just: the size of a transparent huge page. that's the whole vibe. no cap. π
πΈ SYNOPSIS πΈ
unsigned long thp_size (struct page *page );
copy it exactly like that, bestie, spacing and all β do not come for me about formatting, that's how the original eats π
π ARGUMENTS π
pageβ the head page of a transparent huge page. yes, the head one. the leader. the one with main character energy π the rest of the pages in the huge page are just following along.
β RETURN β
the return value is the number of bytes in this page. that's it. that's the answer. it's giving "small function, big responsibility" π
π₯ SEE ALSO π₯
okay this is the part where I need you to brace yourself, because the SEE ALSO section is serving β there are like a million cross-references here and I'm listing every single one because we do not skip entries in this house π«Ά
folio_page_idx(9)vma_flag_t(9)fault_flag_allow_retry_first(9)vma_kernel_pagesize(9)folio_order(9)folio_reset_order(9)folio_mapcount(9)folio_mapped(9)thp_order(9)folio_get(9)folio_put(9)folio_put_refs(9)folios_put(9)vma_flags_is_cow_mapping(9)vma_is_cow_mapping(9)vma_desc_is_cow_mapping(9)folio_pfn(9)folio_mk_pte(9)folio_mk_pmd(9)folio_mk_pud(9)folio_maybe_dma_pinned(9)is_zero_page(9)is_zero_folio(9)folio_nr_pages(9)folio_next(9)folio_shift(9)folio_size(9)folio_maybe_mapped_shared(9)folio_expected_ref_count(9)zap_vma(9)ptdesc_address(9)ptdesc_set_kernel(9)ptdesc_clear_kernel(9)ptdesc_test_kernel(9)pagetable_alloc(9)pagetable_free(9)vma_lookup(9)vma_start_pgoff(9)vma_end_pgoff(9)vma_last_pgoff(9)vma_start_anon_pgoff(9)vma_end_anon_pgoff(9)vma_last_anon_pgoff(9)mmap_action_remap(9)mmap_action_remap_full(9)mmap_action_ioremap(9)mmap_action_ioremap_full(9)mmap_action_simple_ioremap(9)mmap_action_map_kernel_pages(9)mmap_action_map_kernel_pages_full(9)range_is_subset(9)range_in_vma(9)range_in_vma_desc(9)clear_pages(9)
and if you're wondering where all these live β they're referenced from the kernel file ./include/linux/mm.h. that's the one. that's the header. go look, I'll wait π§
π real talk though: thp_size gives you the byte count, but it's asking about a transparent huge page, so pass it the head page and not some random tail page you found lying around. iykyk.
aaand that's the whole page, bestie β nothing more, nothing less π
sign-off szn: this absolute gem comes to you from ./include/linux, dated October 2026, and it is iconic for being like four lines of actual content and then a whole SEE ALSO wall. obsessed. periodt ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms