From patchwork Fri Mar 25 12:25:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 12791558 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EFA3C433F5 for ; Fri, 25 Mar 2022 12:26:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A81946B0071; Fri, 25 Mar 2022 08:26:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A2F4F6B0073; Fri, 25 Mar 2022 08:26:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F6F56B0074; Fri, 25 Mar 2022 08:26:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id 808836B0071 for ; Fri, 25 Mar 2022 08:26:07 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 379751825673E for ; Fri, 25 Mar 2022 12:26:07 +0000 (UTC) X-FDA: 79282830774.27.75B09F1 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by imf06.hostedemail.com (Postfix) with ESMTP id C5838180019 for ; Fri, 25 Mar 2022 12:26:06 +0000 (UTC) Received: by mail-wm1-f42.google.com with SMTP id h16so4372369wmd.0 for ; Fri, 25 Mar 2022 05:26:06 -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=kRtiPZWUfXgB+Y2Mc75a0d9tr9Jo2lLb7JjBX1l2jP8A9dxxQRIH68/761YjXWHJa3 BqhJ8YD9liFZJeWDY+zNK+03hUGrtzXeKyBuF1Jb1HBnEN1QER3mQfH/GVZMYvzDSCLh ZaZRQKXJbOIkZTczfWyJgFz17HMO5K6g4N6FH+ZB5QRQYwz0FEWVuK3bVEQ1AN0NKpDr BjyKWxespxKtcNzMO7kqqWkd0FhOsqMb6yOShKAkcrdJR2uH64/+rqVBru5SfrtBw/pR TtcIZxvdkWu/ZHwRFF61XSpof3o1mxRKfnbPWfP8jbdkV3yNOWO5ZJF8O2mdYHJ4lfa6 a8mA== X-Gm-Message-State: AOAM532NxJLxN9/CwxudNDsBpl7EnDoTIF5mQed82LAVSZdT7opatQ7J vTL3Pobi2uWiJ1f2j5TJfdk= X-Google-Smtp-Source: ABdhPJzgSrNJcQ+W0QQNOfhrYb/yJ43f8QLDA4VwiZaTLDCilx0z7IlKEDuAoEHkt0ihv3hde2bFYQ== 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 X-Stat-Signature: zt9acq81na3bj3jqyemreuew6dyek9h4 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: C5838180019 Authentication-Results: imf06.hostedemail.com; dkim=none; spf=pass (imf06.hostedemail.com: domain of mstsxfx@gmail.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none) X-Rspam-User: X-HE-Tag: 1648211166-761768 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Signed-off-by: Baoquan He Signed-off-by: Michal Hocko Reviewed-by: Baoquan He --- 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; }