From: Sean Christopherson <seanjc@google.com>
To: Jeremi Piotrowski <jpiotrowski@linux.microsoft.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
David Matlack <dmatlack@google.com>,
Ben Gardon <bgardon@google.com>
Subject: Re: [PATCH] KVM: x86: Preserve TDP MMU roots until they are explicitly invalidated
Date: Fri, 14 Apr 2023 09:55:53 -0700 [thread overview]
Message-ID: <ZDmFmfPWmGxX855M@google.com> (raw)
In-Reply-To: <7332d846-fada-eb5c-6068-18ff267bd37f@linux.microsoft.com>
On Fri, Apr 14, 2023, Jeremi Piotrowski wrote:
> On 4/14/2023 1:12 AM, Sean Christopherson wrote:
> > Preserve TDP MMU roots until they are explicitly invalidated by gifting
> > the TDP MMU itself a reference to a root when it is allocated. Keeping a
> > reference in the TDP MMU fixes a flaw where the TDP MMU exhibits terrible
> > performance, and can potentially even soft-hang a vCPU, if a vCPU
> > frequently unloads its roots, e.g. when KVM is emulating SMI+RSM.
...
> Thank you, I just tested this and it works wonderfully! Is this still on time for 6.3?
This is too risky for 6.3, but I am comfortable applying it for 6.4.
> In case you need it:
>
> Tested-by: Jeremi Piotrowski <jpiotrowski@linux.microsoft.com>
>
> I'd also like to get this backported all the way back to 5.15 because the issue is
> already present there. I tried it myself, but this was before async zap and i'm
> doing something wrong with refcounts:
For 5.15, I think our best bet is to just disable the TDP MMU by default. There
have been a _lot_ of relevant changes since 5.15, I am skeptical that this patch
can be backported to 5.15 without pulling in a big pile of changes from between
5.15 and 6.1 or so.
I added you to a related thread[*] about TDP MMU backports for 5.15, let's continue
the 5.15 discussion there.
Thanks!
[*] https://lore.kernel.org/all/ZDmEGM+CgYpvDLh6@google.com
next prev parent reply other threads:[~2023-04-14 16:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 23:12 [PATCH] KVM: x86: Preserve TDP MMU roots until they are explicitly invalidated Sean Christopherson
2023-04-14 11:58 ` Jeremi Piotrowski
2023-04-14 16:55 ` Sean Christopherson [this message]
2023-04-20 20:34 ` David Matlack
2023-04-20 23:05 ` Sean Christopherson
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=ZDmFmfPWmGxX855M@google.com \
--to=seanjc@google.com \
--cc=bgardon@google.com \
--cc=dmatlack@google.com \
--cc=jpiotrowski@linux.microsoft.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.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