qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options
Date: Thu, 07 Jun 2012 13:35:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120422 Thunderbird/10.0.4

  Hi,

>> In the meantime, this approach you experimented with would be very
>> useful for us  in the common case where there is no isochronous device.
>> It shouldn't be too hard for the emulator to switch back to "normal"
>> frames if an ISO EP is present, no ?
> 
> That should be possible yes. Note though that although slowing down the
> timer will only break isoc. stuff, it will for example also slow down
> usb mass storage devices.

Should depend on actual transfers, but yes.  ehci (with patches in
todays pull request) will reduce wakeup rate when there are no TDs in
the async schedule to process (and the periodic schedule is disabled).
As long as data is transfered ehci goes on at full wakeup rate (and speed).

The ehci async schedule was also moved to a bottom half so it can easily
kicked without a timer, for example from the packet completion callback.
 That doesn't eliminate the need for timers though as the guest can hook
in new TDs without ringing a doorbell, so we have to poll now and then
(this is one place where the xhci design is much more
virtualization-friendly, when queuing new requests the os must write to
a doorbell mmio register, so no need for a timer just to check for work).

periodic schedule is a bit trickier, but should be doable too.  There is
no urgent need though as the hid devices are 1.1 and thus not handled by
ehci anyway.

> No, I only did this for EHCI, which may still have an option to enable
> this today. Gerd may have done this for UHCI too, Gerd ?

Didn't, but should be possible.  Not sure how much it buys us as it
doesn't save any work for uhci, we can just batch the work (i.e. handle
10 frames at once), but at least the wakeup rate goes down which should
help a bit.

Enabling power management in the guest helps alot more as the guest will
completely suspend uhci when idle and there will be no polling and no
timer at all.

cheers,
  Gerd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]