Am Mittwoch, 6. Juni 2007 schrieb Pete Zaitcev:
> On Wed, 6 Jun 2007 11:16:51 +0200, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> 
> > So what exactly is the problem? Is the documentation wrong?
> 
> In the vast majority of cases, streaming transfer is more appropriate,

In which regard exactly? Could you elaborate? Which resource is wasted?

> which is what you receive if you let HCD to establish and tear down
> mappings. The consistent allocation was intended to things like mailboxes,
> where it is more advantageous to load a couple of words from uncached
> memory than to call an API which invalidates or flushes the caches.
> In case of USB, QHs and TDs are a good example, which is why the
> pool allocation is layered on top of consistent allocations.
> 
> It we all were using SPARC or MIPS, we'd learn this pretty quickly.
> However, on x86 and s390, which are I/O coherent, there is really
> not much difference. The consistent mapping is cached.
> 
> So this decision is comes down pretty much to giving a damn about
> ARM or SPARC.
> 
> There is also a question of tying up IOMMU resources for a long time.
> If you set up DMA mappings in advance with usb_buffer_alloc, you keep
> a part of your IOMMU unavailable to things like mass storage, which

Yet the documentation claims that the IOMMU is not affected? Quote:

  The memory buffer returned is "dma-coherent"; sometimes you might need to
  force a consistent memory access ordering by using memory barriers.  It's
  not using a streaming DMA mapping, so it's good for small transfers on
  systems where the I/O would otherwise tie up an IOMMU mapping.  (See
  Documentation/DMA-mapping.txt for definitions of "coherent" and "streaming"
  DMA mappings.)

So does it need to be corrected? We cannot hope to get this right if the
documentation is wrong.

        Regards
                Oliver

PS: David in cc because iirc correctly he wrote that code


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

Reply via email to