Loading .mailmap +2 −1 Original line number Diff line number Diff line Loading @@ -446,7 +446,8 @@ Mythri P K <mythripk@ti.com> Nadav Amit <nadav.amit@gmail.com> <namit@vmware.com> Nadav Amit <nadav.amit@gmail.com> <namit@cs.technion.ac.il> Nadia Yvette Chambers <nyc@holomorphy.com> William Lee Irwin III <wli@holomorphy.com> Naoya Horiguchi <naoya.horiguchi@nec.com> <n-horiguchi@ah.jp.nec.com> Naoya Horiguchi <nao.horiguchi@gmail.com> <n-horiguchi@ah.jp.nec.com> Naoya Horiguchi <nao.horiguchi@gmail.com> <naoya.horiguchi@nec.com> Nathan Chancellor <nathan@kernel.org> <natechancellor@gmail.com> Neeraj Upadhyay <quic_neeraju@quicinc.com> <neeraju@codeaurora.org> Neil Armstrong <neil.armstrong@linaro.org> <narmstrong@baylibre.com> Loading Documentation/mm/page_owner.rst +38 −35 Original line number Diff line number Diff line Loading @@ -24,10 +24,10 @@ fragmentation statistics can be obtained through gfp flag information of each page. It is already implemented and activated if page owner is enabled. Other usages are more than welcome. It can also be used to show all the stacks and their outstanding allocations, which gives us a quick overview of where the memory is going without the need to screen through all the pages and match the allocation and free operation. It can also be used to show all the stacks and their current number of allocated base pages, which gives us a quick overview of where the memory is going without the need to screen through all the pages and match the allocation and free operation. page owner is disabled by default. So, if you'd like to use it, you need to add "page_owner=on" to your boot cmdline. If the kernel is built Loading Loading @@ -75,42 +75,45 @@ Usage cat /sys/kernel/debug/page_owner_stacks/show_stacks > stacks.txt cat stacks.txt prep_new_page+0xa9/0x120 get_page_from_freelist+0x7e6/0x2140 __alloc_pages+0x18a/0x370 new_slab+0xc8/0x580 ___slab_alloc+0x1f2/0xaf0 __slab_alloc.isra.86+0x22/0x40 kmem_cache_alloc+0x31b/0x350 __khugepaged_enter+0x39/0x100 dup_mmap+0x1c7/0x5ce copy_process+0x1afe/0x1c90 kernel_clone+0x9a/0x3c0 __do_sys_clone+0x66/0x90 do_syscall_64+0x7f/0x160 entry_SYSCALL_64_after_hwframe+0x6c/0x74 stack_count: 234 post_alloc_hook+0x177/0x1a0 get_page_from_freelist+0xd01/0xd80 __alloc_pages+0x39e/0x7e0 allocate_slab+0xbc/0x3f0 ___slab_alloc+0x528/0x8a0 kmem_cache_alloc+0x224/0x3b0 sk_prot_alloc+0x58/0x1a0 sk_alloc+0x32/0x4f0 inet_create+0x427/0xb50 __sock_create+0x2e4/0x650 inet_ctl_sock_create+0x30/0x180 igmp_net_init+0xc1/0x130 ops_init+0x167/0x410 setup_net+0x304/0xa60 copy_net_ns+0x29b/0x4a0 create_new_namespaces+0x4a1/0x820 nr_base_pages: 16 ... ... echo 7000 > /sys/kernel/debug/page_owner_stacks/count_threshold cat /sys/kernel/debug/page_owner_stacks/show_stacks> stacks_7000.txt cat stacks_7000.txt prep_new_page+0xa9/0x120 get_page_from_freelist+0x7e6/0x2140 __alloc_pages+0x18a/0x370 alloc_pages_mpol+0xdf/0x1e0 folio_alloc+0x14/0x50 filemap_alloc_folio+0xb0/0x100 page_cache_ra_unbounded+0x97/0x180 filemap_fault+0x4b4/0x1200 __do_fault+0x2d/0x110 do_pte_missing+0x4b0/0xa30 __handle_mm_fault+0x7fa/0xb70 handle_mm_fault+0x125/0x300 do_user_addr_fault+0x3c9/0x840 exc_page_fault+0x68/0x150 asm_exc_page_fault+0x22/0x30 stack_count: 8248 post_alloc_hook+0x177/0x1a0 get_page_from_freelist+0xd01/0xd80 __alloc_pages+0x39e/0x7e0 alloc_pages_mpol+0x22e/0x490 folio_alloc+0xd5/0x110 filemap_alloc_folio+0x78/0x230 page_cache_ra_order+0x287/0x6f0 filemap_get_pages+0x517/0x1160 filemap_read+0x304/0x9f0 xfs_file_buffered_read+0xe6/0x1d0 [xfs] xfs_file_read_iter+0x1f0/0x380 [xfs] __kernel_read+0x3b9/0x730 kernel_read_file+0x309/0x4d0 __do_sys_finit_module+0x381/0x730 do_syscall_64+0x8d/0x150 entry_SYSCALL_64_after_hwframe+0x62/0x6a nr_base_pages: 20824 ... cat /sys/kernel/debug/page_owner > page_owner_full.txt Loading MAINTAINERS +1 −1 Original line number Diff line number Diff line Loading @@ -10024,7 +10024,7 @@ F: drivers/media/platform/st/sti/hva HWPOISON MEMORY FAILURE HANDLING M: Miaohe Lin <linmiaohe@huawei.com> R: Naoya Horiguchi <naoya.horiguchi@nec.com> R: Naoya Horiguchi <nao.horiguchi@gmail.com> L: linux-mm@kvack.org S: Maintained F: mm/hwpoison-inject.c Loading fs/nilfs2/dir.c +1 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ nilfs_filetype_table[NILFS_FT_MAX] = { #define S_SHIFT 12 static unsigned char nilfs_type_by_mode[S_IFMT >> S_SHIFT] = { nilfs_type_by_mode[(S_IFMT >> S_SHIFT) + 1] = { [S_IFREG >> S_SHIFT] = NILFS_FT_REG_FILE, [S_IFDIR >> S_SHIFT] = NILFS_FT_DIR, [S_IFCHR >> S_SHIFT] = NILFS_FT_CHRDEV, Loading fs/proc/page.c +2 −5 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, */ ppage = pfn_to_online_page(pfn); if (!ppage || PageSlab(ppage) || page_has_type(ppage)) if (!ppage) pcount = 0; else pcount = page_mapcount(ppage); Loading Loading @@ -124,11 +124,8 @@ u64 stable_page_flags(struct page *page) /* * pseudo flags for the well known (anonymous) memory mapped pages * * Note that page->_mapcount is overloaded in SLAB, so the * simple test in page_mapped() is not enough. */ if (!PageSlab(page) && page_mapped(page)) if (page_mapped(page)) u |= 1 << KPF_MMAP; if (PageAnon(page)) u |= 1 << KPF_ANON; Loading Loading
.mailmap +2 −1 Original line number Diff line number Diff line Loading @@ -446,7 +446,8 @@ Mythri P K <mythripk@ti.com> Nadav Amit <nadav.amit@gmail.com> <namit@vmware.com> Nadav Amit <nadav.amit@gmail.com> <namit@cs.technion.ac.il> Nadia Yvette Chambers <nyc@holomorphy.com> William Lee Irwin III <wli@holomorphy.com> Naoya Horiguchi <naoya.horiguchi@nec.com> <n-horiguchi@ah.jp.nec.com> Naoya Horiguchi <nao.horiguchi@gmail.com> <n-horiguchi@ah.jp.nec.com> Naoya Horiguchi <nao.horiguchi@gmail.com> <naoya.horiguchi@nec.com> Nathan Chancellor <nathan@kernel.org> <natechancellor@gmail.com> Neeraj Upadhyay <quic_neeraju@quicinc.com> <neeraju@codeaurora.org> Neil Armstrong <neil.armstrong@linaro.org> <narmstrong@baylibre.com> Loading
Documentation/mm/page_owner.rst +38 −35 Original line number Diff line number Diff line Loading @@ -24,10 +24,10 @@ fragmentation statistics can be obtained through gfp flag information of each page. It is already implemented and activated if page owner is enabled. Other usages are more than welcome. It can also be used to show all the stacks and their outstanding allocations, which gives us a quick overview of where the memory is going without the need to screen through all the pages and match the allocation and free operation. It can also be used to show all the stacks and their current number of allocated base pages, which gives us a quick overview of where the memory is going without the need to screen through all the pages and match the allocation and free operation. page owner is disabled by default. So, if you'd like to use it, you need to add "page_owner=on" to your boot cmdline. If the kernel is built Loading Loading @@ -75,42 +75,45 @@ Usage cat /sys/kernel/debug/page_owner_stacks/show_stacks > stacks.txt cat stacks.txt prep_new_page+0xa9/0x120 get_page_from_freelist+0x7e6/0x2140 __alloc_pages+0x18a/0x370 new_slab+0xc8/0x580 ___slab_alloc+0x1f2/0xaf0 __slab_alloc.isra.86+0x22/0x40 kmem_cache_alloc+0x31b/0x350 __khugepaged_enter+0x39/0x100 dup_mmap+0x1c7/0x5ce copy_process+0x1afe/0x1c90 kernel_clone+0x9a/0x3c0 __do_sys_clone+0x66/0x90 do_syscall_64+0x7f/0x160 entry_SYSCALL_64_after_hwframe+0x6c/0x74 stack_count: 234 post_alloc_hook+0x177/0x1a0 get_page_from_freelist+0xd01/0xd80 __alloc_pages+0x39e/0x7e0 allocate_slab+0xbc/0x3f0 ___slab_alloc+0x528/0x8a0 kmem_cache_alloc+0x224/0x3b0 sk_prot_alloc+0x58/0x1a0 sk_alloc+0x32/0x4f0 inet_create+0x427/0xb50 __sock_create+0x2e4/0x650 inet_ctl_sock_create+0x30/0x180 igmp_net_init+0xc1/0x130 ops_init+0x167/0x410 setup_net+0x304/0xa60 copy_net_ns+0x29b/0x4a0 create_new_namespaces+0x4a1/0x820 nr_base_pages: 16 ... ... echo 7000 > /sys/kernel/debug/page_owner_stacks/count_threshold cat /sys/kernel/debug/page_owner_stacks/show_stacks> stacks_7000.txt cat stacks_7000.txt prep_new_page+0xa9/0x120 get_page_from_freelist+0x7e6/0x2140 __alloc_pages+0x18a/0x370 alloc_pages_mpol+0xdf/0x1e0 folio_alloc+0x14/0x50 filemap_alloc_folio+0xb0/0x100 page_cache_ra_unbounded+0x97/0x180 filemap_fault+0x4b4/0x1200 __do_fault+0x2d/0x110 do_pte_missing+0x4b0/0xa30 __handle_mm_fault+0x7fa/0xb70 handle_mm_fault+0x125/0x300 do_user_addr_fault+0x3c9/0x840 exc_page_fault+0x68/0x150 asm_exc_page_fault+0x22/0x30 stack_count: 8248 post_alloc_hook+0x177/0x1a0 get_page_from_freelist+0xd01/0xd80 __alloc_pages+0x39e/0x7e0 alloc_pages_mpol+0x22e/0x490 folio_alloc+0xd5/0x110 filemap_alloc_folio+0x78/0x230 page_cache_ra_order+0x287/0x6f0 filemap_get_pages+0x517/0x1160 filemap_read+0x304/0x9f0 xfs_file_buffered_read+0xe6/0x1d0 [xfs] xfs_file_read_iter+0x1f0/0x380 [xfs] __kernel_read+0x3b9/0x730 kernel_read_file+0x309/0x4d0 __do_sys_finit_module+0x381/0x730 do_syscall_64+0x8d/0x150 entry_SYSCALL_64_after_hwframe+0x62/0x6a nr_base_pages: 20824 ... cat /sys/kernel/debug/page_owner > page_owner_full.txt Loading
MAINTAINERS +1 −1 Original line number Diff line number Diff line Loading @@ -10024,7 +10024,7 @@ F: drivers/media/platform/st/sti/hva HWPOISON MEMORY FAILURE HANDLING M: Miaohe Lin <linmiaohe@huawei.com> R: Naoya Horiguchi <naoya.horiguchi@nec.com> R: Naoya Horiguchi <nao.horiguchi@gmail.com> L: linux-mm@kvack.org S: Maintained F: mm/hwpoison-inject.c Loading
fs/nilfs2/dir.c +1 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ nilfs_filetype_table[NILFS_FT_MAX] = { #define S_SHIFT 12 static unsigned char nilfs_type_by_mode[S_IFMT >> S_SHIFT] = { nilfs_type_by_mode[(S_IFMT >> S_SHIFT) + 1] = { [S_IFREG >> S_SHIFT] = NILFS_FT_REG_FILE, [S_IFDIR >> S_SHIFT] = NILFS_FT_DIR, [S_IFCHR >> S_SHIFT] = NILFS_FT_CHRDEV, Loading
fs/proc/page.c +2 −5 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, */ ppage = pfn_to_online_page(pfn); if (!ppage || PageSlab(ppage) || page_has_type(ppage)) if (!ppage) pcount = 0; else pcount = page_mapcount(ppage); Loading Loading @@ -124,11 +124,8 @@ u64 stable_page_flags(struct page *page) /* * pseudo flags for the well known (anonymous) memory mapped pages * * Note that page->_mapcount is overloaded in SLAB, so the * simple test in page_mapped() is not enough. */ if (!PageSlab(page) && page_mapped(page)) if (page_mapped(page)) u |= 1 << KPF_MMAP; if (PageAnon(page)) u |= 1 << KPF_ANON; Loading