ENUM MMU_NOTIFIER_EVENT(9)
π enum mmu_notifier_event(9)
okay so bestie, welcome to the kernel API manual β¨ β this is the enum mmu_notifier_event page, and honestly it's giving "small enum, big feelings" because every one of these little constants is a reason the mmu notifier callback is firing π
πΈ NAME πΈ
enum mmu_notifier_event β the reason your mmu notifier callback just got pinged, like, the actual why π
β¨ SYNOPSIS β¨
enum mmu_notifier_event {
MMU_NOTIFY_UNMAP ,
MMU_NOTIFY_CLEAR ,
MMU_NOTIFY_PROTECTION_VMA ,
MMU_NOTIFY_PROTECTION_PAGE ,
MMU_NOTIFY_SOFT_DIRTY ,
MMU_NOTIFY_RELEASE ,
MMU_NOTIFY_MIGRATE ,
MMU_NOTIFY_EXCLUSIVE
};
not me pasting the whole enum verbatim, but fr fr that's the whole vibe π
π¦ Constants π¦
okay so here's the cast of characters, one by one, no skips π
MMU_NOTIFY_UNMAPβ either amunmapthat unmaps the range, or amremapthat moves the range. basically the range is yeeted or relocated πMMU_NOTIFY_CLEARβ a page table entry got cleared. and bestie there are SO. MANY. REASONS. likemadvise, or replacing a page by another one, ... you get it, the list goes on πMMU_NOTIFY_PROTECTION_VMAβ the update is because of a protection change for the range, i.e. just using the vma access permission (vm_page_prot) to update the whole range is enough β no need to go inspect changes to the CPU page table. this is themprotectsyscall being iconic πMMU_NOTIFY_PROTECTION_PAGEβ the update is because the read/write flag changed for pages in the range, so to mirror those changes the user must inspect the CPU page table (from the end callback). yes, must. no shortcuts here π«ΆMMU_NOTIFY_SOFT_DIRTYβ soft dirty accounting (still same page, still same access flags β¨). the user should soft dirty the page in the end callback so that literally anyone relying on soft dirtiness catches pages that might be written through non-CPU mappings. lowkey important, don't skip it πMMU_NOTIFY_RELEASEβ used duringmmu_interval_notifierinvalidate to signal that the mm refcount is zero and the range is no longer accessible π₯MMU_NOTIFY_MIGRATEβ used duringmigrate_vma_collectinvalidate to signal a device driver to possibly ignore the invalidation if theownerfield matches the driver's device private pgmap owner π§MMU_NOTIFY_EXCLUSIVEβ conversion of a page table entry to device-exclusive. theowneris initialized to the value provided by the caller ofmake_device_exclusive, such that this caller can filter out these events π
β SEE ALSO β
- Kernel file
./include/linux/mmu_notifier.hstruct mmu_interval_notifier_finish(9)struct mmu_interval_notifier_ops(9)mmu_interval_set_seq(9)mmu_interval_read_retry(9)mmu_interval_check_retry(9)
ngl the see-also section is basically the friendship bracelet of this whole page β go read those next, iykyk π«Ά
and that's the page, bestie π this one lives in ./include/linux, dated October 2026, and it's literally titled enum mmu_notifier_event(9) β slay, go forth and notify your mmu π¦β¨
π¦ 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