All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/7] usb: remove old usb-host code
Date: Mon, 11 Nov 2013 20:28:36 +0100	[thread overview]
Message-ID: <52812FE4.8070700@redhat.com> (raw)
In-Reply-To: <1384159623.32143.12.camel@nilsson.home.kraxel.org>

Hi,

On 11/11/2013 09:47 AM, Gerd Hoffmann wrote:
> On Fr, 2013-11-08 at 17:51 +0100, Jan Kiszka wrote:
>> On 2013-11-08 16:39, Gerd Hoffmann wrote:
>>>    Hi,
>>>
>>>> OK, then here is the first issue I ran into while trying libusbx (git
>>>> head, i.e. 1.0.17+: The new stack causes significant latency issues that
>>>> makes it almost unusable for pass-through of USB audio devices (some
>>>> headset in my case). Reverting usb-linux and disabling libusb over QEMU
>>>> git head makes things work again. I'll have to stick with this for now
>>>> as it is affecting my work environment.
>>>>
>>>> Any spontaneous ideas how to analyse or even resolve this?
>>>
>>> Try setting isobsize property to something smaller than 32 (which is the
>>> default).
>>
>> OK, isobsize=2 and isobufs=32 helped, possibly other combinations as
>> well - but not just reducing isobsize or increasing isobufs. Any theory
>> about this? How can we find better defaults?
>
> isobsize is the size of a single buffer (in MaxPacketSize units).
> isobufs is the number of buffers in the ring.
>
> So the total ring buffer size is MaxPacketSize * isobsize * isobufs.
>
> isobsize basically trades overhead for latency.  Larger numbers reduce
> the overhead, smaller numbers reduce latency.
>
> isobufs should be as small as possible.  Start with 4 (default).  If you
> get overruns/underruns increase.
>
> We should probably look at the endpoint interval, then calculate how
> many packets we should expect within a certain time range and use that
> as additional factor for the buffer size.  That should get the defaults
> closer to the actual needs of the device.

hw/usb/redirect.c actually has some code for that, you could use that as
a start for the host redirection code...

Regards,

Hans

  reply	other threads:[~2013-11-11 19:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19  9:34 [Qemu-devel] [PULL 0/7] usb patch queue Gerd Hoffmann
2013-09-19  9:34 ` [Qemu-devel] [PATCH 1/7] usb: remove old usb-host code Gerd Hoffmann
2013-10-02 13:14   ` Jan Kiszka
2013-10-07  7:16     ` Gerd Hoffmann
2013-10-09 10:55       ` Jan Kiszka
2013-10-09 11:42         ` Gerd Hoffmann
2013-11-08 14:00           ` Jan Kiszka
2013-11-08 15:39             ` Gerd Hoffmann
2013-11-08 16:51               ` Jan Kiszka
2013-11-11  8:47                 ` Gerd Hoffmann
2013-11-11 19:28                   ` Hans de Goede [this message]
2013-09-19  9:34 ` [Qemu-devel] [PATCH 2/7] xhci: Fix number of streams allocated when using streams Gerd Hoffmann
2013-09-19  9:34 ` [Qemu-devel] [PATCH 3/7] xhci: Init a transfers xhci, slotid and epid member on epctx alloc Gerd Hoffmann
2013-09-19  9:34 ` [Qemu-devel] [PATCH 4/7] xhci: Add xhci_epid_to_usbep helper function Gerd Hoffmann
2013-09-19  9:34 ` [Qemu-devel] [PATCH 5/7] xhci: Fix memory leak on xhci_disable_ep Gerd Hoffmann
2013-09-19  9:34 ` [Qemu-devel] [PATCH 6/7] usb: Also reset max_packet_size on ep_reset Gerd Hoffmann
2013-09-19  9:34 ` [Qemu-devel] [PATCH 7/7] usb: Fix iovec memleak on combined-packet free Gerd Hoffmann

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=52812FE4.8070700@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.