]> 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)
commitf7916ef78bf77abf00aa053a5401dad56306c256
treeb37438e6dc9823c893a6b77416a3ef33b4abe920
parent132f438aa495d3608caa2f8bce5c3a3d2e9842bf
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 0c676710c06b80d43febb8b6f0fad07bbde4290e.

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