lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1511141220060.28681-100000@netrider.rowland.org>
Date:	Sat, 14 Nov 2015 12:32:22 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Doug Anderson <dianders@...omium.org>
cc:	John Youn <John.Youn@...opsys.com>, Yunzhi Li <lyz@...k-chips.com>,
	Julius Werner <jwerner@...gle.com>,
	Dinh Nguyen <dinguyen@...nsource.altera.com>,
	"Kaukab, Yousaf" <yousaf.kaukab@...el.com>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	wulf <wulf@...k-chips.com>,
	Kever Yang <kever.yang@...k-chips.com>,
	caesar <caesar.wang@...k-chips.com>,
	Tao Huang <huangtao@...k-chips.com>,
	rockchip-discuss <rockchip-discuss@...omium.org>
Subject: Re: [RFC] usb: dwc2: hcd: fix split schedule issue

On Fri, 13 Nov 2015, Doug Anderson wrote:

> To handle things smarter, I think I need to research how to deal with
> hubs attached to hubs attached to hubs.  For instance:
> 
> dwc2
> -> multi_tt hub
>     -> single_tt hub
>         -> device 1
>         -> device 2
>     -> single_tt hub
>         -> device 3
>         -> device 4
> vs.
> 
> dwc2
> -> single_tt hub
>     -> multi_tt hub
>         -> device 1
>         -> device 2
>     -> multi_tt hub
>         -> device 3
>         -> device 4
> 
> In the first case I presume I could schedule device 1 and device 3 at
> the same time, but not device 2 and device 4.

Devices 2 and 4 are related in exactly the same way as 1 and 3.  You 
can schedule them independently.  But you can't schedule 1 
independently of 2 or 3 independently of 4.

>  In the 2nd case I
> presume I could schedule all 4 devices independently.  ...but I
> haven't dug through the spec to confirm that, yet.

That's right.  The basic rule is very simple: Independent scheduling 
requires that the devices in question be attached through different 
TTs, where a multi-TT hub has a separate TT for each port.

On the other hand, it's important to keep in mind that even though you
can consider the devices independently as far as scheduling on the
FS/LS buses is concerned, you also have to consider the bandwidth
requirements of the SSPLIT and CSPLIT packets on the HS bus.  Since
there's only one HS bus, those things can't be independent.

How do you decide which microframes to dedicate to a particular
endpoint?  The scheduler in ehci-hcd isn't especially sophisticated
about this, and it can easily work itself into a corner by allocating
things in such a way that there's no microframe to put a new request
even though the total amount of available bandwidth is more than
sufficient.  I have put a lot of thought into ways of improving this,
but there doesn't seem to be any good approach that doesn't require
rebalancing (i.e., changing the microframes allocated to certain
endpoints) from time to time.  Rebalancing is very awkward because it
means stopping some ongoing transfers temporarily, removing the entries
from their old scheduled positions, putting them into the new
positions, and then restarting the transfers.  It can't be done
transparently or quickly.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ