public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Christoffer Dall <cdall@cs.columbia.edu>
Cc: KVM General <kvm@vger.kernel.org>, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: Another question
Date: Sun, 31 Mar 2013 20:17:45 +0300	[thread overview]
Message-ID: <20130331171745.GA30754@redhat.com> (raw)
In-Reply-To: <CAEDV+gLeZFMEprpNrG=5hJ=DM5Y=anm-u6gJvot1_LO_Py1cLA@mail.gmail.com>

On Tue, Mar 26, 2013 at 09:57:00AM -0700, Christoffer Dall wrote:
> Hi guys,
> 
> I have an x86 question that I really hope you can help with:
> 
> Running the kvm-unit-tests on x86, I see a quite large difference
> between I/O from the kernel, and I/O user (around 6,000 cycles) on two
> separate platforms.
> 
> This is probably expected, but what is the explanation? If I correlate
> with system call overhead from lmbench, it's nowhere near that (in the
> hundreds of cycles), so I'm sure I'm missing something obvious.
> 
KVM does not restore full CPU host state on each vmexit since not all
the state is used by the kernel while KVM is running on the CPU. Some
state is restored only when vcpu thread is scheduled out from a host CPU
and some state is restored only when CPU moves to userspace. To exit to
userspace full host CPU state need to be restored.

--
			Gleb.

      reply	other threads:[~2013-03-31 17:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 16:57 Another question Christoffer Dall
2013-03-31 17:17 ` Gleb Natapov [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=20130331171745.GA30754@redhat.com \
    --to=gleb@redhat.com \
    --cc=cdall@cs.columbia.edu \
    --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