diff options
author | Sean Christopherson <seanjc@google.com> | 2024-01-11 05:00:48 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-02-23 03:28:45 +0300 |
commit | 576a15de8d299d9d225b86504547ff6498bc2eeb (patch) | |
tree | 206a3f4d6a4de75c1d8ccc7eb1dfadd28efd9c7f /lib/test-string_helpers.c | |
parent | dab285e4ec736d964cfa6c7fd6eebd22666b5ebc (diff) | |
download | linux-576a15de8d299d9d225b86504547ff6498bc2eeb.tar.xz |
KVM: x86/mmu: Free TDP MMU roots while holding mmy_lock for read
Free TDP MMU roots from vCPU context while holding mmu_lock for read, it
is completely legal to invoke kvm_tdp_mmu_put_root() as a reader. This
eliminates the last mmu_lock writer in the TDP MMU's "fast zap" path
after requesting vCPUs to reload roots, i.e. allows KVM to zap invalidated
roots, free obsolete roots, and allocate new roots in parallel.
On large VMs, e.g. 100+ vCPUs, allowing the bulk of the "fast zap"
operation to run in parallel with freeing and allocating roots reduces the
worst case latency for a vCPU to reload a root from 2-3ms to <100us.
Link: https://lore.kernel.org/r/20240111020048.844847-9-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions