Messages in this thread | | | Date | Tue, 2 Dec 2014 13:46:48 -0500 | From | Konrad Rzeszutek Wilk <> | Subject | Re: [PATCH 2/3] x86, swiotlb: Try coherent allocations with __GFP_NOWARN |
| |
On Tue, Dec 02, 2014 at 03:45:51PM +0100, Joerg Roedel wrote: > On Mon, Dec 01, 2014 at 03:28:54PM -0500, Konrad Rzeszutek Wilk wrote: > > On Fri, Nov 28, 2014 at 12:29:08PM +0100, Joerg Roedel wrote: > > > diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c > > > index 77dd0ad..79b2291 100644 > > > --- a/arch/x86/kernel/pci-swiotlb.c > > > +++ b/arch/x86/kernel/pci-swiotlb.c > > > @@ -20,6 +20,14 @@ void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size, > > > { > > > void *vaddr; > > > > > > + /* > > > + * When booting a kdump kernel in high memory these allocations are very > > > + * likely to fail, as there are by default only 8MB of low memory to > > > + * allocate from. So disable the warnings from the allocator when this > > > + * happens. SWIOTLB also implements fall-backs for failed allocations. > > > + */ > > > + flags |= __GFP_NOWARN; > > > > Should this perhaps then have 'if (kdump_kernel)' around it since > > the use-case seems to be kdump related? > > Hmm, I don't think this is entirely kdump specific. It can also be > triggered on a non-kdump kernel, it is just much more unlikely. But > maybe I should change the comment to something like: > > /* > * Don't print a warning when the first allocation attempt > * fails. The swiotlb_alloc_coherent() function will print a > * warning when the allocation of DMA memory ultimatly failed. > */
Much better. Thank you. > > This takes the kdump-specifics out of this change (in the end > kdump-kernel loaded high is just a case where this failure is much more > likely).
<nods> > > > Joerg >
| |