lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHVum0eZ1z4NfmQEmr2T34LFY9EEhM0rdkEEx_yxF-zijhmLYA@mail.gmail.com>
Date: Fri, 1 Nov 2024 13:21:04 -0700
From: Vipin Sharma <vipinsh@...gle.com>
To: seanjc@...gle.com, pbonzini@...hat.com, dmatlack@...gle.com
Cc: zhi.wang.linux@...il.com, weijiang.yang@...el.com, mizhang@...gle.com, 
	liangchen.linux@...il.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/1] KVM: x86/mmu: Remove KVM mmu shrinker

On Fri, Nov 1, 2024 at 1:14 PM Vipin Sharma <vipinsh@...gle.com> wrote:
>
> Remove KVM MMU shrinker and all its related code. Remove global
> kvm_total_used_mmu_pages and page zapping flow from MMU shrinker.
> Remove zapped_obsolete_pages list from struct kvm_arch{} and use local
> list in kvm_zap_obsolete_pages() since MMU shrinker is not using it
> anymore.
>
> Current flow of KVM MMU shrinker is very disruptive to VMs. It picks the
> first VM in the vm_list, zaps the oldest page which is most likely an
> upper level SPTEs and most like to be reused. Prior to TDP MMU, this is
> even more disruptive in nested VMs case, considering L1 SPTEs will be
> the oldest even though most of the entries are for L2 SPTEs.
>
> As discussed in [1] shrinker logic has not be very useful in actually
> keeping VMs performant and reducing memory usage.
>
> There was an alternative suggested [2] to repurpose shrinker for
> shrinking vCPU caches. But considering that in all of the KVM MMU
> shrinker history it hasn't been used/needed/complained, and there has
> not been any conversation regarding KVM using lots of page tables, it
> might be better to just not have shrinker. If the need arise [2] can be
> revisited.
>
> [1] https://lore.kernel.org/lkml/Y45dldZnI6OIf+a5@google.com/
> [2] https://lore.kernel.org/kvm/20241004195540.210396-3-vipinsh@google.com/
>
> Suggested-by: Sean Christopherson <seanjc@...gle.com>
> Suggested-by: David Matlack <dmatlack@...gle.com>
> Reviewed-by: David Matlack <dmatlack@...gle.com>

FYI, I carried forward David's Reviewed-by from the previous versions.
Extra change from the previous version is removing registration of KVM
MMU shrinker in kvm_mmu_vendor_module_init() and mmu_shrinker object
along with its callback functions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ