pmd_clear_huge(9)
π pmd_clear_huge β Kernel API Manual β¨
okay so bestie, welcome to the Kernel API Manual entry for pmd_clear_huge(9) β yes it's a real manpage section nine situation and yes we're gonna read it together π«Ά
β¨ NAME β¨
pmd_clear_huge β clear a kernel PMD mapping when it's set π
Like, if the PMD mapping is chillin' there all set, this is the function that un-sets it. Very "pack up your stuff, we're leaving" energy. π
πΈ SYNOPSIS πΈ
int pmd_clear_huge (pmd_t *pmd );
That's the whole signature, no cap. Returns an int, takes a pointer to a pmd_t. Iconic, minimal, slays. β
π¦ ARGUMENTS π¦
pmdβ pointer to the PMD entry you wanna clear. That's it. That's the vibe check. Point it at the entry and let the function do its thing. π
π₯ DESCRIPTION π₯
So here's the tea: pmd_clear_huge returns 1 on success and 0 on failure β and the failure case is specifically when no PMD map is found. π
That's literally it, bestie. One job, done well. No drama, no surprises, just a clean little 1-or-0 situation. Ngl, sometimes the simplest functions have the most main character energy. π
Heads up: the return value is how you know what happened β1means it worked,0means nothing was found to clear. Don't sleep on checking it. π
π SEE ALSO π
Kernel file ./arch/x86/mm/pgtable.c plus the whole friend group:
reserve_top_address(9)p4d_set_huge(9)p4d_clear_huge(9)pud_set_huge(9)pmd_set_huge(9)pud_clear_huge(9)pmd_free_pte_page(9)
Like yes, pmd_set_huge(9) is literally the setter to this getter-adjacent queen β they're a matched set, iykyk. π And the p4d/pud girlies are all doing the same huge-page dance at different levels. π§
okay that's the whole page!! this lil beauty lives in ./arch/x86/mm and the source version/date on the original says October 2026 β so go forth, clear those PMD mappings, and remember: 1 = slay, 0 = no map found, and that's periodt. π
β¨π β xoxo, your kernel group chat π
π¦ 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