[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150126032236.GN2461@dhcp-16-105.nay.redhat.com>
Date: Mon, 26 Jan 2015 11:22:36 +0800
From: Baoquan He <bhe@...hat.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Joerg Roedel <joro@...tes.org>, Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
x86@...nel.org, linux-kernel@...r.kernel.org,
Joerg Roedel <jroedel@...e.de>
Subject: Re: [PATCH 2/3] x86, swiotlb: Try coherent allocations with
__GFP_NOWARN
On 01/23/15 at 06:03pm, Borislav Petkov wrote:
> On Tue, Jan 06, 2015 at 03:51:13PM +0100, Joerg Roedel wrote:
> > From: Joerg Roedel <jroedel@...e.de>
> > 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;
>
> Ok, so this practically does all allocations __GFP_NOWARN now. Shouldn't
> you be doing this before swiotlb_alloc_coherent() and not before
> dma_generic_alloc_coherent()?
I think this patch mainly suppress warning from buddy allocation
failure because it tried buddy allocation several times before the final
try of bounce buffer allocation. Buddy allocation failure will call
dump_stack.
>
> > vaddr = dma_generic_alloc_coherent(hwdev, size, dma_handle, flags,
> > attrs);
> > if (vaddr)
>
> --
> Regards/Gruss,
> Boris.
>
> ECO tip #101: Trim your mails when you reply.
> --
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists