From: Gleb Natapov <gleb@kernel.org>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Jan Kiszka <jan.kiszka@web.de>,
kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: nested KVM slower than QEMU with gnumach guest kernel
Date: Mon, 17 Nov 2014 10:58:45 +0200 [thread overview]
Message-ID: <20141117085845.GE26187@minantech.com> (raw)
In-Reply-To: <20141116221828.GA13123@type>
On Sun, Nov 16, 2014 at 11:18:28PM +0100, Samuel Thibault wrote:
> Hello,
>
> Jan Kiszka, le Wed 12 Nov 2014 00:42:52 +0100, a écrit :
> > On 2014-11-11 19:55, Samuel Thibault wrote:
> > > jenkins.debian.net is running inside a KVM VM, and it runs nested
> > > KVM guests for its installation attempts. This goes fine with Linux
> > > kernels, but it is extremely slow with gnumach kernels.
>
> > You can try to catch a trace (ftrace) on the physical host.
> >
> > I suspect the setup forces a lot of instruction emulation, either on L0
> > or L1. And that is slower than QEMU is KVM does not optimize like QEMU does.
>
> Here is a sample of trace-cmd output dump: the same kind of pattern
> repeats over and over, with EXTERNAL_INTERRUPT happening mostly
> every other microsecond:
>
> qemu-system-x86-9752 [003] 4106.187755: kvm_exit: reason EXTERNAL_INTERRUPT rip 0xffffffffa02848b1 info 0 800000f6
> qemu-system-x86-9752 [003] 4106.187756: kvm_entry: vcpu 0
> qemu-system-x86-9752 [003] 4106.187757: kvm_exit: reason EXTERNAL_INTERRUPT rip 0xffffffffa02848b1 info 0 800000f6
> qemu-system-x86-9752 [003] 4106.187758: kvm_entry: vcpu 0
> qemu-system-x86-9752 [003] 4106.187759: kvm_exit: reason EXTERNAL_INTERRUPT rip 0xffffffffa02848b1 info 0 800000f6
> qemu-system-x86-9752 [003] 4106.187760: kvm_entry: vcpu 0
>
> The various functions being interrupted are vmx_vcpu_run
> (0xffffffffa02848b1 and 0xffffffffa0284972), handle_io
> (0xffffffffa027ee62), vmx_get_cpl (0xffffffffa027a7de),
> load_vmc12_host_state (0xffffffffa027ea31), native_read_tscp
> (0xffffffff81050a84), native_write_msr_safe (0xffffffff81050aa6),
> vmx_decache_cr0_guest_bits (0xffffffffa027a384),
> vmx_handle_external_intr (0xffffffffa027a54d).
>
> AIUI, the external interrupt is 0xf6, i.e. Linux' IRQ_WORK_VECTOR. I
> however don't see any of them, neither in L0's /proc/interrupts, nor in
> L1's /proc/interrupts...
>
Do you know how gnumach timekeeping works? Does it have a timer that fires each 1ms?
Which clock device is it using?
--
Gleb.
next prev parent reply other threads:[~2014-11-17 8:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 18:55 nested KVM slower than QEMU with gnumach guest kernel Samuel Thibault
2014-11-11 23:42 ` Jan Kiszka
2014-11-16 22:18 ` Samuel Thibault
2014-11-17 6:28 ` Jan Kiszka
2014-11-17 8:50 ` Samuel Thibault
2014-11-24 0:42 ` Samuel Thibault
2014-12-15 0:09 ` Samuel Thibault
2014-12-15 9:41 ` Paolo Bonzini
2014-11-17 8:58 ` Gleb Natapov [this message]
2014-11-17 9:03 ` Samuel Thibault
2014-11-17 9:04 ` Jan Kiszka
2014-11-17 9:10 ` Samuel Thibault
2014-11-17 9:21 ` Gleb Natapov
2014-11-17 9:37 ` Samuel Thibault
2014-11-17 9:38 ` Samuel Thibault
2014-11-23 21:50 ` Samuel Thibault
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=20141117085845.GE26187@minantech.com \
--to=gleb@kernel.org \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=samuel.thibault@ens-lyon.org \
/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.