Skip to content

Remove KVM MMU shrinker

Vipin Sharma kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest1 patch 4 repliesIn review

Changes in v3 from the cover letter

- Remove KVM MMU shrinker.
- No repurposing for any other use.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1KVM: x86/mmu: Remove KVM mmu shrinkerarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c+5 -1072 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchDavid Matlack
1/1R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/1] Remove KVM MMU shrinker

Based on the feedback from v2, this patch is now completely removing KVM MMU shrinker whereas earlier versions were repurposing KVM MMU shrinker behavior to shrink vCPU caches. Now, there is no change to vCPU caches behavior.

KVM MMU shrinker is not very effective in alleviating pain during memory pressure. It frees up the pages actively being used which results in VM degradation. VM will take fault and bring them again in page tables. More discussions happened at [1]. Overall, consensus was to reprupose it into the code which frees pages from KVM MMU page caches.

In the previous version of this patch series, it was decided to just remove the shrinker and revisit feature to reduce vCPU cache size if someone has a need.

[1] https://lore.kernel.org/lkml/[email protected]/

v3:
- Remove KVM MMU shrinker.
- No repurposing for any other use.

v2: https://lore.kernel.org/kvm/[email protected]/
- Add a new selftest, mmu_shrinker_test.

v1: https://lore.kernel.org/kvm/[email protected]/
- No global counting of pages in cache. As this number might not remain same between calls of mmu_shrink_count() and mmu_shrink_scan().
- Count cache pages in mmu_shrink_count(). KVM can tolerate inaccuracy here.
- Empty mmu_shadow_page_cache and mmu_shadowed_info_cache only. Don't empty split_shadow_page_cache.

v0: Patches 1-9 from NUMA aware page table series.
https://lore.kernel.org/kvm/[email protected]/

Vipin Sharma (1):
KVM: x86/mmu: Remove KVM mmu shrinker

 arch/x86/include/asm/kvm_host.h |   1 -
 arch/x86/kvm/mmu/mmu.c          | 111 ++------------------------------
 2 files changed, 5 insertions(+), 107 deletions(-)

base-commit: a27e0515592ec9ca28e0d027f42568c47b314784

Signature · 1 line
2.47.0.163.g1226f6d8fa-goog