Re: [PATCH 19/24] kvm: x86/mmu: Protect tdp_mmu_pages with a lock

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

 



On 26/01/21 23:02, Sean Christopherson wrote:
You can do the deferred freeing with a short write-side critical section to
ensure all readers have terminated.

Hmm, the most obvious downside I see is that the zap_collapsible_sptes() case
will not scale as well as the RCU approach.  E.g. the lock may be heavily
contested when refaulting all of guest memory to (re)install huge pages after a
failed migration.

The simplest solution is to use a write_trylock on the read_unlock() path; if it fails, schedule a delayed work item 1 second in the future so that it's possible to do some batching.

(The work item would also have to re-check the llist after each iteration.)

Paolo




[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