public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH rebase/RFC 0/4] x86/kvm/nVMX: optimize MMU switch between L1 and L2
Date: Tue, 31 Jul 2018 18:52:28 +0200	[thread overview]
Message-ID: <4eb9e84b-c159-3e26-7a91-df2cecd72a9b@redhat.com> (raw)
In-Reply-To: <87bmano0qp.fsf@vitty.brq.redhat.com>

On 31/07/2018 17:58, Vitaly Kuznetsov wrote:
> Thank you for the rebase,
> 
> it seems that with multi-root caching this series should just ignore CR3
> changes for both root_mmu and guest_mmu: we now have two separate
> 'prev_roots' caches and these work well. However, we still can optimize
> MMU re-initialization on L1->L2 and L2->L1 switches out using e.g. my
> 'scache' idea (which can be orthogonal to page_role check on CR3).

Indeed, though if possible the scache should be based on the role to
avoid duplicating code and data structures.

(Also I didn't quite have time to figure out _why_ without
root_mmu/guest_mmu there is still contention, it's probably something
trivial).

Paolo

> In my Hyper-V-on-KVM environment I'm seeing an additional 1000 CPU
> cycles win for a nested vmexit.
> 
> I'll pull things together and re-send the whole series.


      reply	other threads:[~2018-07-31 16:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 16:56 [PATCH rebase/RFC 0/4] x86/kvm/nVMX: optimize MMU switch between L1 and L2 Paolo Bonzini
2018-07-27 16:56 ` [PATCH 1/4] x86/kvm/mmu: make vcpu->mmu a pointer to the current MMU Paolo Bonzini
2018-07-27 16:56 ` [PATCH 2/4] x86/kvm/mmu.c: set get_pdptr hook in kvm_init_shadow_ept_mmu() Paolo Bonzini
2018-07-27 16:56 ` [PATCH 3/4] x86/kvm/mmu.c: add kvm_mmu parameter to kvm_mmu_free_roots() Paolo Bonzini
2018-07-27 16:56 ` [PATCH 4/4] x86/kvm/mmu: introduce guest_mmu Paolo Bonzini
2018-07-31 15:58 ` [PATCH rebase/RFC 0/4] x86/kvm/nVMX: optimize MMU switch between L1 and L2 Vitaly Kuznetsov
2018-07-31 16:52   ` 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=4eb9e84b-c159-3e26-7a91-df2cecd72a9b@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkuznets@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