It'll tend to usually work because GFP_KERNEL allocations prefer to
not dip into the DMA region.
> All these allocations are blocking and can wait a long time.
But it's not! dma_alloc_coherent() is using GFP_ATOMIC|__GFP_DMA.
Now, if we can fix the caller to use
__GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS | __GFP_DMA
then that at least will allow page reclaim.
Then we can remove this restriction in __alloc_pages():
/*
* Don't let big-order allocations loop. Yield for kswapd, try again.
*/
if (order <= 3) {
yield();
goto rebalance;
}
and all will be well.
dma_alloc_coherent() should be fixed to take a gfp_mask, and callers
should be updated.
As for permitting direct page reclaim for higher-order allocations: I
just don't know - it's from before my time. Perhaps the VM will livelock.
-
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/