From: "Yang, Sheng" <sheng.yang@intel.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@qumranet.com>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: KVM: VMX: cache exit_intr_info
Date: Mon, 30 Jun 2008 20:43:49 +0800 [thread overview]
Message-ID: <200806302043.49795.sheng.yang@intel.com> (raw)
In-Reply-To: <20080628053527.GA18734@dmt.cnet>
On Saturday 28 June 2008 13:35:27 Marcelo Tosatti wrote:
> On Sat, Jun 28, 2008 at 11:20:47AM +0800, Yang, Sheng wrote:
> > On Saturday 28 June 2008 02:05:19 Marcelo Tosatti wrote:
> > > exit_intr_info is read-only in nature, so once read it can be
> > > cached similarly to idtv_vectoring_inf.
> > >
> > > Reduces guest re-entry in about 50 cycles on my machine (the
> > > exception path should be similar, but haven't measured).
> > >
> > > Applies on top of register accessor patch.
> > >
> > > Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> >
> > Thanks for the patches! :)
> >
> > And I realized there are also too much vmcs_read32
> > (CPU_BASED_VM_EXEC_CONTROL)(though not read only). I'd like to
> > post another patch to optimize it later.
>
> GUEST_INTERRUPTIBILITY_INFO is also a candidate, with significant
> wins (used by skip_emulated_instruction which is often used in the
> exit handlers).
>
> GUEST_RFLAGS is another register read multiple times in the fast
> path, but seems trickier.
>
> Do you have a better suggestion instead of
> vmcs_cache_read32/vmcs_cache_write32 below for this caching
> optimizations?
I think we may include more MSRs, though not all of them in the
critical path. GUEST_INTERRUPTIABILITY_INFO is on the critical path,
as well as VM_ENTRY_INTR_INFO_FIELD. The GUEST_RFLAGS and
CPU_BASED_VM_EXEC_CONTROL also been used very frequently. Of course
the latter three MSR I mentioned need write cache support, I'd like
to go the similar way as kvm_cache_regs did.
>
> With these three patches applied gettimeofday() microbenchmark is
> 5% faster.
I will test if we include these write cache MSR, how much benefit we
can get. Can you provide some detail on how can you get the
performance data? :)
--
Thanks
Yang, Sheng
prev parent reply other threads:[~2008-06-30 12:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 18:05 KVM: VMX: cache exit_intr_info Marcelo Tosatti
2008-06-28 3:20 ` Yang, Sheng
2008-06-28 5:35 ` Marcelo Tosatti
2008-06-30 12:43 ` Yang, Sheng [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=200806302043.49795.sheng.yang@intel.com \
--to=sheng.yang@intel.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@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