When a GPU, RDMA NIC, or virtual machine maintains derived mappings for a user process address space, every CPU page-table unmap, migration, swap-out, or permission change must reach the device before the old physical page is freed or reused. MMU notifier is the invalidation notification mechanism Linux mm provides for these secondary page-table users.
Based on the Linux mainline interface, this book starts from the problem space and responsibility boundaries, then walks through invalidation events and subscription models, the mmu_interval_notifier sequence-validation protocol, notifier core implementation paths, and HMM device page-fault handling. It then compares KVM, GPU SVM/userptr, RDMA ODP, and VFIO/IOMMU designs, and closes with driver implementation constraints, debugging playbooks, and a source reference.
Contents
- 1. CPU and Device Page-Table Invalidation Synchronization
- 2. MMU Notifier Events and Subscription Models
- 3. mmu_interval_notifier Sequence Synchronization
- 4. MMU Notifier Kernel Implementation Paths
- 5. HMM and Device Page Faults
- 6. Typical MMU Notifier Applications
- 7. MMU Notifier Driver Implementation Constraints
- 8. Debugging, Performance, and Source Reference
Who it is for
- Kernel and driver developers working on GPU, RDMA, IOMMU/VFIO, or KVM who need to implement invalidation callbacks and fault retries safely.
- Engineers debugging stale PFN commits, use-after-free DMA accesses, invalidation deadlocks, or invalidation storms.
- Readers who want to understand how Linux mm coordinates with heterogeneous memory management (SVM, HMM, ODP).
Readers are expected to know C and basic virtual-memory, page-table, and kernel-locking concepts.