[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining |
Date: |
Mon, 08 Oct 2012 14:50:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120825 Thunderbird/10.0.7 |
On 10/08/12 09:51, Hans de Goede wrote:
> Currently we effectively only do pipelining for output endpoints, since
> controllers will stop filling the queue for a packet with stop the queue
> on a short read semantics enabled.
> This causes large input transfers to get split into multiple packets, which
> comes with a serious performance penalty.
>
> This patch makes it possible to do pipelining for input endpoints, by
> re-combining packets which belong to 1 transfer at the guest device-driver
> level into 1 large packet before sending them to the device, this is mostly
> useful as a significant performance improvement for redirection of real USB
> devices.
This splitting and recombining is too much magic in the core layer for
my taste.
I think the core work flow should stay as-is. Instead we should add
more meta data to USBPacket (stop-queue-on-short-read bit, maybe
interrupt-on-complete too). Continue queuing packets even with
stop-queue-on-short-read set. Maybe add a callback to notify USBDevice
when the host controller is done filling the queue, so USBDevices can
process all queued packets in one go (bottom half would work too
though). Then expect USBDevices to get things right based on the
USBPacket flags passed on (i.e. have host-linux use
USBFS_URB_BULK_CONTINUATION as needed).
This way usb-host and usbredir will see what is really going on instead
of having the usb core magically fixing up stuff for them. I think this
will serve us better long-term. Maybe you are seeing this "data *and*
stall" issue (patch 1) exactly because of all this combining & splitting
logic?
cheers,
Gerd
- [Qemu-devel] [PATCH 00/12] RFC: usb: input pipelining support and other speedups, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 02/12] usb-redir: Add support for 32 bits bulk packet length, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 01/12] usb-redir: When a packet contains data on a stall, ignore the stall, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 07/12] uhci: Add support for input queuing, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 08/12] ehci: Get rid of packet tbytes field, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 03/12] usb-host-linux: Only enabling pipeling for output endpoints, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Hans de Goede, 2012/10/08
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Hans de Goede, 2012/10/08
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Gerd Hoffmann, 2012/10/09
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Hans de Goede, 2012/10/09
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Gerd Hoffmann, 2012/10/09
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Hans de Goede, 2012/10/09
[Qemu-devel] [PATCH 06/12] uhci: Move checks to continue queuing to uhci_fill_queue(), Hans de Goede, 2012/10/08
[Qemu-devel] [PATCH 05/12] uhci: Properly unmap packets on cancel / invalid pid, Hans de Goede, 2012/10/08
[Qemu-devel] [PATCH 12/12] ehci: Speed up the timer of raising int from the async schedule, Hans de Goede, 2012/10/08
[Qemu-devel] [PATCH 09/12] ehci: Set int flag on a short input packet, Hans de Goede, 2012/10/08
[Qemu-devel] [PATCH 10/12] ehci: Add support for input queuing, Hans de Goede, 2012/10/08