On Wed, May 27, 2015 at 10:39:23AM +0530, Aneesh Kumar K.V wrote: > j.glisse@xxxxxxxxx writes: > > > From: Jérôme Glisse <jglisse@xxxxxxxxxx> > > > > The mmu_notifier_invalidate_range_start() and mmu_notifier_invalidate_range_end() > > can be considered as forming an "atomic" section for the cpu page table update > > point of view. Between this two function the cpu page table content is unreliable > > for the address range being invalidated. > > > > Current user such as kvm need to know when they can trust the content of the cpu > > page table. This becomes even more important to new users of the mmu_notifier > > api (such as HMM or ODP). > > I don't see kvm using the new APIs in this patch. Also what is that HMM use this > for, to protect walking of mirror page table ?. I am sure you are > covering that in the later patches. May be you may want to mention > the details here too. KVM side is not done, i looked at KVM code long time ago and thought oh it could take advantage of this but now i do not remember exactly. I would need to check back. For HMM this is simple, no device fault can populate or walk the mirror page table on a range that is being invalidated. But concurrent fault/walk can happen outside the invalidated range. All handled in hmm_device_fault_start(). Cheers, Jérôme -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>