touch_pmd(9)
π touch_pmd(9) β like, the whole manual page, bestie
okay so this is touch_pmd, straight out of the Kernel API Manual (yes, the manpage name is literally the function name, we love a self-titled era). It's a kernel function, it deals with page tables, and honestly? It's giving "small function, big responsibilities." Let's get into it π
β¨ NAME β¨
touch_pmd β mark the page table pmd entry as accessed and dirty (for write). That's it, that's the whole vibe. It's touching the pmd. Respectfully. π«Ά
πΈ SYNOPSIS πΈ
bool touch_pmd (struct vm_area_struct *vma , unsigned long addr , pmd_t
*pmd , bool write );
She takes four args and returns a bool. Iconic signature, no notes. β¨
π¦ ARGUMENTS π¦
vmaβ the VMA that's coveringaddr. Like, the neighborhood this address lives in πaddrβ the virtual address itself. The main character, literally πpmdβ a pmd pointer into the page table that mapsaddr. Yes it's a pointer to a pointer-ish situation, we're in page table land now π§writeβ whether this is a write access. So like, are we writing or just looking π
π₯ RETURN π₯
It returns whether the pmd entry is changed β so true if it got touched/changed, and not-that if it didn't. No cap, that's the whole answer. π
π SEE ALSO π
All the friends in the group chat, all in the kernel file ./mm/huge_memory.c:
vmf_insert_pfn_pmd(9)vmf_insert_pfn_pud(9)vmf_insert_folio_pud(9)zap_huge_pmd(9)__split_unmapped_folio(9)folio_check_splittable(9)__folio_split(9)folio_split_unmapped(9)folio_split(9)min_order_for_split(9)
Go read those too, iykyk πβ¨
lowkey a reminder: these are cross-references, not extra behaviour β don't go assuming stuff about touch_pmd just because its friends do other things π
aaaand that's the page!! shoutout to the ./mm corner of the tree for hosting all this, dated October 2026 β mark your calendars bestie, the source is ./mm and the date is October 2026, and that's the cute little sign-off ππ see u in the next manpage, mwah π«Ά
π¦ 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