From: Stefan Hajnoczi <stefanha@gmail.com>
To: Nir Levy <nirl@asocsnetworks.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] errno 13, fopen qemu trace file.
Date: Thu, 18 Aug 2016 14:22:28 +0100 [thread overview]
Message-ID: <CAJSP0QWSru5_di_NQqBn-rg202VbyMzRNixCzFTN+TkdW7tPHg@mail.gmail.com> (raw)
In-Reply-To: <AM4PR06MB160131D978CFAC2AB98F20E4CC150@AM4PR06MB1601.eurprd06.prod.outlook.com>
On Thu, Aug 18, 2016 at 1:58 PM, Nir Levy <nirl@asocsnetworks.com> wrote:
> I have a progress in tracing qemu,
> I add the thread and tag done for each kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl
> in purpose of investigating pure hypervisor activity and delays on host.
> the kvm type print only for convenience.
>
> for example:
>
> kvm_ioctl 3106435.230545 pid=11347 thread=11347 type=0xae03 arg=0x25
>
> kvm_ioctl_done 3106435.230546 pid=11347 thread=11347 type=0xae03 arg=0x25 diff=1 (KVM_CHECK_EXTENSION)
>
> kvm_vcpu_ioctl 3106435.253930 pid=11347 thread=11354 cpu_index=0x2 type=0x4008ae9c arg=0x56417e6cb4f0
>
> kvm_vcpu_ioctl_done 3106435.253931 pid=11347 thread=11354 cpu_index=0x2 type=0x4008ae9c arg=0x56417e6cb4f0 diff=1 (KVM_X86_SETUP_MCE)
>
> kvm_vm_ioctl 3106435.268896 pid=11347 thread=11347 type=0x4020ae46 arg=0x7ffed97cf9d0
>
> kvm_vm_ioctl_done 3106435.269082 pid=11347 thread=11347 type=0x4020ae46 arg=0x7ffed97cf9d0 diff=186 (KVM_SET_USER_MEMORY_REGION)
>
>
> I have notice KVM_RUN can take even seconds but that is probably low priority tasks,(io workers probably)
Please read Linux Documentation/virtual/kvm/api.txt to learn about the
ioctl calls.
KVM_RUN is *the* ioctl that executes guest code. Unless a vcpu is
halted we should be inside KVM_RUN, so spending time inside this ioctl
is normal.
> but this 186micro second on the main qemu thread is suspicious and might cause application running over vm delays.
By "186micro second" you are referring to KVM_SET_USER_MEMORY_REGION
in the trace above.
Is this ioctl called in the critical path? I doubt it since the
KVM_X86_SETUP_MCE ioctl in your trace happens during initialization
time from kvm_arch_init_vcpu() and is not in the critical path when
the guest is running.
Why worry about latencies that do not affect running guests?
Stefan
next prev parent reply other threads:[~2016-08-18 13:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-18 12:58 [Qemu-devel] errno 13, fopen qemu trace file Nir Levy
2016-08-18 13:11 ` Daniel P. Berrange
2016-08-18 13:31 ` Nir Levy
2016-08-18 13:35 ` Daniel P. Berrange
2016-08-18 13:22 ` Stefan Hajnoczi [this message]
2016-08-18 13:40 ` Nir Levy
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=CAJSP0QWSru5_di_NQqBn-rg202VbyMzRNixCzFTN+TkdW7tPHg@mail.gmail.com \
--to=stefanha@gmail.com \
--cc=nirl@asocsnetworks.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).