From mboxrd@z Thu Jan 1 00:00:00 1970 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=-18.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 05293C4338F for ; Mon, 9 Aug 2021 07:25:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7AC4F60F4B for ; Mon, 9 Aug 2021 07:25:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7AC4F60F4B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D558F8D0005; Mon, 9 Aug 2021 03:25:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D05A68D0003; Mon, 9 Aug 2021 03:25:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BCDD48D0005; Mon, 9 Aug 2021 03:25:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0177.hostedemail.com [216.40.44.177]) by kanga.kvack.org (Postfix) with ESMTP id A03398D0003 for ; Mon, 9 Aug 2021 03:25:33 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5510C8249980 for ; Mon, 9 Aug 2021 07:25:33 +0000 (UTC) X-FDA: 78454706946.01.C78D5A1 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 86A04300CA86 for ; Mon, 9 Aug 2021 07:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628493931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JNaWugcsqwEhxVIGKp2CI/wz2iOjAFTuqVT1m8pDKbo=; b=VyoyL3Gwq08QfDiUIrvE7UYwvIrnl+/b9mUsYeDxulnVO3m2hUISguLC4lVz+AoBRrM/OP bU39KrOF2TUWtELZoKHvAPKxv7cWs4hjeRIo5WSP2QpYNXt9Wx5KRN6P++PbQZqPLZqed3 rlOJXzDBR4SOXXHV6LB3XIEDE65V68E= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-543-O8A94wusOoSQbvPDL8R72A-1; Mon, 09 Aug 2021 03:25:28 -0400 X-MC-Unique: O8A94wusOoSQbvPDL8R72A-1 Received: by mail-wm1-f69.google.com with SMTP id f6-20020a05600c1546b029025af999e04dso3745917wmg.7 for ; Mon, 09 Aug 2021 00:25:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=JNaWugcsqwEhxVIGKp2CI/wz2iOjAFTuqVT1m8pDKbo=; b=jVpt84JdPj6rx9k/omFJOFzl2UtGCXpxXnEBTjt34gZ/vWYPRTBhpv9m6OBDENMCWD RT3YkwM8AmnT+O2Jb25AqUrf7o1t7xzoF4CKPO126tt71U+Wyd8QKJRBlAKXe1/oW2tD 3LurLLQLdJBRvPrv4Xt1FFv512aF+gqXl0WoOI4QsP4KMr5bI2K4S4mRW4J/3H6yagIU pAZMEDL/iQoquOERwvTAzQyHIA6PfKlrRsn7ncotkr6Psy5ZqGwS0q6vZhJSongJnyms s472JnQkF7tGgsLwRw6la8XH/4HrfTfi++YfgGLYSvSmIFvtIevMcDieHqCPGlPrWNzu pGsw== X-Gm-Message-State: AOAM532WXF19okFg1L1rWEdTGCGU1X+n2Gr4Rblad43q19QmICD9IaFB WPHuXrkHvnoerRGSDLmp4HYidgaAABL9qPi1p66ZFUk1LwsKoGAVUseybzLf/nalsly3K6FWuGe ZtlRnxlp8aPY= X-Received: by 2002:a1c:2547:: with SMTP id l68mr5833013wml.23.1628493927359; Mon, 09 Aug 2021 00:25:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsNDeS2Y+pJvAumXMRLknJnzonRHwbbWrYqQynr09Sy5T089ASO/i2XYYeqmf3R64rIt02mQ== X-Received: by 2002:a1c:2547:: with SMTP id l68mr5832998wml.23.1628493927224; Mon, 09 Aug 2021 00:25:27 -0700 (PDT) Received: from ?IPv6:2003:d8:2f0a:7f00:fad7:3bc9:69d:31f? (p200300d82f0a7f00fad73bc9069d031f.dip0.t-ipconnect.de. [2003:d8:2f0a:7f00:fad7:3bc9:69d:31f]) by smtp.gmail.com with ESMTPSA id 9sm16720849wmf.34.2021.08.09.00.25.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Aug 2021 00:25:26 -0700 (PDT) Subject: Re: [RFC PATCH 11/15] mm/page_reporting: report pages at section size instead of MAX_ORDER. To: Zi Yan , linux-mm@kvack.org, Alexander Duyck Cc: Matthew Wilcox , Vlastimil Babka , "Kirill A . Shutemov" , Mike Kravetz , Michal Hocko , John Hubbard , linux-kernel@vger.kernel.org References: <20210805190253.2795604-1-zi.yan@sent.com> <20210805190253.2795604-12-zi.yan@sent.com> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Mon, 9 Aug 2021 09:25:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210805190253.2795604-12-zi.yan@sent.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VyoyL3Gw; spf=none (imf03.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 86A04300CA86 X-Stat-Signature: bwcruqceteqsxfzyocfca3gnp5cdq5f6 X-HE-Tag: 1628493932-895015 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: On 05.08.21 21:02, Zi Yan wrote: > 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"); > > If you look closely, this is only a placeholder and will get overwritten in page_reporting_register(). I don't recall why we have the module parameter at all. Most probably, to adjust the reporting order after we already registered a user. Can't we just initialize that to 0 ? -- Thanks, David / dhildenb