From: Andi Kleen <ak@linux.intel.com>
To: kvm@vger.kernel.org
Subject: qemu polling KVM_IRQ_LINE_STATUS when stopped
Date: Tue, 17 Oct 2017 14:34:16 -0700 [thread overview]
Message-ID: <87a80pihlz.fsf@linux.intel.com> (raw)
One issue I see for some time is that even when I stop a Linux KVM guest using libvirt
it still sometimes uses a lot of CPU time.
According to strace it loops polling on KVM_IRQ_LINE_STATUS
I see it with various qemu versions, both FC25, FC26, OpenSUSE Leap 42.1/2
IIRC old enough KVM didn't have this problem, at least I didn't notice it.
My workaround is to kill -STOP the qemu process too, but is there a
better fix?
-Andi
strace of a stopped qemu using ~18% CPU time of a core.
write(7, "\1\0\0\0\0\0\0\0", 8) = 8
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1118693, tv_nsec=583125997}) = 0
gettimeofday({tv_sec=1508275611, tv_usec=558425}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1118693, tv_nsec=583171115}) = 0
ppoll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7,
events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=15,
events=POLLIN}, {fd=24, events=POLLIN}], 7, {tv_sec=0, tv_nsec=0}, NULL,
8) = 1 ([{fd=7, revents=POLLIN}], left {tv_sec=0, tv_nsec=0})
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1118693, tv_nsec=583227127}) = 0
gettimeofday({tv_sec=1508275611, tv_usec=558526}, NULL) = 0
ioctl(12, KVM_IRQ_LINE_STATUS, 0x7ffc15ce8f30) = 0
gettimeofday({tv_sec=1508275611, tv_usec=558569}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1118693, tv_nsec=583313870}) = 0
gettimeofday({tv_sec=1508275611, tv_usec=558612}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1118693, tv_nsec=583357101}) = 0
ppoll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7,
events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=15,
events=POLLIN}, {fd=24, events=POLLIN}], 7, {tv_sec=0, tv_nsec=0}, NULL,
8) = 1 ([{fd=7, revents=POLLIN}], left {tv_sec=0, tv_nsec=0})
read(7, "\3\0\0\0\0\0\0\0", 512) = 8
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1118693, tv_nsec=583433228}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1118693, tv_nsec=583455717}) = 0
next reply other threads:[~2017-10-17 21:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 21:34 Andi Kleen [this message]
2017-10-18 7:47 ` qemu polling KVM_IRQ_LINE_STATUS when stopped Paolo Bonzini
2017-10-18 17:49 ` Andi Kleen
2017-10-18 19:24 ` Paolo Bonzini
2017-10-20 0:34 ` Andi Kleen
2017-10-20 8:32 ` Paolo Bonzini
2017-10-20 14:09 ` Andi Kleen
2017-10-20 15:12 ` Paolo Bonzini
2017-10-20 20:50 ` Andi Kleen
2017-10-20 22:51 ` Paolo Bonzini
2020-06-25 14:26 ` Kevin Locke
2020-06-25 16:28 ` Andi Kleen
2020-06-25 18:41 ` Paolo Bonzini
2020-06-25 18:56 ` Kevin Locke
2020-06-25 19:17 ` Paolo Bonzini
2020-06-25 20:10 ` Kevin Locke
2020-06-26 15:14 ` Kevin Locke
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=87a80pihlz.fsf@linux.intel.com \
--to=ak@linux.intel.com \
--cc=kvm@vger.kernel.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.