pmd_set_huge(9)
β¨ pmd_set_huge(9) β¨
okay so we're in the Kernel API Manual bestie, and today's main character is pmd_set_huge π
β the little function that goes "here, have a huge PMD mapping" π
πΈ NAME πΈ
pmd_set_huge β set up kernel PMD mapping. literally what it says on the tin, no cap π«Ά
π¦ SYNOPSIS π¦
int pmd_set_huge (pmd_t *pmd , phys_addr_t addr , pgprot_t prot );
three args, one int coming back at you. slay β¨
π ARGUMENTS π
pmdβ pointer to the PMD entry π§ this is the thing we're messing withaddrβ the virtual address associated with the PMD entry πprotβ the protection bits to use π yes, these matter, don't sleep on them
π DESCRIPTION π
so the actual explanation? it's not even here β it says:
See text over pud_set_huge above.
like, go look at your sister function's docs, she has the whole story π iykyk
returns 1 on success and 0 on failure. that's it, that's the whole vibe β no negative errno era, just a humble little 1 or 0 β
π SEE ALSO π
- Kernel file
./arch/x86/mm/pgtable.creserve_top_address(9) p4d_set_huge(9)p4d_clear_huge(9)pud_set_huge(9)pud_clear_huge(9)pmd_clear_huge(9)(the one who undoes all this π)pmd_free_pte_page(9)
the whole huge-page friend group fr fr π
and that's the page!! brought to you by the files in ./arch/x86/mm, dated October 2026 β mwah, go touch some page tables bestie π
π
π¦ 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