From: Gerd Hoffmann <kraxel@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Benjamin Herrenschmidt <benh@au1.ibm.com>,
li zhang <zhlcindy@gmail.com>,
qemu-devel@nongnu.org, zhlcindy@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options
Date: Thu, 07 Jun 2012 13:35:29 +0200 [thread overview]
Message-ID: <4FD09201.3010303@redhat.com> (raw)
In-Reply-To: <4FD07971.1020205@redhat.com>
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
next prev parent reply other threads:[~2012-06-07 11:35 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 9:48 [Qemu-devel] [qemu-devel][RFC] Enable usb with default options li zhang
2012-06-06 2:52 ` li zhang
2012-06-06 3:31 ` Benjamin Herrenschmidt
2012-06-06 5:42 ` Anthony Liguori
2012-06-06 6:03 ` li zhang
2012-06-06 21:13 ` Benjamin Herrenschmidt
2012-06-07 1:15 ` Anthony Liguori
2012-06-07 3:00 ` Benjamin Herrenschmidt
2012-06-07 3:03 ` Anthony Liguori
2012-06-07 4:52 ` li zhang
2012-06-07 4:39 ` li zhang
2012-06-07 4:43 ` Anthony Liguori
2012-06-07 4:53 ` li zhang
2012-06-07 8:07 ` Markus Armbruster
2012-06-07 9:19 ` Anthony Liguori
2012-06-07 10:05 ` Markus Armbruster
2012-06-07 11:51 ` Anthony Liguori
2012-06-12 8:06 ` Markus Armbruster
2012-06-07 8:32 ` Hans de Goede
2012-06-07 8:40 ` Benjamin Herrenschmidt
2012-06-07 8:49 ` Paolo Bonzini
2012-06-07 8:52 ` Hans de Goede
2012-06-07 9:05 ` Gerd Hoffmann
2012-06-07 9:17 ` Benjamin Herrenschmidt
2012-06-07 9:29 ` Li Zhang
2012-06-07 9:16 ` Benjamin Herrenschmidt
2012-06-07 9:50 ` Hans de Goede
2012-06-07 11:19 ` Benjamin Herrenschmidt
2012-06-07 11:35 ` Gerd Hoffmann [this message]
2012-06-07 8:54 ` Gerd Hoffmann
2012-06-06 22:14 ` Andreas Färber
-- strict thread matches above, loose matches on Subject: below --
2012-06-05 7:19 Li Zhang
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=4FD09201.3010303@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=benh@au1.ibm.com \
--cc=hdegoede@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhlcindy@gmail.com \
--cc=zhlcindy@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).