Re: [PATCH] generic device DMA (dma_pool update)

Adam J. Richter
2003-01-01T19:13:38Z

James Bottomley wrote:
> void *
> dma_alloc_coherent(struct device *dev, size_t size,
>- dma_addr_t *dma_handle)
>+ dma_addr_t *dma_handle, int flag)

I thought Andrew Morton's request for a gfp flag was for
allocating memory from a pool (for example, a "read ahead" will want
to abort if memory is unavailable rather than wait).

The big DMA allocations, however, will always occur during
initialization, and I think will always have the intermediate policy
of "I can block, but I should fail rather than block for more than a
few seconds and potentially deadlock from loading too many drivers on
a system with very little memory."

Can someone show me or invent an example of two different uses
of dma_alloc_coherent that really should use different policies on
whether to block or not?

Adam J. Richter __ ______________ 575 Oroville Road
adam@yggdrasil.com \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."