From: "zhen.ni" <zhen.ni@easystack.cn>
To: Harry Yoo <harry@kernel.org>,
akpm@linux-foundation.org, vbabka@kernel.org
Cc: surenb@google.com, mhocko@suse.com, jackmanb@google.com,
hannes@cmpxchg.org, ziy@nvidia.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 0/4] mm/page_owner: add per-fd filter infrastructure for print_mode and NUMA filtering
Date: Tue, 19 May 2026 20:15:51 +0800 [thread overview]
Message-ID: <5b3c8707-a37a-4cec-907c-64618c246963@easystack.cn> (raw)
In-Reply-To: <f3ea1493-3447-4510-b33b-4b27c148b657@kernel.org>
在 2026/5/19 09:54, Harry Yoo 写道:
>
>
> On 5/17/26 9:49 PM, Harry Yoo wrote:
>>
>> On 5/15/26 6:19 PM, Zhen Ni wrote:
>>> This patch series introduces per-file-descriptor filtering
>>> capabilities to the
>>> page_owner feature.
>>>
>>>
>>> Problem Statement
>>> =================
>>>
>>> In production environments with large memory configurations (e.g.,
>>> 250GB+),
>>> collecting page_owner information often results in files ranging from
>>> several gigabytes to over 10GB. This creates significant challenges:
>>
>>
>> Just out of curiosity...
>>
>> What are you trying to do with this data on production servers,and why
>> the existing
>>
>> per-NUMA statistics don't work for you?
>
> If what you want to do is dump which code locations allocated how much
> memory for each NUMA node on the event of OOM, you probably want to
> improve memory allocation profiling instead of improving page_owner
> functionality.
>
> IIRC there was discussion [1] on supporting memcg and numa awareness
> and querying using ioctl().
>
> [1] Memory Allocation Profiling upcoming features, LPC 2025,
> https://lpc.events/event/19/contributions/2146
>
I want to identify which call paths allocated the memory on
nearly-exhausted NUMA nodes. Existing per-NUMA statistics (such as
numastat -m) cannot tell me this. For example:
# numastat -m
...
MemTotal 256923.12
MemFree 214873.33
MemUsed 42049.80
Active 9573.74
Inactive 20694.62
Active(anon) 876.71
Inactive(anon) 1161.75
Active(file) 8697.03
...
This is particularly problematic because I found that a significant
portion of NIC pre-allocated ring buffers are not included in any
numastat -m sub-item. This makes kernel-directly-allocated memory
difficult to detect using conventional means.
The most outstanding advantage of page_owner, for me, is its ability to
traverse PFNs and print information for all pages along with their
allocation call stacks. This allows any memory that is difficult to
detect through conventional means to be captured by page_owner.
However, the large volume of data and repeated stack printing make the
output very large and difficult to analyze. This is my original
motivation for introducing the filter.
Memory Allocation Profiling is designed for low-overhead code tagging in
production environments, and its information is relatively aggregated. I
believe that even if it implements NUMA-specific filtering, it is
unlikely to include stackdepot-level information, which is relatively
heavyweight.
Best regards,
Zhen Ni
prev parent reply other threads:[~2026-05-19 12:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 9:19 Zhen Ni
2026-05-15 9:19 ` [PATCH v7 1/4] mm/page_owner: add print_mode filter Zhen Ni
2026-05-15 9:19 ` [PATCH v7 2/4] mm/page_owner: add NUMA node filter Zhen Ni
2026-05-15 9:19 ` [PATCH v7 3/4] tools/mm: add page_owner_filter userspace tool Zhen Ni
2026-05-15 9:19 ` [PATCH v7 4/4] mm/page_owner: document page_owner filter Zhen Ni
2026-05-19 0:14 ` [PATCH v7 0/4] mm/page_owner: add per-fd filter infrastructure for print_mode and NUMA filtering Andrew Morton
[not found] ` <35bc8518-27ee-4c6d-8e62-208b35e62c80@kernel.org>
2026-05-19 1:54 ` Harry Yoo
2026-05-19 12:15 ` zhen.ni [this message]
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=5b3c8707-a37a-4cec-907c-64618c246963@easystack.cn \
--to=zhen.ni@easystack.cn \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=harry@kernel.org \
--cc=jackmanb@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=ziy@nvidia.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
all inboxes | Powered by JetHome®