Re: [kvm-devel] mmu_notifier: invalidate_range_start with lock=1

Christoph Lameter
2008-01-31T02:56:47Z

One possible way that XPmem could deal with a call of
invalidate_range_start with the lock flag set:

Scan through the rmaps you have for ptes. If you find one then elevate the
refcount of the corresponding page and mark in the maps that you have done
so. Also make them readonly. The increased refcount will prevent the
freeing of the page. The page will be unmapped from the process and XPmem
will retain the only reference.

Then some shepherding process that you have anyways with XPmem can
sometime later zap the remote ptes and free the pages. Would leave stale
data visible on the remote side for awhile. Would that be okay?

This would only be used for truncate that uses the unmap_mapping_range
call. So we are not in reclaim or other distress.