mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ye Liu <ye.liu@linux.dev>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 Ye Liu <liuye@kylinos.cn>
Subject: [PATCH 0/3] tools/mm: show_page_info.py enhancements and fixes
Date: Wed, 14 Oct 2026 15:04:27 +0800	[thread overview]
Message-ID: <20261014-show_page_info-v1-0-7a68aee0114a@linux.dev> (raw)

This series improves the show_page_info.py drgn script with bug fixes
and new features:

Patch 1 fixes memory cgroup information retrieval by updating the
obj_cgroup type casting and handling slabobj_ext field name changes
for compatibility with newer kernel versions.

Patch 2 removes the incorrect Page Index field display, as pages
don't have indexes - only folios do.

Patch 3 adds VMA flags decoding and VMA name display to provide
more detailed information about the virtual memory area containing
the page.

These changes ensure the script works correctly with current kernel
memory management structures and provides more comprehensive page
state information.

Signed-off-by: Ye Liu <liuye@kylinos.cn>
---
Actual results:

drgn -s /root/linux-next/vmlinux show_page_info.py 1 7f17c9ab5000

PID: 1 Comm: systemd mm: 0xffff8d796ab73800
RAW: 0017ffffc0020028 fffff2af04d3aa88 fffff2af04d3ab08 ffff8d794703b901
RAW: 00000007f17c9ab5 0000000000000000 0000000100000000 ffff8d79438fd700
Page Address:    0xfffff2af04d3aac0
Page Flags:      PG_uptodate|PG_lru|PG_swapbacked|PG_movable_ops|PG_reported
Page Size:       4096
Page PFN:        0x134eab
Page Physical:   0x134eab000
Page Virtual:    0xffff8d7974eab000
Page Refcount:   1
Page Mapcount:   0
Page Memcg Data: 0xffff8d79438fd700
Memcg Name:      init.scope
Memcg Path:      /sys/fs/cgroup/memory/init.scope
Page Mapping:    0xffff8d794703b901
Page Anon/File:  Anon
Page VMA:        0xffff8d796b0c0cc0
VMA Start:       0x7f17c9ab5000
VMA End:         0x7f17c9ab6000
VMA Flags:       0x8100073 (READ|WRITE|MAYREAD|MAYWRITE|MAYEXEC|ACCOUNT|SOFTDIRTY)
VMA Name:        /usr/lib64/libmount.so.1.1.0
This page is not part of a compound page.

---
Ye Liu (3):
      tools/mm: fix memcg info retrieval in show_page_info.py
      tools/mm: remove Page Index field from show_page_info
      tools/mm: add VMA flags decoding and name display to show_page_info.py

 tools/mm/show_page_info.py | 68 ++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 60 insertions(+), 8 deletions(-)
---
base-commit: 1fffefb00cc0b0da1f2ae24e3d33364530ea6515
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261014-show_page_info-12fb720e5592

Best regards,
--  
Ye Liu <ye.liu@linux.dev>


             reply	other threads:[~2026-10-14  7:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  7:04 Ye Liu [this message]
2026-10-14  7:04 ` [PATCH 1/3] tools/mm: fix memcg info retrieval in show_page_info.py Ye Liu
2026-10-14  7:04 ` [PATCH 2/3] tools/mm: remove Page Index field from show_page_info Ye Liu
2026-10-14  7:04 ` [PATCH 3/3] tools/mm: add VMA flags decoding and name display to show_page_info.py 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=20261014-show_page_info-v1-0-7a68aee0114a@linux.dev \
    --to=ye.liu@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuye@kylinos.cn \
    /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®