Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2760813pxt; Mon, 9 Aug 2021 08:18:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFJLMuJCM0WNz4k3vvM9VaKf5rDF0GVL8L27Wy+5geBMj8h2bERcVQq4O4hsppMcaNm9yv X-Received: by 2002:a17:906:b09:: with SMTP id u9mr8922023ejg.496.1628522284103; Mon, 09 Aug 2021 08:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628522284; cv=none; d=google.com; s=arc-20160816; b=h40T2Zhbi26Rf2BoqTcxc+ZC8h5xzD5Oe5rW4S6zDM6eAq8PaxreJkcg4ssitxFEx1 7BW1sQu2I6i+sh1Gs0IOlRKGaB1bJXPJOwmKARf7vQ6e7dxpOKhjvHmSXUQqP9NjkbS8 1zPmIeZ1gaFTSdheidGg6dCIZAGci8rkWZCRbXRWKmHixvlwaLHsXk0SuJxESe9vn8Qr DfzZZWftdugq6IaUKqRpSTeNustFherwllgW1lrqksclk/xYGRSLa68/AN4VT8HjW+qD L5OZDMPgoBCGBpxKH32x6VSzGMV/n0Na5Lou5doO3hJZKToU0poEBr2Hhdn8NVemH2O3 D/MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kbEqHeQWK/LPgTWzyZ8GR03WKkNPEpinF3U/H1OFgTs=; b=EDoIbs5oYFmrs7NDpS7imIsCdS2huduKgvR7+lGzGlhw0eThy3PgHMldeo/LomIIVD 2KRTUr1rNzbXS/P5/DJ1GZYCTdKKq2Jlip5XU8cOmXy0QjbflCiQtexKqh07qCQvrug/ TI8kgfDvl/+0qZc0zhPve5JF6RTRCj3PjeY7pe+TEN/+9CIpd0IDUUQ4+u/nWxzKrD5C I3Q/hQNV5TV+7ofPjefNB5ZwkIh+ZhBXeCPvE6AkQJeW5Iywh+7KzBk5phGs6vG2yL9e JVDjXdYcdZRRICEVZSbCNpTZmcJ5R2PQFI30rxcbJGnJ8J4ry8VEHYnayUJKzZ+zMACF 114Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RbTqP57S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f13si16671506eds.468.2021.08.09.08.17.29; Mon, 09 Aug 2021 08:18:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RbTqP57S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S234536AbhHIOMi (ORCPT + 99 others); Mon, 9 Aug 2021 10:12:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233274AbhHIOMh (ORCPT ); Mon, 9 Aug 2021 10:12:37 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08AD5C0613D3 for ; Mon, 9 Aug 2021 07:12:17 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id b15so5100517ejg.10 for ; Mon, 09 Aug 2021 07:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kbEqHeQWK/LPgTWzyZ8GR03WKkNPEpinF3U/H1OFgTs=; b=RbTqP57SNdmg5Ko5v7a25j0pgLWHyoDmSCsQjeMU2i49vbQMJICtocflgalQRqHRs0 lEvT48OXxeQ9ibQ6Gjv5vyej3Lv2FwAFXNj/7NRodGJzAz5ghStneYJDUfhYbMebVhSd L8ZD3o1nWWP0s14+kHaSf/JgElr9+lFf1CIXhBm/LhLlD8BfhKpcWZHTe0FXSGCiXFN8 XVBdzBoC8xkXoN+62PZCEQxFEtC15pyzcd2fumav9m4LDOlEYY+8skzWQRhFHy9fllUY IU4UjiqZGp6jco3OXDD1OhNDhD2AixumFyyGaj4jodo+k5pRnntsFFTBXWZNfmHo3fMI 5FeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kbEqHeQWK/LPgTWzyZ8GR03WKkNPEpinF3U/H1OFgTs=; b=cr5JECpbxBcIm2pZ1/Xj03ZjVXDn9Dx6oCxNJ9NjwnCm3oK6fiYlcFmuy6JsBNthkH 0hBvAkkWnxJIm2MXEm8O57s3v068zO3eZJRj2LcTgTYwE/+FU2RZi4Am5nmARmGVm8VN H9blh55l52fjLon0ozGWQuw5/cRucGYw0rXHyrjzGPdpgls/dQWbw2QaJxsCEBFkVsfh C4vJmfR02jhYMU1BzdPALcQGfhVyGi2yd1JEZlfzNA22G3Hyf6xPYbkayznjobkEyQMC COOlnHzo1kP73M0+0dmetAKof6xMZ+LjLKDVAHotgcS/rOu6BE4P2ZESBFrmsWbaxa44 ztMg== X-Gm-Message-State: AOAM530gpXGuu14FYytMHa7avtR1cYqjmsUEXslXNJfO/XzGMO37b4j1 SA/gWS/A2/rLpVRU1r4Vaxe55UPjYO7IsFI8z8k= X-Received: by 2002:a17:906:d0d5:: with SMTP id bq21mr3824098ejb.470.1628518335552; Mon, 09 Aug 2021 07:12:15 -0700 (PDT) MIME-Version: 1.0 References: <20210805190253.2795604-1-zi.yan@sent.com> <20210805190253.2795604-12-zi.yan@sent.com> In-Reply-To: From: Alexander Duyck Date: Mon, 9 Aug 2021 07:12:04 -0700 Message-ID: Subject: Re: [RFC PATCH 11/15] mm/page_reporting: report pages at section size instead of MAX_ORDER. To: David Hildenbrand Cc: Zi Yan , linux-mm , Matthew Wilcox , Vlastimil Babka , "Kirill A . Shutemov" , Mike Kravetz , Michal Hocko , John Hubbard , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 9, 2021 at 12:25 AM David Hildenbrand wrote: > > 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 ? Yeah, it is pretty much there for debugging in the event that we are on an architecture that is misconfigured.