]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Revert "Revert "KVM: MMU: zap pages in batch""
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 13 Sep 2019 02:46:07 +0000 (19:46 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 24 Sep 2019 12:35:35 +0000 (14:35 +0200)
commitb30ac19c6a92d05166b2910bad1a26e0e9a68c3c
treeb37438e6dc9823c893a6b77416a3ef33b4abe920
parent95127f1cb5055e4b453cd1d5455e725e1607362f
KVM: x86/mmu: Revert "Revert "KVM: MMU: zap pages in batch""

Now that the fast invalidate mechanism has been reintroduced, restore
the performance tweaks for fast invalidation that existed prior to its
removal.

Paraphrashing the original changelog:

  Zap at least 10 shadow pages before releasing mmu_lock to reduce the
  overhead associated with re-acquiring the lock.

  Note: "10" is an arbitrary number, speculated to be high enough so
  that a vCPU isn't stuck zapping obsolete pages for an extended period,
  but small enough so that other vCPUs aren't starved waiting for
  mmu_lock.

This reverts commit e6521a703150fa908ec1c3f49f88e594c4a1da85.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c