On Tue, Apr 20, 2004, Alan Stern <[EMAIL PROTECTED]> wrote:
> On Tue, 20 Apr 2004, David Brownell wrote:
> > >>Wouldn't this be better fixed in the USB storage driver?
> > > 
> > > Or rather, in the usb_sg_init() routine from the scatter-gather library.  
> > > It could arrange to clear the URB_NO_INTERRUPT flag after every 10 ms 
> > > worth of data or so, about 12 KB for a full-speed bus (see table 5-9 in 
> > > the USB 2.0 spec).  What do you think, David?
> > 
> > See the NOTE in usb_sg_wait() about UHCI.  There's a second factor
> > to consider:  memory utilization can be high with UHCI and deep
> > queues.  I think there have been a few reports of folk having
> > problems running out of TD memory under load.
> > 
> > Both of those issues are UHCI-specific.  So I think the fixes for
> > them would most naturally be in the UHCI driver.  All the fixes
> > that come quickly to my mind are ones where the HCD has a good
> > "queue per endpoint" data structure, so it can enforce policies
> > easily.  For example:  don't clear URB_NO_INTERRUPT (it's readonly
> > to the HCD!) ... but force an IRQ every so often, no matter what
> > it says.  Or:  don't allocate TDs until the URB is within about
> > 10msec of the queue head, and recycle the previous TDs through a
> > list which is dedicated to that queue (until it empties).
> 
> Those are things that will be doable in the future.  For now it looks 
> best simply to ignore the flag and always interrupt, which is what the
> patch does.

I agree. It would be nice to have the UHCI driver prevent a worst case
scenario of eating up lots of memory, but that kind of logic would be
pretty complicated.

Perhaps this patch should fix the comment to explain this is intended to
be a temporary fix with a better performing solution to come later?

JE



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to