From: Michael Tokarev <mjt@tls.msk.ru>
To: KVM list <kvm@vger.kernel.org>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>, Avi Kivity <avi@redhat.com>
Subject: Re: high load with usb device
Date: Fri, 10 Sep 2010 20:17:02 +0400 [thread overview]
Message-ID: <4C8A59FE.9090400@msgid.tls.msk.ru> (raw)
In-Reply-To: <4C8A2187.1020202@msgid.tls.msk.ru>
Note the changed subject line.
I just did a few tests with linux guest (amd64 2.6.35 kernel).
And it shows the same behavour as win7 (unlike winXP), namely,
high host CPU load when guest is idle.
When I run this guest (which network-boots and only runs udevd
and a busybox shell after loading all needed drivers) without
-usbdevice, the host shows <1% CPU usage when this guest is idle.
But once I add -usbdevice -- be it tablet or mouse - guest
starts eating 16..19% host cpu when idling. Note that there's
no other services running - no dbus, X, inetd etc, just udevd,
busybox's init and sh.
So now we've quite well-supported debuggable guest.
Looking at /proc/interrupts in guest discovers nothing
interesting. Even the usb irq# is not increasing.
But I looked at usb endpoint descriptors in qemu, in
particular hw/usb-hid.c. There, all bInterval values -
apparently - assumes usb-2.0 specs. But as far as I can
see, all devices are usb-1, where bInterval is expressed
in different units - in ms. So, for example, bInterval=10
for the table is _not_ 255ms, it is 10ms! For it to be
255, actual value = 255 should be written in bInterval.
I tried changing this field directly, but it didn't help.
It reduced idle cpu usage for a few percents however.
Probably that's because there are also usb root hubs
and other similar stuff which needs to be checked too.
I'll do it in a moment.
Reportedly, this problem (high system load during idle)
first shows with win7/win2008. My _guess_ would be that
starting with this version of windows it actually is able
to honour this 10ms interval - XP definitely does not,
it pools mouse every 130ms. But this is just guesses
and speculations...
Digging further.
Answering to the sdl question: the linux guest experiment
shows that sdl has nothing to do with this, since linux
does not do any vga updates at all when idles in text
mode...
Thanks!
/mjt
next prev parent reply other threads:[~2010-09-10 16:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 12:21 high load with win7 & usb tablet Michael Tokarev
2010-09-10 11:47 ` Jes Sorensen
2010-09-10 12:16 ` Michael Tokarev
2010-09-10 16:17 ` Michael Tokarev [this message]
2010-09-12 9:26 ` high load with usb device Avi Kivity
2010-09-14 6:51 ` Michael Tokarev
2010-09-14 9:06 ` Avi Kivity
2010-09-14 9:08 ` Avi Kivity
2010-09-14 10:00 ` Michael Tokarev
2010-09-14 10:07 ` Avi Kivity
2010-09-14 10:25 ` Michael Tokarev
2010-09-14 10:39 ` Avi Kivity
2010-09-14 11:02 ` Michael Tokarev
2010-09-14 13:15 ` Michael Tokarev
2010-09-14 13:25 ` Avi Kivity
2010-09-14 13:29 ` Michael Tokarev
2010-09-14 13:38 ` Michael Tokarev
2010-09-14 14:45 ` Avi Kivity
2010-09-14 14:53 ` Michael Tokarev
2010-09-14 16:00 ` Avi Kivity
2010-09-14 16:29 ` Michael Tokarev
2010-09-14 16:37 ` Avi Kivity
2010-09-14 16:50 ` Michael Tokarev
2010-09-14 16:45 ` David S. Ahern
2010-09-14 15:51 ` David S. Ahern
2010-09-14 16:00 ` Michael Tokarev
2010-09-14 16:09 ` David S. Ahern
2010-09-10 12:19 ` high load with win7 & usb tablet Avi Kivity
2010-09-10 12:44 ` Michael Tokarev
2010-09-10 12:50 ` Avi Kivity
[not found] ` <4C8A44E6.2060008@msgid.tls.msk.ru>
2010-09-10 14:56 ` Avi Kivity
2010-09-10 15:03 ` Michael Tokarev
2010-09-10 16:03 ` Avi Kivity
2010-09-14 8:26 ` Brad Campbell
2010-09-14 8:33 ` Michael Tokarev
2010-09-14 8:46 ` Brad Campbell
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=4C8A59FE.9090400@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=Jes.Sorensen@redhat.com \
--cc=avi@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox