From patchwork Mon Dec 19 12:36:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 34532 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2364728wrn; Mon, 19 Dec 2022 04:46:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf6bbcYk8FjUA8DBa86C9hTwTs+cEI/x1HE6K91pUF0e7owCeHLDeyeuPvQxppqmo+TlWXRR X-Received: by 2002:a17:906:2249:b0:7c0:e23d:12c4 with SMTP id 9-20020a170906224900b007c0e23d12c4mr35836536ejr.63.1671453987245; Mon, 19 Dec 2022 04:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671453987; cv=none; d=google.com; s=arc-20160816; b=BRMVG29xWUDMrzFYOMZF6QGoyAZlVPzPkk45f8O6k+DQsIbY84lA10GABDHDuPFUTo DfdKY51mrPn5Ze76pza2Xad6CmtQc6TdzmG7gnJbMOZ1fqmsFI5KjcFUa8c5Y8wbbTY/ Z41l4u8/NZ91ssrlfc37k8LQd+3hXHsxUypaDXPmou+kb/xDxjv3MFi/bOX//iZgpODE k1U+l1/aAN0Y/DPQ/epFyT92xBwaQQF3VRYtweNfaCWa2qoLLFPiL4f93ri7IOuruwa0 pn3ojwBULTwxQ99d4oXRRlysES+23W2Ua2f7yx1xRgz9oxirbM2Yo8D4X0yrJpFrSSoX D2Gw== 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:dkim-signature; bh=g6Me+DBgXsfmWJ38qvhXvaW8D2IHQSt5hD0RyNkeY+E=; b=ifsjR8mkGbTismDnVg+2rBTIKfzhf5XUomK1ZgSwnXvvq4E7w2kcq76T0dLTRdI1ma 81kJv7v6LGdOuz2dCHWjzeCl7Ds9r+YrSheDVpGuU6kOPsdYOHaRn7EtPe7HeRBJ9Dv0 F90EqdXIY5SZQzcnOrIaAmEV1XUO8o+zuMfBBJQAY9wOtL/qQswdR7h1ELGyiJbu5RW6 NRRYwQTRwjiVclRuAkHZZH/qMcgN7jSj8aamOFEfxNjCK7DEu0g5uhmCpV0AlId8aNMt sigAKZVlQxK5EIDtZm6y/WIxEZSj7j2EUdiPNSu9XiT7t0BaI9XRfg3TuPs9ysLTb5eA 1Dmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NAh2XJlS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w13-20020a05640234cd00b0045945eed10asi10269260edc.5.2022.12.19.04.46.04; Mon, 19 Dec 2022 04:46:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NAh2XJlS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231370AbiLSMiA (ORCPT + 99 others); Mon, 19 Dec 2022 07:38:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230226AbiLSMh5 (ORCPT ); Mon, 19 Dec 2022 07:37:57 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEF6BB78 for ; Mon, 19 Dec 2022 04:37:56 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id ay2-20020a05600c1e0200b003d22e3e796dso6323062wmb.0 for ; Mon, 19 Dec 2022 04:37:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=g6Me+DBgXsfmWJ38qvhXvaW8D2IHQSt5hD0RyNkeY+E=; b=NAh2XJlSv77ASCxFYGMJtxLIjwpUTn1YC0CArWVi7rFEVXnd6kNFdZy5ilWTWxa86i WjkLVgey4kBBhYRhwJ7hq79WfifO+tTOWBCcjxZdMRLTzeu4gVpZQY3xFWTvZxPExcLy Gg31Ec9XhEmunxVVD4sYo/nc4/aJFmn5cKc412djPFcnsHS5m2CYgZqGK9JsL7exqqUp CylW3oiyTdlQYKAc1v79ZYICGsSo6Af5efCs8HcFETdvxB59WcLPxz1eKipHcRZXrJls k+IRJFfe+JzBKCKyPToDq0PbNzlJBS/EzdEGgBq4+xvpxjOU7cjikl1EH5h/Ir597TJD NBsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g6Me+DBgXsfmWJ38qvhXvaW8D2IHQSt5hD0RyNkeY+E=; b=hYzaVnmg6vOW12PyAcCJN1ECPIkgIZcPi2zPkofjfbcfPM/af+ChRP1IDSUey7npVV V1a6ifI53WIkoCsDTiEb5ZG3Zab23Ks8rPlfzmBtlyRjv7yhHVU1zSb1mR1TA6kEUpcQ z3kPOW1BSJ4FL9gSHn0dB0cfuOWc/WHR+hwK5ErctTagx4H755ix9BUpv8jQ/KAMSnpq T0YgNbp7qAl8X/5qJdwT9BCMu1jEe+Ewc0GedvkUXjDoprFrMnOaC4WNAybnhEHuuBRs htww0kW5QQNQlNCUfsInVST6aluFc7cK+eEDwcKE7t89rhO0gKKGH3IUAJIvEHqf4y4h HYpg== X-Gm-Message-State: ANoB5pmYEDVTDXIjBeaFxuW6wnt/pd75oMtp2OMH5PoiXoECdShLO4tA feiM8tWEIqV5zoGIemhpp8s= X-Received: by 2002:a7b:c053:0:b0:3cf:7385:677f with SMTP id u19-20020a7bc053000000b003cf7385677fmr32578116wmc.35.1671453475410; Mon, 19 Dec 2022 04:37:55 -0800 (PST) Received: from lucifer.home ([2a00:23c5:dc8c:8701:1663:9a35:5a7b:1d76]) by smtp.googlemail.com with ESMTPSA id j41-20020a05600c1c2900b003b4ff30e566sm36554330wms.3.2022.12.19.04.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 04:37:54 -0800 (PST) From: Lorenzo Stoakes To: linux-mm@kvack.org, Andrew Morton , Uladzislau Rezki , Christoph Hellwig , linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Nicholas Piggin , Baoquan He , Lorenzo Stoakes Subject: [PATCH v2] mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node() Date: Mon, 19 Dec 2022 12:36:59 +0000 Message-Id: <20221219123659.90614-1-lstoakes@gmail.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752417168776388704?= X-GMAIL-MSGID: =?utf-8?q?1752646536180464624?= This function sets __GFP_NOWARN in the gfp_mask rendering the warn_alloc() invocations no-ops. Remove this and instead rely on this flag being set only for the vm_area_alloc_pages() function, ensuring it is cleared for each of the warn_alloc() calls. Signed-off-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.39.0 diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ca71de7c9d77..10fe83c24436 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -3031,7 +3031,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, int ret; array_size = (unsigned long)nr_small_pages * sizeof(struct page *); - gfp_mask |= __GFP_NOWARN; + if (!(gfp_mask & (GFP_DMA | GFP_DMA32))) gfp_mask |= __GFP_HIGHMEM;