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.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to