All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Gregory Haskins <gregory.haskins@gmail.com>
Cc: kvm-devel <kvm@vger.kernel.org>,
	RT <linux-rt-users@vger.kernel.org>, Avi Kivity <avi@redhat.com>,
	"Yang, Sheng" <sheng.yang@intel.com>
Subject: Re: Host latency peaks due to kvm-intel
Date: Fri, 24 Jul 2009 11:41:04 +0200	[thread overview]
Message-ID: <4A6981B0.3000008@siemens.com> (raw)
In-Reply-To: <4A68BD5D.1070302@gmail.com>

Gregory Haskins wrote:
> Jan Kiszka wrote:
>> Hi,
>>
>> did anyone recently tried current KVM for Intel over some real-time
>> Linux? I'm seeing more than 500 us latency peaks on the host,
>> specifically during VM startup. This applies to both 2.6.29.6-rt23 and
>> Xenomai/I-pipe. For -rt, I both tried the included (patched) KVM modules
>> as well as kvm.git head with some additionally required -rt fixes.
>> Xenomai ran over a 2.6.30 kernel with my own KVM-enabler patch.
>>
>> Early instrumentation actually points to the guest exit itself: I added
>> markers right before and after the assembly part of vmx_vcpu_run, and
>> further instrumentation reports that the next host APIC tick should go
>> off right inside guest mode. But KVM leaves the switching part 500 us
>> too late in that case - as if guest exit on external IRQs was disabled.
>>
>> Will debug this further, but I'm also curious to hear other user
>> experiences.
>>
>> Jan
>>
>>   
> Hi Jan,
>   Did you try to run with latency-tracer enabled?  If not, this may
> pinpoint the source for you.

I did, see above.

It finally turned out that I got burned once again by wbinvd: My test
CPUs (and likely also some of my customer) are too "old" to support
SECONDARY_VM_EXEC_CONTROL, which includes trapping guest's wbinvd
invocations. Too bad.

I vaguely recall that someone promised to add a feature reporting
facility for all those nice things, modern VM-extensions may or may not
support (something like or even an extension of /proc/cpuinfo). What is
the state of this plan? Would be specifically interesting for Intel CPUs
as there seem to be many of them out there with restrictions for special
use cases - like real-time.

Jan (who is now patching his guest to avoid wbinvd where possible)

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

  reply	other threads:[~2009-07-24  9:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 18:07 Host latency peaks due to kvm-intel Jan Kiszka
2009-07-23 19:43 ` Gregory Haskins
2009-07-24  9:41   ` Jan Kiszka [this message]
2009-07-24 12:01     ` Gregory Haskins
2009-07-25  8:15     ` Avi Kivity
2009-07-25  9:55       ` Jan Kiszka
2009-07-25 13:27         ` Avi Kivity
2009-07-26 14:23           ` Jan Kiszka
2009-07-26 19:16         ` H. Peter Anvin
2009-07-27  1:11           ` Yang, Sheng
2009-07-27  9:08             ` cpuinfo and HVM features (was: Host latency peaks due to kvm-intel) Jan Kiszka
2009-07-27  9:29               ` Yang, Sheng
2009-07-27 10:31               ` cpuinfo and HVM features Avi Kivity
2009-07-25 14:52     ` Host latency peaks due to kvm-intel Avi Kivity
2009-07-26 10:34       ` Sujit Karataparambil
2009-07-26 14:34       ` Jan Kiszka
2009-07-26 14:45         ` Avi Kivity
2009-07-26 14:52           ` Jan Kiszka

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=4A6981B0.3000008@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.com \
    --cc=gregory.haskins@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=sheng.yang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.