On Tuesday 27 January 2009, Sarah Sharp wrote: > On Tue, Jan 27, 2009 at 03:34:27PM -0800, David Brownell wrote: > > ...[snip]... > > > > 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. > > ...[snip]... > > 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. I second that. The problem of having a single URB per s/g node is the overhead. When you need to insert headers in the middle of a data stream (for example) every so many bytes, the URB overhead starts to be felt. Allocation is easy, but initialization and the rest really make it messy. So at the end you either live with that overhead or just use bounce buffers (which end up being less overhead--at least code wise). If the HCD took sgs, a lot of code could be put to sleep. -- Inaky -- 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