Re: USB 3.0 in Linux main stream kernel

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

 



On Tue, Jan 27, 2009 at 03:34:27PM -0800, David Brownell wrote:
> On Monday 26 January 2009, Sarah Sharp wrote:
> > If the driver is blocked waiting on the scatter gather transfer by calling
> > usb_sg_wait(), it obviously can't queue any other commands.  The question is,
> > should the driver spawn a kernel thread or a work queue or something, so that
> > each instance can call usb_sg_init() and usb_sg_wait()?  Or should the USB core
> > API be changed so that the driver can submit multiple URBs with scatter gather
> > list pointers in them?
> 
> Synch on command completion could be changed; it's never really
> needed to work differently.  The tricky bit would be fault
> handling ... and to a lesser degree, how to make sure the same
> interface works with all kinds of HCDs (including ones that do
> not support DMA).
> 
> I like the current model, whereby URBs deal with only a single
> contiguous DMA buffer.  (Possibly one that's made contiguous
> through an IOMMU coalescing pages.)  Having a uniform model is
> a big win ... even with the exception whereby ISO transfers
> split that buffer into discrete chunks.  So I'd rather keep to
> the model whereby scatterlists are mapped to URBs outside the
> sight of HCDs.

The problem is that I saw significant performance improvement with USB
3.0 prototypes when I pushed the scatter gather list down to the xHCI
HCD.  The xHCI data structures are just set up in such a way that
queuing a list of scatter gather entries is just natural.

The performance increase might have been due to how the device was set up
to do PCI DMA; it might have been due to something else.  I can't know
until I run both sets of patches (bulk TX with and without scatter
gather list push down) on multiple host controllers and multiple USB 3.0
devices.

Inaky was saying that he would love to see scatter gather lists pushed
down to the HCDs for wireless USB.  The USB core forces the scatter
gather list from a driver into one buffer, then the wHCI has to break
that buffer apart again and insert more headers in between.  If the
upper layer could just submit a scatter gather list down to the HCD and
not have the USB core combine it, that would save a lot of copies.

Sarah Sharp
--
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