touch_pmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 covering addr. 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 maps addr. 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:

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