From patchwork Thu Jan 5 08:25:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13089530 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 96A9FC3DA7D for ; Thu, 5 Jan 2023 08:25:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 15A738E0002; Thu, 5 Jan 2023 03:25:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 109308E0001; Thu, 5 Jan 2023 03:25:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F38CC8E0002; Thu, 5 Jan 2023 03:25:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E4B968E0001 for ; Thu, 5 Jan 2023 03:25:18 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BAAF11A0387 for ; Thu, 5 Jan 2023 08:25:18 +0000 (UTC) X-FDA: 80320060716.08.0C67B6E Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf28.hostedemail.com (Postfix) with ESMTP id D137BC000A for ; Thu, 5 Jan 2023 08:25:16 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf28.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672907117; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=nkm3HTGrrjdGvrdleKy0Xx42kvAzGUKTQ5Cu4Uq5Oyo=; b=P+duIyWlkg5RfISnpvAvFAQFZtZZxM4XW17E1WkSWAqtPa9/q9TERL8BODr8/9XNpwtDwj dopXgbEuNGNziDBfpBLT3pNRRRL/Bh6hvcZD21q4bB9l59C3uuzTeCAtfquSz167rHKsYx aqFIk2j9kMfuiHJaSn3mBleuBCylCvw= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf28.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672907117; a=rsa-sha256; cv=none; b=xAbYugM4kUQ4eU6t9Ue0oIGWlYEx9NDM5flaCfxSNNSKQ+5Skw12SMpO/asxgpDEzmKpNG oX5NYNr9f0k8Fe/NPQWdK0d+pkiZWSL+XDMdtl20D4SflQ4f4eNTursp1CRp2aVnTkl3W4 /NPAXEJEXWKgrczY2gY30edQ7PPW+4U= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 747A31063; Thu, 5 Jan 2023 00:25:57 -0800 (PST) Received: from a077893.blr.arm.com (unknown [10.162.43.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AFD873F71A; Thu, 5 Jan 2023 00:25:13 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: rppt@kernel.org, mgorman@suse.de, Anshuman Khandual , linux-kernel@vger.kernel.org Subject: [PATCH] mm/page_alloc: Repalce with deferred_pages_enabled() wherever applicable Date: Thu, 5 Jan 2023 13:55:06 +0530 Message-Id: <20230105082506.241529-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: D137BC000A X-Stat-Signature: jd74dfxckepbdw11kd1bb751tbf6af8i X-Rspam-User: X-HE-Tag: 1672907116-390080 X-HE-Meta: U2FsdGVkX1/nn40ujyxMQs5gLna16EsKB/oEtTDl4nw6fOEXolty9saP28R5Gxhf9pyTIZUIv/YSxpe/JPfXJx9ezswF9rGJJeTmoPWK+wDF0XyqOWhueDPDzxq0edNz0jdnIUCAoO6vjVtNDXNciy9RRv02IZ8/+OA+XpDreqX68+fqOCyr3EXsD+srBhkzj5V/q4h0IzvGAJKb6aLHNrW89oAiQ21o/8Tpd0fkcHeA69JkJ61SBhXFqI18kpd6kZwqMVnem9wvqYMfelrcso2KCPwWIXcG5+RvrdumIUeYuGpJ2Y3MbYWl/6YYiJc8+hc5grcmkFsHVyp4WAOnxs0f1+OUoLqsOBQ6IM6KrG31cLqYkW3cntRg5OiYNVni2BbHOWamR/m3H2EZa06zZE0JAsCfXCcfzF3nedrPUfvNQEbY7mlAFGqKpFq+WBAzawAZirWjq0rvQn6vvtQz/kxQu8b5n50xeuMVUU86NK+3HLsaqL1iq5pBS3LeZjsa2W7dcBIyAJtlO+ikSuRMT1o43E9mDb7Y6QJSxfLXe1TFAFIH229BnN3jUCB25EQxa5/0gNwKh6x9rC4GLA+1W1ZTh4XR9koPJ4QFubAvY9qhAgdPmO1ewWnqApfFDXalEuv94znIUEfv9jvoFv19VRmWIW7fXiiLPwus2cs5bCR3Qj/XLQsHJCzO/jBUrUXc4PSg9WdtxcUNvk9CBb/WfKLNHyO4tGFioh5dvhk/yRM64UmTey3B0WtPH2lIvZ8vrhtpGIUoaJYADBF7T6uU8sPZVgm5V46ddirqx8t/Joe2U4+TIUmDXRYsoDrnpD0EZh/pfeKIXKFeZyfdcVj2c1MZRD5uUHh5YP9VsjgREmUwlgBtoMu0aTsBjXKOz7lLO2eqJOm5xa9cDmAycJzMLTd81LfGmDHk 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: Instead of directly accessing static deferred_pages, replace such instances with the helper deferred_pages_enabled(). No functional change is intended. Cc; Andrew Morton Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Reviewed-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Acked-by: Mel Gorman --- This applies on v6.2-rc2. mm/page_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 0745aedebb37..232d0323047b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4244,7 +4244,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, * Watermark failed for this zone, but see if we can * grow this zone if it contains deferred pages. */ - if (static_branch_unlikely(&deferred_pages)) { + if (deferred_pages_enabled()) { if (_deferred_grow_zone(zone, order)) goto try_this_zone; } @@ -4293,7 +4293,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, } else { #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT /* Try again if zone has deferred pages */ - if (static_branch_unlikely(&deferred_pages)) { + if (deferred_pages_enabled()) { if (_deferred_grow_zone(zone, order)) goto try_this_zone; }