On Tue, 15 May 2007, Laurent Pinchart wrote: > Hi everybody, > > following the discussion about the split bulk transfers, Alan Stern and David > Brownell told me I shouldn't use usb_buffer_alloc as a generic purpose URB > buffer allocated. However, Documentation/usb/dma.txt contradicts this. Should > the documentation be fixed, or can/should usb_buffer_alloc be used to > allocate URB buffers ?
It's difficult to give general advice, since the performance will vary according to the platform and the usage. If a buffer is going to be used once and then thrown away, I think there's not much advantage to usb_buffer_alloc(). Although on some odd platforms that may not be true, it should be true on the vast majority. If a buffer is going to be used many times, then usb_buffer_alloc() might give improved performance. Again, that depends on the platform and the type of memory accesses involved. The tradeoffs are hard to assess because they involve a lot of variables: How responsive is the IOMMU, does the cache do bus-snooping, will there be many accesses to uncached memory, and so on. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel