Re: high load with usb device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux