qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Nir Levy <nirl@asocsnetworks.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [Qemu-devel] errno 13, fopen qemu trace file.
Date: Thu, 18 Aug 2016 14:11:21 +0100	[thread overview]
Message-ID: <20160818131121.GE13050@redhat.com> (raw)
In-Reply-To: <AM4PR06MB160131D978CFAC2AB98F20E4CC150@AM4PR06MB1601.eurprd06.prod.outlook.com>

On Thu, Aug 18, 2016 at 12:58:29PM +0000, Nir Levy wrote:
> Hello everybody,
> 
> 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)
> but this 186micro second on the main qemu thread is suspicious and might cause application running over vm delays.
> 
> however when I have switch back to installed libvirtd 1.2.13.2
> ( my version has extended timeout for qemu debugging - ver 1.2.21)
> 
> 
> void st_set_trace_file_enabled(bool enable)
> {
>         ...
>         trace_fp = fopen(trace_file_name, "wb");
> 
> trace_fp returns null and errno is 13 access denied.
> In my installation I did not create cgroup,
> 
> If you have some hint for this issue it will be great.

Libvirt doesn't support use of the simpletrace backend. The security
policy will prevent simpletrace from even creating its output file.

It is recommended to use a dynamic trace backend like dtrace/systemtap/
ltt-ust so that QEMU does not need to directly create trace output
files itself.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2016-08-18 13:11 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 [this message]
2016-08-18 13:31   ` Nir Levy
2016-08-18 13:35     ` Daniel P. Berrange
2016-08-18 13:22 ` Stefan Hajnoczi
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=20160818131121.GE13050@redhat.com \
    --to=berrange@redhat.com \
    --cc=nirl@asocsnetworks.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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;
as well as URLs for NNTP newsgroup(s).