Re: Walking the USB tree?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 1 Jul 2011, Sarah Sharp wrote:

> > That's what I'm talking about.  Instead of recalculating the free 
> > bandwidth for the LS/FS part of the bus, we should store it along with 
> > the TT.  For xhci-hcd this would be a time-space tradeoff.
> > 
> > However for ehci-hcd this is really necessary.  The existing
> > implementation doesn't keep track of how much bandwidth has actually
> > been allocated; instead it relies on looking at how much is currently
> > in use.  This is wrong, because the bandwidth can remain allocated for
> > some period of time even while it isn't being used.
> 
> Hmm, ok.  I'm still not sure you're going to want to calculate the EHCI
> TT bandwidth in the same way the xHCI driver will.  We'll have to see
> once I get the algorithm coded up.

Maybe it won't be the same.  But if it isn't, I don't see how your way 
will work.

For example, if you let the hardware do the dynamic scheduling, doesn't
that mean it picks which frames to use for isochronous transfers with
period > 1 frame?  Does it pass that information back to xhci-hcd?  
The starting frame number is supposed to be filled in whenever an URB
is submitted.

Suppose you have an endpoint using 75% of the available bandwidth/frame
but with a period of 8 frames.  Now you want to end another endpoint
also using 75% of the bandwidth and also with a period of 8.  With
worst-case scheduling, you have to assume the hardware will try to
squeeze both endpoints into the same frame and therefore you have to
reject the new endpoint -- which would be a pretty dumb thing to do
under the circumstances.

> Have you gotten reports about problems with the EHCI TT bandwidth
> scheduler, or do you just know it's not working properly?

Both.  It sort of works okay, provided you don't put it under any 
stress.  But it definitely has lots of bugs.

>  The EHCI
> driver will at least reject the URB if it can't find space in the
> schedule, correct?  It seems like you just want to capture that issue
> earlier?

No -- I want to do the calculation _correctly_ so that the URB won't be 
rejected if there really is space available in the schedule.  (And 
conversely, the URB will be rejected if there isn't space available -- 
I haven't heard of this happening but I'm not convinced it can't.)

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux