KVM: x86/mmu: Rework TDP MMU eager page splitting SP allocations
Status from this message: Applied to kvm-x86 mmu, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 1 replyApplied
- v31 patch 3 repliesSuperseded
Changes in v4 from the cover letter
- Use kmem_cache_zalloc() instead of __GFP_ZERO [Sean]
- Move mmu_lock and RCU acquire/release into the loop [Sean]
- Avoid unnecessary reaquire of RCU read lock [Sean]
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | KVM: x86/mmu: Always drop mmu_lock to allocate TDP MMU SPs for eager splittingarch/ | +1 | 0 replies | |
| 2/4 | KVM: x86/mmu: Hard code GFP flags for TDP MMU eager split allocationsarch/ | +4 | 0 replies | |
| 3/4 | KVM: x86/mmu: Unnest TDP MMU helpers to allocate SPs for eager splittingarch/ | +18 | 0 replies | |
| 4/4 | KVM: x86/mmu: Avoid reacquiring RCU if TDP MMU fails to allocate an SParch/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/4] KVM: x86/mmu: Rework TDP MMU eager page splitting SP allocations
Rework the TDP MMU eager page splitting code to always drop mmu_lock when allocation shadow pages, to avoid causing lock contention with vCPU threads during CLEAR_DIRTY_LOG (where mmu_lock is held for write).
The first patch changes KVM to always drop mmu_lock lock and the subsequent patches clean up and simplify the code now that conditional locking is gone.
v4:
- Use kmem_cache_zalloc() instead of __GFP_ZERO [Sean]
- Move mmu_lock and RCU acquire/release into the loop [Sean]
- Avoid unnecessary reaquire of RCU read lock [Sean]
v3: https://lore.kernel.org/kvm/[email protected]/
- Only drop mmu_lock during TDP MMU eager page splitting. This fixes the performance regression without regressing CLEAR_DIRTY_LOG performance on other architectures from frequent lock dropping.
v2: https://lore.kernel.org/kvm/[email protected]/
- Rebase onto kvm/queue [Marc]
v1: https://lore.kernel.org/kvm/[email protected]/
David Matlack (4):
KVM: x86/mmu: Always drop mmu_lock to allocate TDP MMU SPs for eager
splitting
KVM: x86/mmu: Hard code GFP flags for TDP MMU eager split allocations
KVM: x86/mmu: Unnest TDP MMU helpers to allocate SPs for eager
splitting
KVM: x86/mmu: Avoid reacquiring RCU if TDP MMU fails to allocate an SP
arch/x86/kvm/mmu/tdp_mmu.c | 78 ++++++++++++-------------------------- 1 file changed, 24 insertions(+), 54 deletions(-)
base-commit: af0903ab52ee6d6f0f63af67fa73d5eb00f79b9a
Signature · 1 line
2.45.2.505.gda0bf45e8d-goog