On Tue, Feb 05, 2008 at 02:06:23PM -0800, Christoph Lameter wrote: > On Tue, 5 Feb 2008, Andrea Arcangeli wrote: > > > On Tue, Feb 05, 2008 at 10:17:41AM -0800, Christoph Lameter wrote: > > > The other approach will not have any remote ptes at that point. Why would > > > there be a coherency issue? > > > > It never happens that two threads writes to two different physical > > pages by working on the same process virtual address. This is an issue > > only for KVM which is probably ok with it but certainly you can't > > consider the dependency on the page-pin less fragile or less complex > > than my PT lock approach. > > You can avoid the page-pin and the pt lock completely by zapping the > mappings at _start and then holding off new references until _end.
XPMEM is doing this by putting our equivalent structure of the mm into a recalling state which will cause all future faulters to back off, it then marks any currently active faults in the range as invalid (we have a very small number of possible concurrent faulters for a different reason), proceeds to start remote shoot-downs, waits for those shoot-downs to complete, then returns from the _begin callout with the mm-equiv still in the recalling state. Additional recalls may occur, but no new faults can. The _end callout reduces the number of active recalls until there are none left at which point the faulters are allowed to proceed again. Thanks, Robin ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel