From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Weilin Tong <tongweilin@linux.alibaba.com>,
Andrew Morton <akpm@linux-foundation.org>,
Ryan Roberts <ryan.roberts@arm.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] tools/mm/thpmaps: fix missing order-1 file THP statistics
Date: Mon, 2 Nov 2026 13:51:52 +0100 [thread overview]
Message-ID: <f3ac30ce-4f6c-4ad5-a604-d28ac78cdbb8@kernel.org> (raw)
In-Reply-To: <20261027074904.3328878-3-tongweilin@linux.alibaba.com>
On 10/27/26 08:49, Weilin Tong wrote:
> File-backed THPs can have order 1, but the per-size counters are only
> emitted for order 2 and above. Fully and contiguously mapped order-1
> file THPs are therefore missing from the output.
>
> Start emitting the per-size counters at order 1.
>
> Fixes: 2444172cfde4 ("tools/mm: add thpmaps script to dump THP usage info")
> Assisted-by: LLM
> Signed-off-by: Weilin Tong <tongweilin@linux.alibaba.com>
> ---
> tools/mm/thpmaps | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/mm/thpmaps b/tools/mm/thpmaps
> index d92aace005c1..30a8e915d677 100644
> --- a/tools/mm/thpmaps
> +++ b/tools/mm/thpmaps
> @@ -295,7 +295,7 @@ def thp_parse(vma, kpageflags, ranges, indexes, vfns, pfns, anons, heads):
>
> def flatten_sub(type, subtype, stats):
> param = f"{type}-thp-pte-{subtype}-{{}}kB"
> - for od, nr in enumerate(stats[2:], 2):
> + for od, nr in enumerate(stats[1:], 1):
> rstats[param.format(odkb(od))] = {'type': type, 'value': nrkb(nr)}
>
> def flatten_type(type, stats):
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
next prev parent reply other threads:[~2026-11-02 12:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 7:49 [PATCH 0/3] tools/mm/thpmaps: fix THP statistics and mapping names Weilin Tong
2026-10-27 7:49 ` [PATCH 1/3] tools/mm/thpmaps: fix partial THP anon/file accounting Weilin Tong
2026-10-27 7:49 ` [PATCH 2/3] tools/mm/thpmaps: fix missing order-1 file THP statistics Weilin Tong
2026-11-02 12:51 ` David Hildenbrand (Arm) [this message]
2026-10-27 7:49 ` [PATCH 3/3] tools/mm/thpmaps: fix missing mapping names Weilin Tong
2026-11-02 5:16 ` Andrew Morton
2026-11-02 8:54 ` [PATCH] tools/mm/thpmaps: handle carriage returns and non-UTF-8 filenames Weilin Tong
2026-11-02 12:53 ` [PATCH 3/3] tools/mm/thpmaps: fix missing mapping names David Hildenbrand (Arm)
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=f3ac30ce-4f6c-4ad5-a604-d28ac78cdbb8@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryan.roberts@arm.com \
--cc=tongweilin@linux.alibaba.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®