mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/4] KVM: x86/mmu: Zapping and recycling cleanups
Date: Fri, 3 Jul 2020 19:18:49 +0200	[thread overview]
Message-ID: <59e690be-b0a6-4beb-fd7c-633186b96ece@redhat.com> (raw)
In-Reply-To: <20200623193542.7554-1-sean.j.christopherson@intel.com>

On 23/06/20 21:35, Sean Christopherson wrote:
> Semi-random, but related, changes that deal with the handling of active
> root shadow pages during zapping and the zapping of arbitary/old pages.
> 
> Patch 1 changes the low level handling to keep zapped active roots off the
> active page list.  KVM already relies on the vCPU to explicitly free the
> root, putting invalid root pages back on the list is just a quirk of the
> implementation.
> 
> Patches 2 reworks the MMU page recycling to batch zap pages instead of
> zapping them one at a time.  This provides better handling for active root
> pages and also avoids multiple remote TLB flushes.
> 
> Patch 3 applies the batch zapping to the .shrink_scan() path.  This is a
> significant change in behavior, i.e. is the scariest of the changes, but
> unless I'm missing something it provides the intended functionality that
> has been lacking since shrinker support was first added.
> 
> Patch 4 changes the page fault handlers to return an error to userspace
> instead of restarting the guest if there are no MMU pages available.  This
> is dependent on patch 2 as theoretically the old recycling flow could
> prematurely bail if it encountered an active root.
> 
> v2:
>   - Add a comment for the list shenanigans in patch 1. [Paolo]
>   - Add patches 2-4.
>   - Rebased to kvm/queue, commit a037ff353ba6 ("Merge branch ...")
> 
> Sean Christopherson (4):
>   KVM: x86/mmu: Don't put invalid SPs back on the list of active pages
>   KVM: x86/mmu: Batch zap MMU pages when recycling oldest pages
>   KVM: x86/mmu: Batch zap MMU pages when shrinking the slab
>   KVM: x86/mmu: Exit to userspace on make_mmu_pages_available() error
> 
>  arch/x86/kvm/mmu/mmu.c         | 94 +++++++++++++++++++++-------------
>  arch/x86/kvm/mmu/paging_tmpl.h |  3 +-
>  2 files changed, 61 insertions(+), 36 deletions(-)
> 

Queued, thanks.

Paolo


      parent reply	other threads:[~2020-07-03 17:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 19:35 Sean Christopherson
2020-06-23 19:35 ` [PATCH v2 1/4] KVM: x86/mmu: Don't put invalid SPs back on the list of active pages Sean Christopherson
2020-06-23 19:35 ` [PATCH v2 2/4] KVM: x86/mmu: Batch zap MMU pages when recycling oldest pages Sean Christopherson
2020-06-23 19:35 ` [PATCH v2 3/4] KVM: x86/mmu: Batch zap MMU pages when shrinking the slab Sean Christopherson
2020-06-23 19:35 ` [PATCH v2 4/4] KVM: x86/mmu: Exit to userspace on make_mmu_pages_available() error Sean Christopherson
2020-07-03 17:18 ` Paolo Bonzini [this message]

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=59e690be-b0a6-4beb-fd7c-633186b96ece@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.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

all inboxes | Powered by JetHome®