From: David Rientjes <rientjes@google.com>
To: Sourav Panda <souravpanda@google.com>
Cc: corbet@lwn.net, gregkh@linuxfoundation.org, rafael@kernel.org,
akpm@linux-foundation.org, mike.kravetz@oracle.com,
muchun.song@linux.dev, rppt@kernel.org, david@redhat.com,
rdunlap@infradead.org, chenlinxuan@uniontech.com,
yang.yang29@zte.com.cn, tomas.mudrunka@gmail.com,
bhelgaas@google.com, ivan@cloudflare.com,
pasha.tatashin@soleen.com, yosryahmed@google.com,
hannes@cmpxchg.org, shakeelb@google.com,
kirill.shutemov@linux.intel.com, wangkefeng.wang@huawei.com,
adobriyan@gmail.com, vbabka@suse.cz, Liam.Howlett@oracle.com,
surenb@google.com, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-mm@kvack.org, willy@infradead.org, weixugc@google.com
Subject: Re: [PATCH v12] mm: report per-page metadata information
Date: Sat, 18 May 2024 17:47:16 -0700 (PDT) [thread overview]
Message-ID: <45fb4c94-dd77-94c3-f08f-81bf31e6d6d2@google.com> (raw)
In-Reply-To: <20240512010611.290464-1-souravpanda@google.com>
On Sun, 12 May 2024, Sourav Panda wrote:
> Today, we do not have any observability of per-page metadata
> and how much it takes away from the machine capacity. Thus,
> we want to describe the amount of memory that is going towards
> per-page metadata, which can vary depending on build
> configuration, machine architecture, and system use.
>
> This patch adds 2 fields to /proc/vmstat that can used as shown
> below:
>
> Accounting per-page metadata allocated by boot-allocator:
> /proc/vmstat:nr_memmap_boot * PAGE_SIZE
>
> Accounting per-page metadata allocated by buddy-allocator:
> /proc/vmstat:nr_memmap * PAGE_SIZE
>
> Accounting total Perpage metadata allocated on the machine:
> (/proc/vmstat:nr_memmap_boot +
> /proc/vmstat:nr_memmap) * PAGE_SIZE
>
> Utility for userspace:
>
> Observability: Describe the amount of memory overhead that is
> going to per-page metadata on the system at any given time since
> this overhead is not currently observable.
>
> Debugging: Tracking the changes or absolute value in struct pages
> can help detect anomalies as they can be correlated with other
> metrics in the machine (e.g., memtotal, number of huge pages,
> etc).
>
> page_ext overheads: Some kernel features such as page_owner
> page_table_check that use page_ext can be optionally enabled via
> kernel parameters. Having the total per-page metadata information
> helps users precisely measure impact. Furthermore, page-metadata
> metrics will reflect the amount of struct pages reliquished
> (or overhead reduced) when hugetlbfs pages are reserved which
> will vary depending on whether hugetlb vmemmap optimization is
> enabled or not.
>
> For background and results see:
> lore.kernel.org/all/20240220214558.3377482-1-souravpanda@google.com
>
> Signed-off-by: Sourav Panda <souravpanda@google.com>
> Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Acked-by: David Rientjes <rientjes@google.com>
next prev parent reply other threads:[~2024-05-19 0:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-12 1:06 Sourav Panda
2024-05-19 0:47 ` David Rientjes [this message]
2024-05-24 20:00 ` David Rientjes
2024-05-24 20:36 ` 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=45fb4c94-dd77-94c3-f08f-81bf31e6d6d2@google.com \
--to=rientjes@google.com \
--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=hannes@cmpxchg.org \
--cc=ivan@cloudflare.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox