From: Paolo Bonzini <pbonzini@redhat.com>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Hansen, Dave" <dave.hansen@intel.com>,
"Li, Liang Z" <liang.z.li@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "gleb@kernel.org" <gleb@kernel.org>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"x86@kernel.org" <x86@kernel.org>,
"joro@8bytes.org" <joro@8bytes.org>,
"Hao, Xudong" <xudong.hao@intel.com>
Subject: Re: [v6] kvm/fpu: Enable fully eager restore kvm FPU
Date: Fri, 24 Apr 2015 09:55:24 +0200 [thread overview]
Message-ID: <5539F6EC.6080604@redhat.com> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E0ACBB847@SHSMSX104.ccr.corp.intel.com>
On 24/04/2015 09:46, Zhang, Yang Z wrote:
> > On the other hand vmexit is lighter and lighter on newer processors; a
> > Sandy Bridge has less than half the vmexit cost of a Core 2 (IIRC 1000
> > vs. 2500 clock cycles approximately).
>
> 1000 cycles? I remember it takes about 4000 cycle even in HSW server.
I was going from memory, but I now measured it with the vmexit test of
kvm-unit-tests. With both SNB Xeon E5 and IVB Core i7, returns about
1400 clock cycles for a vmcall exit. This includes the overhead of
doing the cpuid itself.
Thus the vmexit cost is around 1300 cycles. Of this the vmresume
instruction is probably around 800 cycles, and the rest is introduced by
KVM. There are at least 4-5 memory barriers and locked instructions.
Paolo
next prev parent reply other threads:[~2015-04-24 7:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 21:13 [v6] kvm/fpu: Enable fully eager restore kvm FPU Liang Li
2015-04-23 10:40 ` Paolo Bonzini
2015-04-23 11:25 ` Jan Kiszka
2015-04-23 15:28 ` Dave Hansen
2015-04-23 20:28 ` H. Peter Anvin
2015-04-24 1:16 ` Zhang, Yang Z
2015-04-24 7:44 ` Paolo Bonzini
2015-04-24 7:46 ` Zhang, Yang Z
2015-04-24 7:55 ` Paolo Bonzini [this message]
2015-04-24 8:08 ` Zhang, Yang Z
2015-04-23 22:57 ` Wanpeng Li
2015-04-24 2:21 ` Rik van Riel
2015-04-23 23:17 ` Wanpeng Li
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=5539F6EC.6080604@redhat.com \
--to=pbonzini@redhat.com \
--cc=dave.hansen@intel.com \
--cc=gleb@kernel.org \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=liang.z.li@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xudong.hao@intel.com \
--cc=yang.z.zhang@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