public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Matlack <dmatlack@google.com>
To: Vipin Sharma <vipinsh@google.com>
Cc: seanjc@google.com, pbonzini@redhat.com, zhi.wang.linux@gmail.com,
	weijiang.yang@intel.com, mizhang@google.com,
	liangchen.linux@gmail.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] KVM: x86/mmu: Change KVM mmu shrinker to no-op
Date: Wed, 25 Sep 2024 16:54:41 -0700	[thread overview]
Message-ID: <ZvSiwc9UFFVIh8Kb@google.com> (raw)
In-Reply-To: <20240913214316.1945951-2-vipinsh@google.com>

On 2024-09-13 02:43 PM, Vipin Sharma wrote:
> Remove global kvm_total_used_mmu_pages and page zapping flow from MMU
> shrinker. Keep shrinker infrastructure in place to reuse in future
> commits for freeing KVM page caches. 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.
> 
> mmu_shrink_scan() 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
> https://lore.kernel.org/lkml/Y45dldZnI6OIf+a5@google.com/ shrinker logic
> has not be very useful in actually keeping VMs performant and reducing
> memory usage.
> 
> Suggested-by: Sean Christopherson <seanjc@google.com>
> Suggested-by: David Matlack <dmatlack@google.com>
> Signed-off-by: Vipin Sharma <vipinsh@google.com>
> ---

Reviewed-by: David Matlack <dmatlack@google.com>

  reply	other threads:[~2024-09-25 23:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 21:43 [PATCH 0/2] KVM: x86/mmu: Repurpose MMU shrinker into page cache shrinker Vipin Sharma
2024-09-13 21:43 ` [PATCH 1/2] KVM: x86/mmu: Change KVM mmu shrinker to no-op Vipin Sharma
2024-09-25 23:54   ` David Matlack [this message]
2024-09-13 21:43 ` [PATCH 2/2] KVM: x86/mmu: Use MMU shrinker to shrink KVM MMU memory caches Vipin Sharma
2024-10-01 22:16   ` David Matlack
2024-10-02 16:17     ` Vipin Sharma
2024-09-25 23:51 ` [PATCH 0/2] KVM: x86/mmu: Repurpose MMU shrinker into page cache shrinker David Matlack
2024-09-30 16:42   ` Vipin Sharma
2024-09-30 16:50     ` David Matlack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZvSiwc9UFFVIh8Kb@google.com \
    --to=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=liangchen.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mizhang@google.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vipinsh@google.com \
    --cc=weijiang.yang@intel.com \
    --cc=zhi.wang.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox