Re: [PATCH 1/4] KVM: Add APIs for unlocked TLB flush

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/10/2012 12:03 AM, Marcelo Tosatti wrote:
> > 
> > > It has the advantage that it requires code to explicitly document where
> > > the TLB must be flushed and the sites which expect sptes to be in sync
> > > with TLBs.
> > 
> > I'm looking for an idea of how to make the flush in those cases not hold
> > mmu_lock.
>
> You can't easily for rmap_write_protect, must check that the state is
> unchanged (write protect operation is still relevant).

We could simply call it in a loop:

   while rmap_write_protect() == SOME_SPTES_CHANGED:
          mark tlbs dirty
          drop lock
          flush remote tlbs
          take lock

with some backoff to prevent livelock.  It looks scary but usually the
pte list is short, and the second loop is fast since everything has been
brought into the cache.

> Current patchset (with corrections to comments by Xiao) is good enough
> already IMO.

Please review the new version then.

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux