Skip to contentSkip to conversation

tools-mm-add-script-to-display-page-state-for-a-given-pid-and-vaddr.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 10, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: tools/mm: add script to display page state for a given PID and VADDR
has been removed from the -mm tree. Its filename was
tools-mm-add-script-to-display-page-state-for-a-given-pid-and-vaddr.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Ye Liu <[email protected]>
Subject: tools/mm: add script to display page state for a given PID and VADDR
Date: Fri, 30 May 2025 13:58:55 +0800

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
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

---

 MAINTAINERS                |    5 +
 tools/mm/show_page_info.py |  169 +++++++++++++++++++++++++++++++++++
 2 files changed, 174 insertions(+)
MAINTAINERS renamed from MAINTAINERS~tools-mm-add-script-to-display-page-state-for-a-given-pid-and-vaddr +5 -0
@@ -18818,6 +18818,11 @@ F:	Documentation/mm/page_table_check.rst
 F:	include/linux/page_table_check.h
 F:	mm/page_table_check.c
 
+PAGE STATE DEBUG SCRIPT
+M:	Ye Liu <[email protected]>
+S:	Maintained
+F:	tools/mm/show_page_info.py
+
 PANASONIC LAPTOP ACPI EXTRAS DRIVER
 M:	Kenneth Chan <[email protected]>
 L:	[email protected]
tools/mm/show_page_info.py new file +169 -0

169 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are