From: Bin Liu <b-liu@ti.com>
To: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER"
<linux-usb@vger.kernel.org>
Subject: Re: [PATCH 0/6] musb: Improve performance for hub-attached webcams
Date: Tue, 30 Apr 2019 10:20:03 -0500 [thread overview]
Message-ID: <20190430152003.GH20993@uda0271908> (raw)
In-Reply-To: <CAJs94EZsDOo6wp2rZmsETLs7uPE3CCv1bNOsewxehyw8R52scA@mail.gmail.com>
Hi Matwey,
On Wed, Apr 24, 2019 at 06:42:30PM +0300, Matwey V. Kornilov wrote:
> Ping
Sorry for my late response. This series does improve isoch transfers for
webcam on musb. A few of my cameras used to fail to stream 640x480@30fps
now the test passed with your patches. Thank you for the work.
But since the patch changes the way handling urb giveback, I would need
more time to run more tests.
-Bin.
>
> ср, 3 апр. 2019 г. в 21:53, Matwey V. Kornilov <matwey@sai.msu.ru>:
> >
> > The series is concerned to issues with isochronous transfer while
> > streaming the USB webcam data. I discovered the issue first time
> > when attached PWC USB webcam to AM335x-based BeagleBone Black SBC.
> > It appeared that the root issue was in numerous missed IN requests
> > during isochronous transfer where each missing leaded to the frame
> > drop. Since every IN request is triggered in MUSB driver
> > individually, it is important to queue the send IN request as
> > earlier as possible when the previous IN completed. At the same
> > time the URB giveback handler of the device driver has also to be
> > called there, that leads to arbitrarily delay depending on the
> > device driver performance. The details with the references are
> > described in [1].
> >
> > The issue has two parts:
> >
> > 1) peripheral driver URB callback performance
> > 2) MUSB host driver performance
> >
> > It appeared that the first part is related to the wrong memory
> > allocation strategy in the most USB webcam drivers. Non-cached
> > memory is used in assumption that coherent DMA memory leads to
> > the better performance than non-coherent memory in conjunction with
> > the proper synchronization. Yet the assumption might be valid for
> > x86 platforms some time ago, the issue was fixed for PWC driver in:
> >
> > 1161db6776bd ("media: usb: pwc: Don't use coherent DMA buffers for ISO transfer")
> >
> > that leads to 3.5x performance gain. The more generic fix for this
> > common issue are coming for the rest drivers [2].
> >
> > The patch allowed successfully running full-speed USB PWC webcams
> > attached directly to BeagleBone Black USB port.
> >
> > However, the second part of the issue is still present for
> > peripheral device attached through the high-speed USB hub due to
> > its 125us frame time. The patch series is intended to reorganize
> > musb_advance_schedule() to allow host to send IN request quicker.
> >
> > The patch series is organized as the following. First three patches
> > improve readability of the existing code in
> > musb_advance_schedule(). Patches 4 and 5 introduce updated
> > signature for musb_start_urb(). The last patch introduce new
> > code-path in musb_advance_schedule() which allows for faster
> > response.
> >
> > References:
> >
> > [1] https://www.spinics.net/lists/linux-usb/msg165735.html
> > [2] https://www.spinics.net/lists/linux-media/msg144279.html
> >
> > Matwey V. Kornilov (6):
> > usb: musb: Use USB_DIR_IN when calling musb_advance_schedule()
> > usb: musb: Introduce musb_qh_empty() helper function
> > usb: musb: Introduce musb_qh_free() helper function
> > usb: musb: Rename musb_start_urb() to musb_start_next_urb()
> > usb: musb: Introduce musb_start_urb()
> > usb: musb: Decrease URB starting latency in musb_advance_schedule()
> >
> > drivers/usb/musb/musb_host.c | 114 +++++++++++++++++++++++++++----------------
> > 1 file changed, 71 insertions(+), 43 deletions(-)
> >
> > --
> > 2.16.4
> >
>
>
> --
> With best regards,
> Matwey V. Kornilov
next prev parent reply other threads:[~2019-04-30 15:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190403185310.8437-1-matwey@sai.msu.ru>
2019-04-03 18:53 ` [6/6] usb: musb: Decrease URB starting latency in musb_advance_schedule() Matwey V. Kornilov
2019-04-30 15:31 ` Bin Liu
2019-04-30 15:31 ` [PATCH 6/6] " Bin Liu
2019-04-30 17:29 ` [6/6] " Alan Stern
2019-04-30 17:29 ` [PATCH 6/6] " Alan Stern
2019-05-04 9:38 ` [6/6] " Matwey V. Kornilov
2019-05-04 9:38 ` [PATCH 6/6] " Matwey V. Kornilov
2019-04-24 15:42 ` [PATCH 0/6] musb: Improve performance for hub-attached webcams Matwey V. Kornilov
2019-04-30 15:20 ` Bin Liu [this message]
2019-06-14 16:45 ` [PATCH v2 " Matwey V. Kornilov
2019-06-14 16:45 ` [PATCH v2 1/6] usb: musb: Use USB_DIR_IN when calling musb_advance_schedule() Matwey V. Kornilov
2019-06-14 16:45 ` [PATCH v2 2/6] usb: musb: Introduce musb_qh_empty() helper function Matwey V. Kornilov
2019-06-14 16:45 ` [PATCH v2 3/6] usb: musb: Introduce musb_qh_free() " Matwey V. Kornilov
2019-06-14 16:45 ` [PATCH v2 4/6] usb: musb: Rename musb_start_urb() to musb_start_next_urb() Matwey V. Kornilov
2019-06-14 16:45 ` [PATCH v2 5/6] usb: musb: Introduce musb_start_urb() Matwey V. Kornilov
2019-06-14 16:45 ` [PATCH v2 6/6] usb: musb: Decrease URB starting latency in musb_advance_schedule() Matwey V. Kornilov
2019-07-02 17:29 ` [PATCH v2 0/6] musb: Improve performance for hub-attached webcams Matwey V. Kornilov
2019-07-02 17:33 ` Bin Liu
2019-09-09 16:33 ` Matwey V. Kornilov
2019-10-23 8:12 ` Matwey V. Kornilov
2020-01-01 16:26 ` [PATCH RESEND " Matwey V. Kornilov
2020-01-01 16:26 ` [PATCH RESEND v2 1/6] usb: musb: Use USB_DIR_IN when calling musb_advance_schedule() Matwey V. Kornilov
2020-01-01 16:26 ` [PATCH RESEND v2 2/6] usb: musb: Introduce musb_qh_empty() helper function Matwey V. Kornilov
2020-01-01 16:26 ` [PATCH RESEND v2 3/6] usb: musb: Introduce musb_qh_free() " Matwey V. Kornilov
2020-01-01 16:26 ` [PATCH RESEND v2 4/6] usb: musb: Rename musb_start_urb() to musb_start_next_urb() Matwey V. Kornilov
2020-01-01 16:26 ` [PATCH RESEND v2 5/6] usb: musb: Introduce musb_start_urb() Matwey V. Kornilov
2020-01-01 16:26 ` [PATCH RESEND v2 6/6] usb: musb: Decrease URB starting latency in musb_advance_schedule() Matwey V. Kornilov
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=20190430152003.GH20993@uda0271908 \
--to=b-liu@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=matwey.kornilov@gmail.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).