Re: USB changes for UAS

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

 



On Sat, 1 May 2010, Matthew Wilcox wrote:

> > You're right that the performance hit will be less with UAS than with
> > BOT, but it might still be larger than one would like.  It all depends
> > on how the speed of the device compares to the speed of the USB bus.  
> > If the bus speed is the bottleneck then adding extra transfers will
> > slow things down, otherwise it won't (or at least, not as much).
> 
> Yup.  It's probably also more overhead on the host side.  As we've
> discussed before, most UAS devices probably still do BOT on a different
> interface configuration, and I'm quite happy for usb-storage to outperform
> uas in these circumstances.

So whatever scheme we use to select a driver, it should default to UAS 
if the HCD has SG support and to BOT otherwise?  (Boy, I hardly ever 
get to use so many acronyms in a single sentence!)

> > So now that we're both on the same page...  What improved support do
> > you mean?
> 
> Only what I've done so far -- making it possible for a driver to directly
> populate urb->sg and send it down without using the usb_sg_wait()
> interface.

If the scatterlist is allowed to contain more than one element, this
would be tantamount to enhancing usb_sg_* to work asynchronously and
folding it into usb_submit_urb().

If the scatterlist contains only one element then all that's needed is 
set urb->num_sgs to 1, as your UAS code does.

> The patch you did to EHCI (as1300 / commit 40f8db8f8f) does look quite
> straightforward to port to the uhci-q.c and ohci-q.c file.  On the one
> hand, that's a good thing, because I can just do that (er, if I can figure
> out a way to test either of them).

Testing is easy -- just see if your mass storage devices still work.  
usb-storage calls usb_sg_*, which will use the HCD's native SG support.

>  On the other hand, it's not taking
> advantage of EHCI's native ability to do scatter-gather in a single qtd if
> the pages are virtually contiguous (see pages 86-88 of the EHCI 1.0 spec).
> 
> So EHCI could be further enhanced ... if it's worth it.

Hmm, maybe...  If it's not too hard to do.  I'll have to look at the 
code.

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