Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2214464pxb; Fri, 25 Mar 2022 13:11:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFfAm+WWxRMAB1e/nJyaayvylpyq01LTnTxfY8/5KpuF6wjaWJkEw/MAh1NJD/l+Pb8ZiX X-Received: by 2002:a17:903:1249:b0:154:c472:de6b with SMTP id u9-20020a170903124900b00154c472de6bmr11881791plh.38.1648239062192; Fri, 25 Mar 2022 13:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648239062; cv=none; d=google.com; s=arc-20160816; b=0qzFVuUZ8sim5XkcevKBb0WaUg72SOv8ZL5xpmZ1qnJ/4mDrFNg5VGaHsuVzoFUWuc aWXQ09+LSxr0IvCARao4VZBq0Fj1UMjdy5ftzE4hNwlFHbSIh1P3r67u/S4evmQSxC1m p1xPRgQIixRdyu6dWKiZoiukolR1lcfBr2m7USaUt+JHJ3uClDO8vV4+fiSvevGGBeoX iUSvEu01cRA9gNTEw0IPI40R4i1I+E5RiM0IeXaMKicJyRpnRIJb7MOIRNxIIL9yHpE0 27K3jFfloSKwY7sDwoyeNeSoxMfS0En6xBgqDHYNteFJvlCOirTqiCHIYUusLh0TCUQ5 TPdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=4QkFXQKht3FsROuZXBPuumuUjobkvoKdYm8rz90N3ok=; b=PlDi4E/mSNz92LNveJYrhL0Y17+xno4uwjx4q3xt6o+d60q6plFLn/eiAis8BXIHCx eqCY53hmmajgHx6W9H5STA9BLkuVILqCLXoyZeyPSfyGIH6bKqIk0moFFWtlhBQVGvvv FMQZfKQxUfI7sXf9wk0h83cRhhBBVI6w1UUejcYLKwoD5gsNRP+CswN3V5LOFC9GPaA+ 2bRGgRNzvnu+82aGwrCSVHnBjjZPgLo3gVRmgKPRAqzUpmQqVy1IDbQSFUz68oBVq587 tcKN+v5gTIm03+cD/rILSX/Au2fSZpWOBypZBAUfxehAHwTalqZGGFurG7hb2kpDqej4 Jo6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h3-20020a63f903000000b003816043ee50si3334533pgi.69.2022.03.25.13.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 13:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 688663AF765; Fri, 25 Mar 2022 11:53:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359088AbiCYM3I (ORCPT + 99 others); Fri, 25 Mar 2022 08:29:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359612AbiCYM23 (ORCPT ); Fri, 25 Mar 2022 08:28:29 -0400 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15B509D4C1 for ; Fri, 25 Mar 2022 05:26:07 -0700 (PDT) Received: by mail-wm1-f49.google.com with SMTP id q20so4368213wmq.1 for ; Fri, 25 Mar 2022 05:26:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4QkFXQKht3FsROuZXBPuumuUjobkvoKdYm8rz90N3ok=; b=G8pGikCU+68iQU8yVzzLsdr902Q5LEleXFwfix2G2Sj3QjG7SrCX4N15TiRiZa6IL5 RrkKXiUSqVNC8JrVuBst6GbE6Ga6+srQynlj2cbdaLhRoCYnRlX7jr/yiFZBnQ+1Vy9s 1dDoplRGigJrsIdl06oGHELC3SejFHitEP/Wo3JiuGlE4KKlJV/oteIiStHPg1PwC+XF ESmFwEbTa727MDjqAlheu4385IyjyBa0ZOoS31zf008gURTzgLqIZ+JIRVWCb6QRljtA tuHgo8f4UKNBtnL0yUOAeir/p8DrdUxiqs04K4GwyuAeJot/Q8GH1WZs+L/YOERRel/Q J8wA== X-Gm-Message-State: AOAM533kyQ5W+ej+ziAJWhThH7zjcjOrS+hEEXIcnOWiBdsDBlhTbqF5 uFJ8X8ajFVzwBb03XFbF568= X-Received: by 2002:a7b:c048:0:b0:38a:12dc:4694 with SMTP id u8-20020a7bc048000000b0038a12dc4694mr9792566wmc.80.1648211165381; Fri, 25 Mar 2022 05:26:05 -0700 (PDT) Received: from tiehlicka.suse.cz (nat1.prg.suse.com. [195.250.132.148]) by smtp.gmail.com with ESMTPSA id h188-20020a1c21c5000000b0038c6c37efc3sm4504278wmh.12.2022.03.25.05.26.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 05:26:04 -0700 (PDT) From: Michal Hocko To: Andrew Morton , Christoph Hellwig , Baoquan He Cc: John Donnelly , David Hildenbrand , , LKML , Michal Hocko Subject: [PATCH] dma/pool: do not complain if DMA pool is not allocated Date: Fri, 25 Mar 2022 13:25:59 +0100 Message-Id: <20220325122559.14251-1-mhocko@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Hocko we have a system complainging about order-5 allocation for the DMA pool. This is something that a674e48c5443 ("dma/pool: create dma atomic pool only if dma zone has managed pages") has already tried to achieve but I do not think it went all the way to have it covered completely. In this particular case has_managed_dma() will not work because: [ 0.678539][ T0] Initmem setup node 0 [mem 0x0000000000001000-0x000000027dffffff] [ 0.686316][ T0] On node 0, zone DMA: 1 pages in unavailable ranges [ 0.687093][ T0] On node 0, zone DMA32: 36704 pages in unavailable ranges [ 0.694278][ T0] On node 0, zone Normal: 53252 pages in unavailable ranges [ 0.701257][ T0] On node 0, zone Normal: 8192 pages in unavailable ranges The allocation failure on the DMA zone shouldn't be really critical for the system operation so just silence the warning instead. Signed-off-by: Michal Hocko --- kernel/dma/pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c index 4d40dcce7604..1bf6de398986 100644 --- a/kernel/dma/pool.c +++ b/kernel/dma/pool.c @@ -205,7 +205,7 @@ static int __init dma_atomic_pool_init(void) ret = -ENOMEM; if (has_managed_dma()) { atomic_pool_dma = __dma_atomic_pool_init(atomic_pool_size, - GFP_KERNEL | GFP_DMA); + GFP_KERNEL | GFP_DMA | __GFP_NOWARN); if (!atomic_pool_dma) ret = -ENOMEM; } -- 2.30.2