lkml.org 
[lkml]   [2002]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] generic device DMA (dma_pool update)
Date
From
david-b@pacbell.net said:
> USB device drivers tend to either allocate and reuse one dma buffer
> (kmalloc/kfree usage pattern) or use dma mapping ... so far.

Please be careful with this in drivers. Coherent memory can be phenomenally
expensive to obtain on some hardware. Sometimes it has to be implemented by
turning off caching and globally flushing the tlb. Thus it really makes
sense most of the time for drivers to allocate all the coherent memory they
need initially and not have it go through the usual memory allocate/free cycle
except under extreme conditions. That's sort really what both pci_pool and
mempool aim for.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.060 / U:3.180 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site