On Tue, Sep 15, 2020 at 09:53:30AM +0200, David Hildenbrand wrote: > Two thoughts: > > 1. Most (all?) alloc_contig_range() users are interested in handling > short-term pinnings in a nice way (IOW, make the allocation succeed). > I'd much rather want to see this being handled in a nice fashion inside > alloc_contig_range() than having to encode endless loops in the caller. > This means I strongly prefer something like [3] if feasible. But I can > understand that stuff ([5]) is complicated. I have to admit that I am > not an expert on the short term pinning described by you, and how to > eventually fix it. Agreed. Also retrying forever is simply broken, and will lead to deadlocks for the DMA calls into CMA, so with my dma-mapping hat on I have to hard-NAK this approach.