Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751527AbeABPkC convert rfc822-to-8bit (ORCPT + 1 other); Tue, 2 Jan 2018 10:40:02 -0500 Received: from mail.fireflyinternet.com ([109.228.58.192]:55939 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750743AbeABPkA (ORCPT ); Tue, 2 Jan 2018 10:40:00 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT From: Chris Wilson User-Agent: alot/0.3.6 To: =?utf-8?q?Christian_K=C3=B6nig________?= , imirkin@alum.mit.edu, efault@gmx.de, michel@daenzer.net, konrad.wilk@oracle.com, linux-kernel@vger.kernel.org References: <20180102121358.16215-1-christian.koenig@amd.com> In-Reply-To: <20180102121358.16215-1-christian.koenig@amd.com> Message-ID: <151490759196.21495.9033629958966748437@mail.alporthouse.com> Subject: Re: [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set v2 Date: Tue, 02 Jan 2018 15:39:51 +0000 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Quoting Christian König (2018-01-02 12:13:58) > TTM tries to allocate coherent memory in chunks of 2MB first to improve > TLB efficiency and falls back to allocating 4K pages if that fails. > > Suppress the warning when the 2MB allocations fails since there is a > valid fall back path. > > v2: suppress warnings from swiotlb_tbl_map_single as well > > Signed-off-by: Christian König > Reported-by: Mike Galbraith > Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104082 > CC: stable@vger.kernel.org > --- > @@ -989,7 +1002,8 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, > if (swiotlb_force == SWIOTLB_FORCE || > !dma_capable(hwdev, dev_addr, sg->length)) { > phys_addr_t map = map_single(hwdev, sg_phys(sg), > - sg->length, dir, attrs); > + sg->length, dir, attrs, > + true); This keeps the warning for dma_map_sg(), so seems quite ineffective. > if (map == SWIOTLB_MAP_ERROR) { > /* Don't panic here, we expect map_sg users > to do proper error handling. */ And counter to the suggestion here? -Chris