All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Yosry Ahmed <yosryahmed@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	mm-commits@vger.kernel.org, yang.yang29@zte.com.cn,
	willy@infradead.org, weixugc@google.com,
	wangkefeng.wang@huawei.com, vbabka@suse.cz,
	tomas.mudrunka@gmail.com, surenb@google.com, shakeelb@google.com,
	rppt@kernel.org, rdunlap@infradead.org, rafael@kernel.org,
	pasha.tatashin@soleen.com, muchun.song@linux.dev,
	Liam.Howlett@oracle.com, kirill.shutemov@linux.intel.com,
	ivan@cloudflare.com, gregkh@linuxfoundation.org,
	david@redhat.com, corbet@lwn.net, chenlinxuan@uniontech.com,
	bhelgaas@google.com, adobriyan@gmail.com, souravpanda@google.com
Subject: Re: + mm-report-per-page-metadata-information.patch added to mm-unstable branch
Date: Thu, 8 Feb 2024 07:44:11 +0100	[thread overview]
Message-ID: <20240208064411.GE185687@cmpxchg.org> (raw)
In-Reply-To: <CAJD7tkbdzwjhhgK_-6iAHLn05Q-7wCOzEn9xug1Udr+Df-hLkA@mail.gmail.com>

On Wed, Feb 07, 2024 at 07:27:34PM -0800, Yosry Ahmed wrote:
> > >
> > > Adds two new per-node fields, namely nr_page_metadata and
> > > nr_page_metadata_boot, to /sys/devices/system/node/nodeN/vmstat and a
> > > global PageMetadata field to /proc/meminfo.  This information can be used
> > > by users to see how much memory is being used by per-page metadata, which
> > > can vary depending on build configuration, machine architecture, and
> > > system use.
> >
> > /me wonders what page metadata is.
> >
> > > Per-page metadata is the amount of memory that Linux needs in order to
> > > manage memory at the page granularity.  The majority of such memory is
> > > used by "struct page" and "page_ext" data structures.
> >
> > The term for this in Linux MM is "memmap".
> >
> > That's what's used throughout the code, in Kconfig options, and it
> > shows up in the documentation as well. It's in the names of most files
> > and functions that adjust your new counters. The new name is
> > unnecessary, and frankly it's quite vague and nondescript.
> >
> > Also no reason to keep the stat name intentionally "open ended". As
> > became clear from the side discussions on MemTotal, all proposals to
> > change the semantics of counters later on will be nacked on the basis
> > of established user expectations. So just call it what it is now.
> 
> I am not closely following this series, but I just wanted to point out
> that this is not always true. We are actively extending
> NR_SECONDARY_PAGETABLE to add IOMMU page tables in addition to KVM
> page tables [1]. In that case as well, the name was left open-ended
> exactly for this purpose [2].

I think you're glossing over quite some nuance here.

Sure there might be highly specific scenarios where you can get away
with it. Like with a very recently introduced counter for somewhat
niche audiences, and bucketing/grouping that was IIRC planned from the
start. It's probably not reasonable to advocate nondescript interface
names as a strategy for getting out of ABI commitments.

My point was that "memmap" is the established term for what the author
describes. And that this concept is sufficiently first-class that
mixing it with other things later is unlikely to be acceptable. I
didn't know WHY a new name for this was chosen, so I provided
arguments for two motivations that I could think of, that's all.

  reply	other threads:[~2024-02-08  6:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 23:10 + mm-report-per-page-metadata-information.patch added to mm-unstable branch Andrew Morton
2024-02-08  3:14 ` Johannes Weiner
2024-02-08  3:27   ` Yosry Ahmed
2024-02-08  6:44     ` Johannes Weiner [this message]
2024-02-08 18:08       ` Pasha Tatashin
2024-02-08 23:50         ` Wei Xu
2024-02-09  0:25           ` Johannes Weiner
2024-02-09  1:21             ` Wei Xu
  -- strict thread matches above, loose matches on Subject: below --
2024-06-11 22:30 Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240208064411.GE185687@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --cc=chenlinxuan@uniontech.com \
    --cc=corbet@lwn.net \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ivan@cloudflare.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=pasha.tatashin@soleen.com \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rppt@kernel.org \
    --cc=shakeelb@google.com \
    --cc=souravpanda@google.com \
    --cc=surenb@google.com \
    --cc=tomas.mudrunka@gmail.com \
    --cc=vbabka@suse.cz \
    --cc=wangkefeng.wang@huawei.com \
    --cc=weixugc@google.com \
    --cc=willy@infradead.org \
    --cc=yang.yang29@zte.com.cn \
    --cc=yosryahmed@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.