Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/page_owner: update Documentation with 'show_handles' and 'show_stacks_handles'

Describe and provide examples for 'show_handles' and 'show_stacks_handles'.

Link: https://lkml.kernel.org/r/20251001175611.575861-6-mfo@igalia.com
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Mauricio Faria de Oliveira and committed by
Andrew Morton
0de9a442 5513cfbc

+31 -1
+31 -1
Documentation/mm/page_owner.rst
··· 27 27 It can also be used to show all the stacks and their current number of 28 28 allocated base pages, which gives us a quick overview of where the memory 29 29 is going without the need to screen through all the pages and match the 30 - allocation and free operation. 30 + allocation and free operation. It's also possible to show only a numeric 31 + identifier of all the stacks (without stack traces) and their number of 32 + allocated base pages (faster to read and parse, eg, for monitoring) that 33 + can be matched with stacks later (show_handles and show_stacks_handles). 31 34 32 35 page owner is disabled by default. So, if you'd like to use it, you need 33 36 to add "page_owner=on" to your boot cmdline. If the kernel is built ··· 117 114 do_syscall_64+0x8d/0x150 118 115 entry_SYSCALL_64_after_hwframe+0x62/0x6a 119 116 nr_base_pages: 20824 117 + ... 118 + 119 + cat /sys/kernel/debug/page_owner_stacks/show_handles > handles_7000.txt 120 + cat handles_7000.txt 121 + handle: 42 122 + nr_base_pages: 20824 123 + ... 124 + 125 + cat /sys/kernel/debug/page_owner_stacks/show_stacks_handles > stacks_handles.txt 126 + cat stacks_handles.txt 127 + post_alloc_hook+0x177/0x1a0 128 + get_page_from_freelist+0xd01/0xd80 129 + __alloc_pages+0x39e/0x7e0 130 + alloc_pages_mpol+0x22e/0x490 131 + folio_alloc+0xd5/0x110 132 + filemap_alloc_folio+0x78/0x230 133 + page_cache_ra_order+0x287/0x6f0 134 + filemap_get_pages+0x517/0x1160 135 + filemap_read+0x304/0x9f0 136 + xfs_file_buffered_read+0xe6/0x1d0 [xfs] 137 + xfs_file_read_iter+0x1f0/0x380 [xfs] 138 + __kernel_read+0x3b9/0x730 139 + kernel_read_file+0x309/0x4d0 140 + __do_sys_finit_module+0x381/0x730 141 + do_syscall_64+0x8d/0x150 142 + entry_SYSCALL_64_after_hwframe+0x62/0x6a 143 + handle: 42 120 144 ... 121 145 122 146 cat /sys/kernel/debug/page_owner > page_owner_full.txt