Skip to contentSkip to conversation

tools-mm-page_owner_sort-add-module-name-sort-cull-filter-support.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 7

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: tools/mm/page_owner_sort: add module name sort/cull/filter support
has been removed from the -mm tree. Its filename was
tools-mm-page_owner_sort-add-module-name-sort-cull-filter-support.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/page_owner_sort: add module name sort/cull/filter support
Date: Wed, 19 Aug 2026 10:16:10 +0800

Page owner stack traces already contain kernel module names in the "[module]" format produced by %pS, but page_owner_sort has no way to sort, cull, or filter by module.

Extract the first module name from each record's stack trace using the regex \[([a-zA-Z0-9_]+)\]. Records whose stack traces contain no module frames are assigned "vmlinux".

New options:

  -M                  Sort by module name
  --sort=mod          Sort by module name (supports +/- prefix)
  --cull=mod          Cull (aggregate) by module name
  --module <modlist>  Filter to records matching the given module(s)

The module field is also printed in cull output when relevant.

Cc David Hildenbrand (Arm) <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Liu Jing <[email protected]>
Cc Yichong Chen <[email protected]>

---

 Documentation/mm/page_owner.rst |    8 +
 tools/mm/page_owner_sort.c      |  122 +++++++++++++++++++++++++-----
 2 files changed, 110 insertions(+), 20 deletions(-)
Documentation/mm/page_owner.rst renamed from Documentation/mm/page_owner.rst~tools-mm-page_owner_sort-add-module-name-sort-cull-filter-support +7 -1
@@ -199,6 +199,7 @@ Usage
 		-p		Sort by pid.
 		-P		Sort by tgid.
 		-n		Sort by task command name.
+		-M		Sort by module name.
 		-r		Sort by memory release time.
 		-s		Sort by stack trace.
 		-t		Sort by times (default).
@@ -240,8 +241,10 @@ Usage
 					group ID numbers appear in <tgidlist>.
 		--name <cmdlist>	Select by task command name. This selects the blocks whose
 					task command name appear in <cmdlist>.
+		--module <modlist>	Select by module name. This selects the blocks whose
+					module name appear in <modlist>.
 
-		<pidlist>, <tgidlist>, <cmdlist> are single arguments in the form of a comma-separated list,
+		<pidlist>, <tgidlist>, <cmdlist>, <modlist> are single arguments in the form of a comma-separated list,
 		which offers a way to specify individual selecting rules.
 
 
@@ -249,6 +252,7 @@ Usage
 				./page_owner_sort <input> <output> --pid=1
 				./page_owner_sort <input> <output> --tgid=1,2,3
 				./page_owner_sort <input> <output> --name name1,name2
+				./page_owner_sort <input> <output> --module xfs,ext4
 
 STANDARD FORMAT SPECIFIERS
 ==========================
@@ -265,6 +269,7 @@ STANDARD FORMAT SPECIFIERS
 	ft		free_ts		timestamp of the page when it was released
 	at		alloc_ts	timestamp of the page when it was allocated
 	ator		allocator	memory allocator for pages
+	mod		module		kernel module name
 
   For --cull option:
 
@@ -275,6 +280,7 @@ STANDARD FORMAT SPECIFIERS
 	f		free		whether the page has been released or not
 	st		stacktrace	stack trace of the page allocation
 	ator		allocator	memory allocator for pages
+	mod		module		kernel module name
 
 Filtering page_owner output
 ============================
tools/mm/page_owner_sort.c renamed from tools/mm/page_owner_sort.c~tools-mm-page_owner_sort-add-module-name-sort-cull-filter-support +103 -19

292 lines not on this page · raw message

_

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

mm-vmalloc-group-xa_init-with-vbq-field-initializations.patch mm-vmalloc-extract-vmap_insert_free_area-helper.patch mm-vmalloc-extract-show_busy_info-from-vmalloc_info_show.patch mm-vmalloc-fix-vmalloc_dump_obj-address-alignment-for-last-page-lookups.patch mm-vmalloc-fix-vmalloc_dump_obj-cross-zone-va-lookup.patch