* [to-be-updated] mm-page_owner-add-print_mode-filter.patch removed from -mm tree
@ 2026-04-28 14:09 Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2026-04-28 14:09 UTC (permalink / raw)
To: mm-commits, zhen.ni, akpm
The quilt patch titled
Subject: mm/page_owner: add print_mode filter
has been removed from the -mm tree. Its filename was
mm-page_owner-add-print_mode-filter.patch
This patch was dropped because an updated version will be issued
------------------------------------------------------
From: Zhen Ni <zhen.ni@easystack.cn>
Subject: mm/page_owner: add print_mode filter
Date: Sun, 19 Apr 2026 23:55:39 +0800
Add print_mode functionality to reduce page_owner output size by printing
only the stack handle instead of the full stack trace.
Example output with print_mode enabled:
Page allocated via order 0, mask 0x42800(GFP_NOWAIT|__GFP_COMP),
pid 1, tgid 1 (systemd), ts 349667370 ns
PFN 0xa00a2 type Unmovable Block 1280 type Unmovable
Flags 0x33fffe0000004124(referenced|lru|active|private|node=3|zone=0|
lastcpupid=0x1ffff)
handle: 17432583
Charged to memcg /
Print mode significantly reduces output size while preserving all other
page allocation information. The correspondence between handles and stack
traces can be obtained through the show_stacks_handles interface.
Link: https://lore.kernel.org/linux-mm/20260417154638.22370-3-zhen.ni@easystack.cn/
Link: https://lore.kernel.org/20260419155540.376847-3-zhen.ni@easystack.cn
Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
Suggested-by: Zi Yan <ziy@nvidia.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/page_owner.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
--- a/mm/page_owner.c~mm-page_owner-add-print_mode-filter
+++ a/mm/page_owner.c
@@ -590,7 +590,13 @@ print_page_owner(char __user *buf, size_
migratetype_names[pageblock_mt],
&page->flags);
- ret += stack_depot_snprint(handle, kbuf + ret, count - ret, 0);
+ /* Print mode: full stack or stack handle */
+ if (READ_ONCE(owner_filter.print_mode) == PAGE_OWNER_PRINT_STACK_HANDLE) {
+ ret += scnprintf(kbuf + ret, count - ret,
+ "handle: %d\n", handle);
+ } else {
+ ret += stack_depot_snprint(handle, kbuf + ret, count - ret, 0);
+ }
if (ret >= count)
goto err;
@@ -985,6 +991,24 @@ static int page_owner_threshold_set(void
DEFINE_SIMPLE_ATTRIBUTE(page_owner_threshold_fops, &page_owner_threshold_get,
&page_owner_threshold_set, "%llu");
+static int page_owner_print_mode_get(void *data, u64 *val)
+{
+ *val = READ_ONCE(owner_filter.print_mode);
+ return 0;
+}
+
+static int page_owner_print_mode_set(void *data, u64 val)
+{
+ if (val > PAGE_OWNER_PRINT_STACK_HANDLE)
+ return -EINVAL;
+ WRITE_ONCE(owner_filter.print_mode, val);
+ return 0;
+}
+
+DEFINE_SIMPLE_ATTRIBUTE(page_owner_print_mode_fops,
+ &page_owner_print_mode_get,
+ &page_owner_print_mode_set, "%lld");
+
static int __init pageowner_init(void)
{
@@ -998,6 +1022,8 @@ static int __init pageowner_init(void)
debugfs_create_file("page_owner", 0400, NULL, NULL, &page_owner_fops);
filter_dir = debugfs_create_dir("page_owner_filter", NULL);
+ debugfs_create_file("print_mode", 0600, filter_dir, NULL,
+ &page_owner_print_mode_fops);
dir = debugfs_create_dir("page_owner_stacks", NULL);
debugfs_create_file("show_stacks", 0400, dir,
_
Patches currently in -mm which might be from zhen.ni@easystack.cn are
mm-page_owner-add-numa-node-filter-with-nodelist-support.patch
mm-page_owner-fix-%pgp-format-specifier-argument-type.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* [to-be-updated] mm-page_owner-add-print_mode-filter.patch removed from -mm tree
@ 2026-04-29 12:11 Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2026-04-29 12:11 UTC (permalink / raw)
To: mm-commits, zhen.ni, akpm
The quilt patch titled
Subject: mm/page_owner: add print_mode filter
has been removed from the -mm tree. Its filename was
mm-page_owner-add-print_mode-filter.patch
This patch was dropped because an updated version will be issued
------------------------------------------------------
From: Zhen Ni <zhen.ni@easystack.cn>
Subject: mm/page_owner: add print_mode filter
Date: Tue, 28 Apr 2026 15:11:10 +0800
Add print_mode functionality to reduce page_owner output size by printing
only the stack handle instead of the full stack trace.
Example output with print_mode enabled:
Page allocated via order 0, mask 0x42800(GFP_NOWAIT|__GFP_COMP),
pid 1, tgid 1 (systemd), ts 349667370 ns
PFN 0xa00a2 type Unmovable Block 1280 type Unmovable
Flags 0x33fffe0000004124(referenced|lru|active|private|node=3|zone=0|
lastcpupid=0x1ffff)
handle: 17432583
Charged to memcg /
Print mode significantly reduces output size while preserving all other
page allocation information. The correspondence between handles and stack
traces can be obtained through the show_stacks_handles interface.
Link: https://lore.kernel.org/linux-mm/20260417154638.22370-3-zhen.ni@easystack.cn/
Link: https://lore.kernel.org/20260428071112.1420380-3-zhen.ni@easystack.cn
Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
Suggested-by: Zi Yan <ziy@nvidia.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/page_owner.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
--- a/mm/page_owner.c~mm-page_owner-add-print_mode-filter
+++ a/mm/page_owner.c
@@ -590,7 +590,13 @@ print_page_owner(char __user *buf, size_
migratetype_names[pageblock_mt],
&page->flags);
- ret += stack_depot_snprint(handle, kbuf + ret, count - ret, 0);
+ /* Print mode: full stack or stack handle */
+ if (READ_ONCE(owner_filter.print_mode) == PAGE_OWNER_PRINT_STACK_HANDLE) {
+ ret += scnprintf(kbuf + ret, count - ret,
+ "handle: %d\n", handle);
+ } else {
+ ret += stack_depot_snprint(handle, kbuf + ret, count - ret, 0);
+ }
if (ret >= count)
goto err;
@@ -985,6 +991,24 @@ static int page_owner_threshold_set(void
DEFINE_SIMPLE_ATTRIBUTE(page_owner_threshold_fops, &page_owner_threshold_get,
&page_owner_threshold_set, "%llu");
+static int page_owner_print_mode_get(void *data, u64 *val)
+{
+ *val = READ_ONCE(owner_filter.print_mode);
+ return 0;
+}
+
+static int page_owner_print_mode_set(void *data, u64 val)
+{
+ if (val > PAGE_OWNER_PRINT_STACK_HANDLE)
+ return -EINVAL;
+ WRITE_ONCE(owner_filter.print_mode, val);
+ return 0;
+}
+
+DEFINE_SIMPLE_ATTRIBUTE(page_owner_print_mode_fops,
+ &page_owner_print_mode_get,
+ &page_owner_print_mode_set, "%lld");
+
static int __init pageowner_init(void)
{
@@ -998,6 +1022,8 @@ static int __init pageowner_init(void)
debugfs_create_file("page_owner", 0400, NULL, NULL, &page_owner_fops);
filter_dir = debugfs_create_dir("page_owner_filter", NULL);
+ debugfs_create_file("print_mode", 0600, filter_dir, NULL,
+ &page_owner_print_mode_fops);
dir = debugfs_create_dir("page_owner_stacks", NULL);
debugfs_create_file("show_stacks", 0400, dir,
_
Patches currently in -mm which might be from zhen.ni@easystack.cn are
mm-page_owner-add-numa-node-filter-with-nodelist-support.patch
mm-page_owner-fix-%pgp-format-specifier-argument-type.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-29 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 14:09 [to-be-updated] mm-page_owner-add-print_mode-filter.patch removed from -mm tree Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2026-04-29 12:11 Andrew Morton
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.