From: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
To: Douglas Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: John Youn <John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
balbi-l0cyMroinI0@public.gmane.org,
kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
william.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Julius Werner <jwerner-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
gregory.herrero-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
yousaf.kaukab-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org,
stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org,
ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org,
johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v5 0/21] usb: dwc2: host: Fix and speed up all the stuff, especially with splits
Date: Sat, 23 Jan 2016 18:52:20 +0100 [thread overview]
Message-ID: <4616032.f74zstHVA0@phil> (raw)
In-Reply-To: <1453486736-15358-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Hi,
Am Freitag, 22. Januar 2016, 10:18:35 schrieb Douglas Anderson:
> This is a bit of catchall series for all the bug fix and performance
> patches I've been working on over the last few months. Note that for
> dwc2 we need to do LOTS in software and need super low interrupt
> latency, so most performance improvements actually fix real bugs.
>
> Patches are structured to start with no-brainer stuff that could be
> applied ASAP, especially things I've already gotten Acks for. Things
> get slightly more RFC / RFT like as we get farther down the series.
> Anything that can be landed sooner rather than later (especially those
> Acked long ago) would help in re-posts (I'm not biased, of course).
>
> It's been a few months since my last post of this series. In the
> meantime I've added a bunch of small bugfixes to the start of it and
> also TOTALLY REWROTE the microframe scheduler. I'll say up front: I
> know nothing about USB. I haven't read the whole spec. I'm not
> terribly familiar with the OHCI, EHCI, and XHCI drivers in the kernel.
> ...and I'm pretty clueless overall. Nevertheless, I've attempted to
> write up a fancy scheduler based on the portion of the spec talking
> about microframe scheduling requirements. This rewritten scheduler does
> seem to help when I start jamming lots of USB things into a hub, so
> presumably the code is a reasonably starting point. Given my current
> understanding of USB the old code was fairly insane, so presumably even
> if my new patch isn't perfect it's better than what we had.
I've tested this series (+the low-speed fix from today) on the following
usb-tree on a rk3288-veyron-jerry:
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Video, Driver=, 480M
|__ Port 1: Dev 2, If 1, Class=Video, Driver=, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=zd1211rw, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
|__ Port 3: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 6, If 0, Class=Vendor Specific Class, Driver=, 12M
|__ Port 3: Dev 8, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 10, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 1: Dev 10, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 11, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 11, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 3: Dev 12, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 4: Dev 13, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 4: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 5: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
At first we were maxing out the 9 channels of the otg port, which the
driver didn't seem to care about in 4.4-rc6, but after realizing that and
switching over to the 16ch host-port it ran really nicely, especially wrt
faster handling of all the keyboard input.
When looking over to the other desk and the person using that veyron-
jerry not cursing anymore, it seem to be running fine in a real-world use
for 2 hours now ;-)
So,
Tested-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
> The patches here will speed up the interrupt controller significantly.
> After this series, I have a hard time seeing the interrupt controller
> taking > 20 us and I don't ever see it taking > 30 us ever in my tests
> unless I bring the cpufreq back down. With the cpufreq at 126 MHz I can
> still see the interrupt handler take > 50 us, so I'm sure we could
> improve this further. ...but hey, it's a start.
In the configuration described above, we were still able to run the
interrupt handlers capabilities when the cpufreq is at 126MHz, but
once set to a sane minimum it is running really nice now.
Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko@sntech.de>
To: Douglas Anderson <dianders@chromium.org>
Cc: John Youn <John.Youn@synopsys.com>,
balbi@ti.com, kever.yang@rock-chips.com,
william.wu@rock-chips.com, huangtao@rock-chips.com,
linux-rockchip@lists.infradead.org,
Julius Werner <jwerner@chromium.org>,
gregory.herrero@intel.com, yousaf.kaukab@intel.com,
dinguyen@opensource.altera.com, stern@rowland.harvard.edu,
ming.lei@canonical.com, johnyoun@synopsys.com,
gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 0/21] usb: dwc2: host: Fix and speed up all the stuff, especially with splits
Date: Sat, 23 Jan 2016 18:52:20 +0100 [thread overview]
Message-ID: <4616032.f74zstHVA0@phil> (raw)
In-Reply-To: <1453486736-15358-1-git-send-email-dianders@chromium.org>
Hi,
Am Freitag, 22. Januar 2016, 10:18:35 schrieb Douglas Anderson:
> This is a bit of catchall series for all the bug fix and performance
> patches I've been working on over the last few months. Note that for
> dwc2 we need to do LOTS in software and need super low interrupt
> latency, so most performance improvements actually fix real bugs.
>
> Patches are structured to start with no-brainer stuff that could be
> applied ASAP, especially things I've already gotten Acks for. Things
> get slightly more RFC / RFT like as we get farther down the series.
> Anything that can be landed sooner rather than later (especially those
> Acked long ago) would help in re-posts (I'm not biased, of course).
>
> It's been a few months since my last post of this series. In the
> meantime I've added a bunch of small bugfixes to the start of it and
> also TOTALLY REWROTE the microframe scheduler. I'll say up front: I
> know nothing about USB. I haven't read the whole spec. I'm not
> terribly familiar with the OHCI, EHCI, and XHCI drivers in the kernel.
> ...and I'm pretty clueless overall. Nevertheless, I've attempted to
> write up a fancy scheduler based on the portion of the spec talking
> about microframe scheduling requirements. This rewritten scheduler does
> seem to help when I start jamming lots of USB things into a hub, so
> presumably the code is a reasonably starting point. Given my current
> understanding of USB the old code was fairly insane, so presumably even
> if my new patch isn't perfect it's better than what we had.
I've tested this series (+the low-speed fix from today) on the following
usb-tree on a rk3288-veyron-jerry:
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Video, Driver=, 480M
|__ Port 1: Dev 2, If 1, Class=Video, Driver=, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=zd1211rw, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
|__ Port 3: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 6, If 0, Class=Vendor Specific Class, Driver=, 12M
|__ Port 3: Dev 8, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 10, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 1: Dev 10, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 11, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 11, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 3: Dev 12, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 4: Dev 13, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 4: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 5: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
At first we were maxing out the 9 channels of the otg port, which the
driver didn't seem to care about in 4.4-rc6, but after realizing that and
switching over to the 16ch host-port it ran really nicely, especially wrt
faster handling of all the keyboard input.
When looking over to the other desk and the person using that veyron-
jerry not cursing anymore, it seem to be running fine in a real-world use
for 2 hours now ;-)
So,
Tested-by: Heiko Stuebner <heiko@sntech.de>
> The patches here will speed up the interrupt controller significantly.
> After this series, I have a hard time seeing the interrupt controller
> taking > 20 us and I don't ever see it taking > 30 us ever in my tests
> unless I bring the cpufreq back down. With the cpufreq at 126 MHz I can
> still see the interrupt handler take > 50 us, so I'm sure we could
> improve this further. ...but hey, it's a start.
In the configuration described above, we were still able to run the
interrupt handlers capabilities when the cpufreq is at 126MHz, but
once set to a sane minimum it is running really nice now.
Heiko
next prev parent reply other threads:[~2016-01-23 17:52 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 18:18 [PATCH v5 0/21] usb: dwc2: host: Fix and speed up all the stuff, especially with splits Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 02/21] usb: dwc2: host: Get aligned DMA in a more supported way Douglas Anderson
[not found] ` <1453486736-15358-1-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-01-22 18:18 ` [PATCH v5 01/21] usb: dwc2: rockchip: Make the max_transfer_size automatic Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 03/21] usb: dwc2: host: Set host_rx_fifo_size to 528 for rk3066 Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-27 10:13 ` Kever Yang
[not found] ` <56A89838.3040202-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-27 19:44 ` Doug Anderson
2016-01-27 19:44 ` Doug Anderson
2016-01-28 8:28 ` Kever Yang
2016-01-22 18:18 ` [PATCH v5 04/21] usb: dwc2: host: Set host_perio_tx_fifo_size to 304 " Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
[not found] ` <1453486736-15358-5-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-01-28 3:10 ` Kever Yang
2016-01-28 3:10 ` Kever Yang
2016-01-28 3:28 ` Doug Anderson
2016-01-28 6:41 ` Kever Yang
[not found] ` <56A9B80A.2020506-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-28 18:16 ` Doug Anderson
2016-01-28 18:16 ` Doug Anderson
2016-01-28 23:25 ` Doug Anderson
2016-01-22 18:18 ` [PATCH v5 05/21] usb: dwc2: host: Avoid use of chan->qh after qh freed Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-28 3:25 ` Kever Yang
[not found] ` <56A98A47.2010705-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-28 23:26 ` Doug Anderson
2016-01-28 23:26 ` Doug Anderson
2016-01-22 18:18 ` [PATCH v5 06/21] usb: dwc2: host: Always add to the tail of queues Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
[not found] ` <1453486736-15358-7-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-01-27 10:23 ` Kever Yang
2016-01-27 10:23 ` Kever Yang
2016-01-22 18:18 ` [PATCH v5 07/21] usb: dwc2: hcd: fix split transfer schedule sequence Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-28 1:20 ` Kever Yang
2016-01-22 18:18 ` [PATCH v5 08/21] usb: dwc2: host: Add scheduler tracing Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-28 3:39 ` Kever Yang
2016-01-22 18:18 ` [PATCH v5 09/21] usb: dwc2: host: Add a delay before releasing periodic bandwidth Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 10/21] usb: dwc2: host: Giveback URB in tasklet context Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 11/21] usb: dwc2: host: Use periodic interrupt even with DMA Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 12/21] usb: dwc2: host: Rename some fields in struct dwc2_qh Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 13/21] usb: dwc2: host: Reorder things in hcd_queue.c Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 14/21] usb: dwc2: host: Split code out to make dwc2_do_reserve() Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 15/21] usb: dwc2: host: Add scheduler logging for missed SOFs Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 16/21] usb: dwc2: host: Manage frame nums better in scheduler Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
[not found] ` <1453486736-15358-17-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-01-27 20:49 ` Doug Anderson
2016-01-27 20:49 ` Doug Anderson
2016-01-22 18:18 ` [PATCH v5 18/21] usb: dwc2: host: Add dwc2_hcd_get_future_frame_number() call Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 19/21] usb: dwc2: host: Properly set even/odd frame Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-22 18:18 ` [PATCH v5 20/21] usb: dwc2: host: Totally redo the microframe scheduler Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
[not found] ` <1453486736-15358-21-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2016-01-24 5:44 ` Doug Anderson
2016-01-24 5:44 ` Doug Anderson
2016-01-22 18:18 ` [PATCH v5 21/21] usb: dwc2: host: If using uframe scheduler, end splits better Douglas Anderson
2016-01-22 18:18 ` Douglas Anderson
2016-01-23 17:52 ` Heiko Stuebner [this message]
2016-01-23 17:52 ` [PATCH v5 0/21] usb: dwc2: host: Fix and speed up all the stuff, especially with splits Heiko Stuebner
2016-01-23 23:09 ` Doug Anderson
2016-01-23 23:09 ` Doug Anderson
2016-01-24 5:36 ` Doug Anderson
2016-01-24 5:36 ` Doug Anderson
2016-01-22 18:18 ` [PATCH v5 17/21] usb: dwc2: host: Schedule periodic right away if it's time Douglas Anderson
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=4616032.f74zstHVA0@phil \
--to=heiko-4mtyjxux2i+zqb+pc5nmwq@public.gmane.org \
--cc=John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=gregory.herrero-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=jwerner-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
--cc=william.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=yousaf.kaukab-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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.