On Thursday 11 May 2006 8:49 am, Christopher Montgomery wrote:
> I also forgot the example of OHCI, which appears to do some/all of the
> actual intraframe scheduling in hardware.  Is it just sending out
> transaction packets in the order they're queued?

Starting 10% into the frame, yes.  Recall that no more than 90% of the
frame's bandwidth may be reserved for periodic transfers.

> (If so, the isos are 
> occurring in totally random places in a given frame).

Not totally random.  No periodic transfers in the first 100 usec, ever.
And then the periodic schedule is scanned, and one packet is transferred
according to each QH.

Now, it happens that the Linux OHCI driver uses a sparse scheduling
tree, so the only "randomness" is that if a lower frequency transfer
is scheduled, it will happen first and thus shift all the higher
frequency transfers to a later slot.

That can't matter much for interrupt transfers, except that lowspeed
transfers take a long time.  Which ISTR is one of the reason to use
the "best fit" scheduling algorithm ... even out those slow transfers,
and make it possible to pass standard "lowspeed mouse tree" tests and
still be able to include a bunch of normal fullspeed transfers.

It can however matter for isochronous transfers, which can have much
larger packets ... but which are normally at period 1, and thus sitting
at the end of the schedule, behind almost any interrupt transfer.


> The ohci driver balances the initial 
> transaction scheduling amongst frames, but there's no rebalancing code
> (indeed if OHCI is doing frame scheduling in hardware, there'd be no
> need).

Not true.  We don't need rebalancing because we've never had users
reporting they ran into the bandwidth limitations.  The most demanding
standard use case is that "mouse tree" case.

But it's easy to create a schedule where software rebalancing is needed.
Consider a schedule with two 400-usec transfers at period=2 ... they'd go
into alternate frames by default.  Now try to add a single transfer of
800-usec, also period=2.  There's enough bandwidth, if the schedule got
rebalanced so both 400-usec transfers went into the same frame.  The
way to get to that schedule from the initial one is to rebalance.




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to