Re: [PATCH 1/3] swiotlb: Warn on allocation failure in swiotlb_alloc_coherent

From: Joerg Roedel
Date: Mon Jan 26 2015 - 06:49:53 EST


On Fri, Jan 23, 2015 at 06:04:25PM +0100, Borislav Petkov wrote:
> On Tue, Jan 06, 2015 at 03:51:12PM +0100, Joerg Roedel wrote:
> > +
> > +err_warn:
> > + pr_warn("swiotlb: coherent allocation failed for device %s size=%zu\n",
> > + dev_name(hwdev), size);
> > + dump_stack();
>
> Are we really sure we want to be that noisy about it? What happens if
> that fails, we can't do DMA anymore or should we free some precious DMA
> memory, as a compromise?

Hmm, I don't think there is a way to request drivers to free DMA memory.
What this patch does is to keep the same noisiness as before, just not
from the page allocator but from the very end of the DMA allocation
process, when everything failed.
We can of course discuss whether this is too noisy and put some kind of
ratelimit around.


Joerg

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