From: SeongJae Park <sj@kernel.org>
To: Ye Liu <ye.liu@linux.dev>
Cc: SeongJae Park <sj@kernel.org>,
akpm@linux-foundation.org, linux-debuggers@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-toolchains@vger.kernel.org, osandov@osandov.com,
paulmck@kernel.org, sweettea-kernel@dorminy.me, liuye@kylinos.cn,
fweimer@redhat.com, stephen.s.brennan@oracle.com
Subject: Re: [PATCH v5] tools/mm: Add script to display page state for a given PID and VADDR
Date: Fri, 30 May 2025 13:06:21 -0700 [thread overview]
Message-ID: <20250530200621.52327-1-sj@kernel.org> (raw)
In-Reply-To: <20250530055855.687067-1-ye.liu@linux.dev>
On Fri, 30 May 2025 13:58:55 +0800 Ye Liu <ye.liu@linux.dev> wrote:
> From: Ye Liu <liuye@kylinos.cn>
>
> Introduces a new drgn script, `show_page_info.py`, which allows users
> to analyze the state of a page given a process ID (PID) and a virtual
> address (VADDR). This can help kernel developers or debuggers easily
> inspect page-related information in a live kernel or vmcore.
>
> The script extracts information such as the page flags, mapping, and
> other metadata relevant to diagnosing memory issues.
>
> Output example:
> sudo ./show_page_info.py 1 0x7fc988181000
> PID: 1 Comm: systemd mm: 0xffff8d22c4089700
> RAW: 0017ffffc000416c fffff939062ff708 fffff939062ffe08 ffff8d23062a12a8
> RAW: 0000000000000000 ffff8d2323438f60 0000002500000007 ffff8d23203ff500
> Page Address: 0xfffff93905664e00
> Page Flags: PG_referenced|PG_uptodate|PG_lru|PG_head|PG_active|
> PG_private|PG_reported|PG_has_hwpoisoned
> Page Size: 4096
> Page PFN: 0x159938
> Page Physical: 0x159938000
> Page Virtual: 0xffff8d2319938000
> Page Refcount: 37
> Page Mapcount: 7
> Page Index: 0x0
> Page Memcg Data: 0xffff8d23203ff500
> Memcg Name: init.scope
> Memcg Path: /sys/fs/cgroup/memory/init.scope
As reported to the previous version, I show below on my test.
Memcg Name: unknown
Memcg Path: Unexpected error: 'struct kernfs_node' has no member 'parent'
I know you explained it is an issue of drgn version on my setup, as a reply to
my previous report. But, could you please make the output more easy to
understand the problem? No strong opinion, though.
> Page Mapping: 0xffff8d23062a12a8
> Page Anon/File: File
> Page VMA: 0xffff8d22e06e0e40
> VMA Start: 0x7fc988181000
> VMA End: 0x7fc988185000
> This page is part of a compound page.
> This page is the head page of a compound page.
> Head Page: 0xfffff93905664e00
> Compound Order: 2
> Number of Pages: 4
>
> Signed-off-by: Ye Liu <liuye@kylinos.cn>
Tested-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
next prev parent reply other threads:[~2025-05-30 20:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-30 5:58 [PATCH v5] tools/mm: Add script to display page state for a given PID and VADDR Ye Liu
2025-05-30 20:06 ` SeongJae Park [this message]
2025-05-30 22:15 ` Stephen Brennan
2025-05-31 0:45 ` SeongJae Park
2025-05-30 22:01 ` Stephen Brennan
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=20250530200621.52327-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=fweimer@redhat.com \
--cc=linux-debuggers@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-toolchains@vger.kernel.org \
--cc=liuye@kylinos.cn \
--cc=osandov@osandov.com \
--cc=paulmck@kernel.org \
--cc=stephen.s.brennan@oracle.com \
--cc=sweettea-kernel@dorminy.me \
--cc=ye.liu@linux.dev \
/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.