public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Brad Campbell <brad@fnarfbargle.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Avi Kivity <avi@redhat.com>, KVM list <kvm@vger.kernel.org>
Subject: Re: high load with win7 & usb tablet
Date: Tue, 14 Sep 2010 16:46:01 +0800	[thread overview]
Message-ID: <4C8F3649.7020905@fnarfbargle.com> (raw)
In-Reply-To: <4C8F335B.3030607@msgid.tls.msk.ru>

On 14/09/10 16:33, Michael Tokarev wrote:
> 14.09.2010 12:26, Brad Campbell wrote:
> []
>> Just a data point. An idle XP guest for me without -usb sees the host
>> running at about 8,000 context switches a second. With the guest using
>> -usb -usbdevice tablet, the host runs at between 15,000 - 18,000 context
>> switches a second.
>
> Yes, I observed the same as well.
>
>> The descriptors show the device is requesting a polling frequency of
>> 100Hz (0x0A ms), but don't forget QEMU emulating a controller with a
>> 1000hz microframe rate at worst.
>
> Yes, that's 10ms, which is way too frequent IMHO.  WinXP performs
> polling at 130Hz, win7 can do higher.
>
>> There would probably be a lower load if the controller emulated was OHCI
>> rather than UHCI just on a reduction of required work by the Guest.
>
> What's the diff. between the two?

UHCI uses a less intelligent controller that pushes a bit more of the load onto the host CPU. OHCI 
uses silicon that has a few more smarts and therefore requires less work on the part of the host. In 
a QEMU context I'd hazard a guess that OHCI would require less switches into the guest, but more 
host code.

I tried to fire up Virtualbox to see what it reports for its controllers, and how it goes with host 
load, but it refused to load with the kvm kernel module in and I have a guest I can't shut down 
right now.

>> If you were prepared to tolerate a bit less responsiveness, you could
>> always tweak the endpoint descriptor to turn the polling frequency down.
>>
>>          0x0a,       /*  u8  ep_bInterval; (255ms -- usb 2.0 spec) */
>>
>> I'm unclear as to where that comment came from. The usb 2.0 spec says a
>> LOW_SPEED device can request between 10->255 ms polling intervals. If
>> the device is reporting as a HIGH_SPEED device, then all bets are off.
>
> I already found this place, and already questioned where that
> comment come from (no one answered).
>
> But the thing is that changing this value to, say, 0xff (255ms)
> does not actually change the load level for me -- not for linux
> guest not for w7 guest.  The descriptor is indeed changes, lsusb
> correctly reports bInterval=255, but exactly nothing changes.

I can confirm this also. Should have tested before posting. Sorry.

How about running Powertop in the linux guest to get a handle on what it's doing?

      reply	other threads:[~2010-09-14  8:46 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     ` high load with usb device Michael Tokarev
2010-09-12  9:26       ` 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 [this message]

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=4C8F3649.7020905@fnarfbargle.com \
    --to=brad@fnarfbargle.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    /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