mm/mmu_notifier: pass down vma and reasons why mmu notifier is happening

CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also as
a result of kernel activities (memory compression, reclaim, migration,

Users of mmu notifier API track changes to the CPU page table and take
specific action for them.  While current API only provide range of virtual
address affected by the change, not why the changes is happening

This patch is just passing down the new informations by adding it to the
mmu_notifier_range structure.

Signed-off-by: Jérôme Glisse <>
Reviewed-by: Ralph Campbell <>
Reviewed-by: Ira Weiny <>
Cc: Christian König <>
Cc: Joonas Lahtinen <>
Cc: Jani Nikula <>
Cc: Rodrigo Vivi <>
Cc: Jan Kara <>
Cc: Andrea Arcangeli <>
Cc: Peter Xu <>
Cc: Felix Kuehling <>
Cc: Jason Gunthorpe <>
Cc: Ross Zwisler <>
Cc: Dan Williams <>
Cc: Paolo Bonzini <>
Cc: Radim Krcmar <>
Cc: Michal Hocko <>
Cc: Christian Koenig <>
Cc: John Hubbard <>
Cc: Arnd Bergmann <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
1 file changed