On Wed, Feb 07, 2024 at 03:10:13PM -0800, Andrew Morton wrote: > > The patch titled > Subject: mm: report per-page metadata information > has been added to the -mm mm-unstable branch. Its filename is > mm-report-per-page-metadata-information.patch > > This patch will shortly appear at > https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-report-per-page-metadata-information.patch > > This patch will later appear in the mm-unstable branch at > git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm > > Before you just go and hit "reply", please: > a) Consider who else should be cc'ed > b) Prefer to cc a suitable mailing list as well > c) Ideally: find the original patch on the mailing list and do a > reply-to-all to that, adding suitable additional cc's > > *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** > > The -mm tree is included into linux-next via the mm-everything > branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm > and is updated there every 2-3 working days > > ------------------------------------------------------ > From: Sourav Panda <souravpanda@xxxxxxxxxx> > Subject: mm: report per-page metadata information > Date: Mon, 29 Jan 2024 14:42:04 -0800 > > 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. This should be NR_MEMMAP, nr_memmap, MemMap etc.