From: Sean Christopherson <seanjc@google.com>
To: Yan Zhao <yan.y.zhao@intel.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH 0/2] KVM: x86/mmu: .change_pte() optimization in TDP MMU
Date: Fri, 18 Aug 2023 06:46:26 -0700 [thread overview]
Message-ID: <ZN92MtFkIF3E79/u@google.com> (raw)
In-Reply-To: <ZN9FQf343+kt1YsX@yzhao56-desk.sh.intel.com>
On Fri, Aug 18, 2023, Yan Zhao wrote:
> On Thu, Aug 17, 2023 at 10:53:25AM -0700, Sean Christopherson wrote:
> > And FWIW, removing .change_pte() entirely, even without any other optimizations,
> > will also benefit those guests, as it will remove a source of mmu_lock contention
> > along with all of the overhead of invoking callbacks, walking memslots, etc. And
> > removing .change_pte() will benefit *all* guests by eliminating unrelated callbacks,
> > i.e. callbacks when memory for the VMM takes a CoW fault.
> >
> If with above "always write_fault = true" solution, I think it's better.
Another option would be to allow a per-mm override of use_zero_page, but I think
I like the KVM memslot route more as it provides better granularity, doesn't
prevent CoW for VMM memory, and works even if THP isn't being used.
next prev parent reply other threads:[~2023-08-18 13:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 8:50 [PATCH 0/2] KVM: x86/mmu: .change_pte() optimization in TDP MMU Yan Zhao
2023-08-08 8:53 ` [PATCH 1/2] KVM: x86/mmu: Remove dead code in .change_pte() handler in x86 " Yan Zhao
2023-08-08 8:54 ` [PATCH 2/2] KVM: x86/mmu: prefetch SPTE directly in x86 TDP MMU's change_pte() handler Yan Zhao
2023-08-16 18:18 ` [PATCH 0/2] KVM: x86/mmu: .change_pte() optimization in TDP MMU Sean Christopherson
2023-08-17 0:00 ` Yan Zhao
2023-08-17 17:53 ` Sean Christopherson
2023-08-18 10:17 ` Yan Zhao
2023-08-18 13:46 ` Sean Christopherson [this message]
2023-09-04 7:03 ` Yan Zhao
2023-09-05 18:59 ` Sean Christopherson
2023-09-05 19:30 ` Linus Torvalds
2023-09-06 0:29 ` Robin Murphy
2023-09-06 14:44 ` Sean Christopherson
2023-09-06 16:18 ` Robin Murphy
2023-09-06 16:46 ` Sean Christopherson
2023-09-08 8:18 ` Christoph Hellwig
2023-09-05 20:18 ` Sean Christopherson
2023-09-06 1:51 ` Yan Zhao
2023-09-06 22:17 ` Paolo Bonzini
2023-09-07 0:51 ` Sean Christopherson
2023-09-07 0:36 ` Yan Zhao
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=ZN92MtFkIF3E79/u@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yan.y.zhao@intel.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