From patchwork Thu Aug 5 19:02:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 12421877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4D40C43214 for ; Thu, 5 Aug 2021 19:04:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 574CA61040 for ; Thu, 5 Aug 2021 19:04:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 574CA61040 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=sent.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 5C8D26B0087; Thu, 5 Aug 2021 15:03:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5039C6B0089; Thu, 5 Aug 2021 15:03:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3A2DA6B0088; Thu, 5 Aug 2021 15:03:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id 115156B0085 for ; Thu, 5 Aug 2021 15:03:55 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id BEB76181AF5D7 for ; Thu, 5 Aug 2021 19:03:54 +0000 (UTC) X-FDA: 78441951588.26.6851290 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by imf03.hostedemail.com (Postfix) with ESMTP id 7C7C830025E3 for ; Thu, 5 Aug 2021 19:03:54 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3C87F5C0165; Thu, 5 Aug 2021 15:03:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 05 Aug 2021 15:03:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=from :to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; s=fm1; bh=pTLuD9o+Rmmgy 0pSJ8qC8qZ3Ebj/NqVHsmXPx9g5Fxc=; b=Kp0Np0Hf0NGj5MD7k1hOtXahgTB13 XkazXI1X7daDaaQnyFKuYl2p4JTQsccsGu0BF42Nl0GFFccmD3nUkiSxYDa4ehD7 V9Fu2U/3KrbMx3oJDSBOZYKyogvAUZs1h2c+/KMelXJlnZiwMzrvSS8XieZOz2AV 29ylT0zTceUen8nFsV9HJwcwFaNTOBS5V6YUOJ+Su3dJUPfn+LojBBeG3VUHHyrB OtWaPS9djWWtKZGQc4kpHtq2OVi/mIQ6VJb81fq5aTjNKatRstc0t92zpKJabC+6 F0Fry3laq170IcGcO5wkkva9qJfGSFruj5TWWf615DTUjrIADTWfMlyiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:reply-to:subject :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=pTLuD9o+Rmmgy0pSJ8qC8qZ3Ebj/NqVHsmXPx9g5Fxc=; b=cn0whdGO Exf5LNe8JX9l3+KjfyixQahsDwaAeSwhUpwYKaKjoGWKm9OAflpKpOgF1/yvtKUv m+l5/51VPD9Te0/h6kIlC3Pm03XIwJV28R9rV4bSkFoYCTvHqqrRDVhvhLK85IK7 5i+1/Z+tUCG8ItxBlOtyyYFkU6FoRiK+S2Jk4qJgJmRkBh5gWEKZjODD658AhZo1 DyelFHJs5BGheZGhVxF4Lm2ZtDOebrEp3MGtvKoGW+6LmkZEC9RA9bRN8qbR1zFc d3mP+D48U6OtAA8RbvJqDYw53CfhGPoTTC39g0anAAU1a+gnbtxjAiox7ZWUx/u2 C1+4OSIoPuMGoA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrieelgdduvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfrhgggfestdhqredtredttdenucfhrhhomhepkghiucgj rghnuceoiihirdihrghnsehsvghnthdrtghomheqnecuggftrfgrthhtvghrnhepieejue dvueduuefhgefhheeiuedvtedvuefgieegveetueeiueehtdegudehfeelnecuvehluhhs thgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomhepiihirdihrghnsehsvg hnthdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 Aug 2021 15:03:53 -0400 (EDT) From: Zi Yan To: David Hildenbrand , linux-mm@kvack.org Cc: Matthew Wilcox , Vlastimil Babka , "Kirill A . Shutemov" , Mike Kravetz , Michal Hocko , John Hubbard , linux-kernel@vger.kernel.org, Zi Yan Subject: [RFC PATCH 11/15] mm/page_reporting: report pages at section size instead of MAX_ORDER. Date: Thu, 5 Aug 2021 15:02:49 -0400 Message-Id: <20210805190253.2795604-12-zi.yan@sent.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210805190253.2795604-1-zi.yan@sent.com> References: <20210805190253.2795604-1-zi.yan@sent.com> Reply-To: Zi Yan MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 7C7C830025E3 Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=sent.com header.s=fm1 header.b=Kp0Np0Hf; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=cn0whdGO; dmarc=pass (policy=none) header.from=sent.com; spf=pass (imf03.hostedemail.com: domain of zi.yan@sent.com designates 66.111.4.26 as permitted sender) smtp.mailfrom=zi.yan@sent.com X-Stat-Signature: edxffd3npz7rhneprh7juneow7b51qtg X-HE-Tag: 1628190234-507474 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: Zi Yan page_reporting_order was set to MAX_ORDER, which is always smaller than a memory section size. An upcoming change will make MAX_ORDER larger than a memory section size. Set page_reporting_order to PFN_SECTION_SHIFT to match existing size assumption. Signed-off-by: Zi Yan Cc: David Hildenbrand Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- mm/page_reporting.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/page_reporting.c b/mm/page_reporting.c index 382958eef8a9..dc4a2d699862 100644 --- a/mm/page_reporting.c +++ b/mm/page_reporting.c @@ -11,7 +11,8 @@ #include "page_reporting.h" #include "internal.h" -unsigned int page_reporting_order = MAX_ORDER; +/* Set page_reporting_order at section size */ +unsigned int page_reporting_order = PFN_SECTION_SHIFT; module_param(page_reporting_order, uint, 0644); MODULE_PARM_DESC(page_reporting_order, "Set page reporting order");