Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932706AbaLBSrJ (ORCPT ); Tue, 2 Dec 2014 13:47:09 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:40401 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932606AbaLBSrH (ORCPT ); Tue, 2 Dec 2014 13:47:07 -0500 Date: Tue, 2 Dec 2014 13:46:48 -0500 From: Konrad Rzeszutek Wilk To: Joerg Roedel Cc: Joerg Roedel , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] x86, swiotlb: Try coherent allocations with __GFP_NOWARN Message-ID: <20141202184648.GB32622@laptop.dumpdata.com> References: <1417174149-31210-1-git-send-email-joro@8bytes.org> <1417174149-31210-3-git-send-email-joro@8bytes.org> <20141201202854.GD21626@laptop.dumpdata.com> <20141202144551.GJ3156@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141202144551.GJ3156@suse.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). > > > Joerg > -- 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/