On Mon, 2008-02-18 at 14:02 +0000, Russell King wrote: > Another solution jejb suggested was to make dma_free_coherent() lazy, > but (a) I'm unconvinced that this'll work with drivers which > constantly > alloc+free in IRQ context since there's generally only 2MB of VM space > for such mappings, and it probably won't take long to eat through that > limited space with such a scheme. I didn't say make the alloc/free lazy, I said make the mapping setup teardown lazy. So on alloc, you first look for existing space, if none, you map some more. On free you *don't* teardown the mappings (which is what requires the IPI) but simply free to the existing space pool ready for reuse. You map and free in page size chunks, since the coherent memory users that want > PAGE_SIZE usually all do boot time allocation (and don't free until release time). The reuse of the pages should keep even the drivers that do persistent alloc/free of dma coherent memory happy, and it should reach a steady state fairly quickly. James - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html