From: Florian Weimer <fweimer@redhat.com>
To: Ye Liu <ye.liu@linux.dev>
Cc: 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
Subject: Re: [PATCH v3] tools/mm: Add script to display page state for a given PID and VADDR
Date: Wed, 23 Apr 2025 11:45:53 +0200 [thread overview]
Message-ID: <87jz7bky7i.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20250423014850.344501-1-ye.liu@linux.dev> (Ye Liu's message of "Wed, 23 Apr 2025 09:48:50 +0800")
* Ye Liu:
> 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 0x7f43df5acf00
> PID: 1 Comm: systemd mm: 0xffff8881273bbc40
> Raw: 0017ffffc000416c ffffea00043a4508 ffffea0004381e08 ffff88810f086a70
> Raw: 0000000000000000 ffff888120c9b0c0 0000002500000007 ffff88812642c000
> User Virtual Address: 0x7f43df5acf00
> Page Address: 0xffffea00049a0b00
> Page Flags: PG_referenced|PG_uptodate|PG_lru|PG_head|PG_active|
> PG_private|PG_reported
> Page Size: 16384
> Page PFN: 0x12682c
> Page Physical: 0x12682c000
> Page Virtual: 0xffff88812682c000
> Page Refcount: 37
> Page Mapcount: 7
> Page Index: 0x0
> Page Memcg Data: 0xffff88812642c000
> Memcg Name: init.scope
> Memcg Path: /sys/fs/cgroup/memory/init.scope
> Page Mapping: 0xffff88810f086a70
> Page Anon/File: File
> Page VMA: 0xffff88810e4af3b8
> VMA Start: 0x7f43df5ac000
> VMA End: 0x7f43df5b0000
> This page is part of a compound page.
> This page is the head page of a compound page.
> Head Page: 0xffffea00049a0b00
> Compound Order: 2
> Number of Pages: 4
Does this show the page access flags anywhere in the output? If not,
would it be possible to include this information?
Thanks,
Florian
next prev parent reply other threads:[~2025-04-23 9:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 1:48 [PATCH v3] tools/mm: Add script to display page state for a given PID and VADDR Ye Liu
2025-04-23 9:45 ` Florian Weimer [this message]
2025-04-24 2:17 ` Ye Liu
2025-04-23 22:00 ` SeongJae Park
2025-04-24 1:55 ` Ye Liu
2025-04-24 2:51 ` SeongJae Park
2025-04-24 3:24 ` Ye Liu
2025-04-24 3:49 ` SeongJae Park
2025-04-24 3:27 ` Ye Liu
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=87jz7bky7i.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=akpm@linux-foundation.org \
--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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).