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.

docs/zh_CN: update the translation of mm/page_owner.rst

Update to commit f5c12105c15f ("mm,page_owner: fix refcount imbalance")

Documentation/translations/zh_CN/mm/page_owner.rst
commit f5c12105c15f ("mm,page_owner: fix refcount imbalance")
commit ba6fe5377244 ("mm,page_owner: update Documentation regarding
page_owner_stacks")
2 commits needs resolving in total

Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: Alex Shi <alexs@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <38a9d8868e0f98dc5d2a08fb865313cc4db943a3.1729327831.git.dzm91@hust.edu.cn>

authored by

Dongliang Mu and committed by
Jonathan Corbet
20e845db 9d197b62

+46
+46
Documentation/translations/zh_CN/mm/page_owner.rst
··· 26 26 页面所有者也可以用于各种目的。例如,可以通过每个页面的gfp标志信息获得精确的碎片 27 27 统计。如果启用了page owner,它就已经实现并激活了。我们非常欢迎其他用途。 28 28 29 + 它也可以用来显示所有的栈以及它们当前分配的基础页面数,这让我们能够快速了解内存的 30 + 使用情况,而无需浏览所有页面并匹配分配和释放操作。 31 + 29 32 page owner在默认情况下是禁用的。所以,如果你想使用它,你需要在你的启动cmdline 30 33 中加入"page_owner=on"。如果内核是用page owner构建的,并且由于没有启用启动 31 34 选项而在运行时禁用page owner,那么运行时的开销是很小的。如果在运行时禁用,它不 ··· 62 59 3) 做你想调试的工作。 63 60 64 61 4) 分析来自页面所有者的信息:: 62 + 63 + cat /sys/kernel/debug/page_owner_stacks/show_stacks > stacks.txt 64 + cat stacks.txt 65 + post_alloc_hook+0x177/0x1a0 66 + get_page_from_freelist+0xd01/0xd80 67 + __alloc_pages+0x39e/0x7e0 68 + allocate_slab+0xbc/0x3f0 69 + ___slab_alloc+0x528/0x8a0 70 + kmem_cache_alloc+0x224/0x3b0 71 + sk_prot_alloc+0x58/0x1a0 72 + sk_alloc+0x32/0x4f0 73 + inet_create+0x427/0xb50 74 + __sock_create+0x2e4/0x650 75 + inet_ctl_sock_create+0x30/0x180 76 + igmp_net_init+0xc1/0x130 77 + ops_init+0x167/0x410 78 + setup_net+0x304/0xa60 79 + copy_net_ns+0x29b/0x4a0 80 + create_new_namespaces+0x4a1/0x820 81 + nr_base_pages: 16 82 + ... 83 + ... 84 + echo 7000 > /sys/kernel/debug/page_owner_stacks/count_threshold 85 + cat /sys/kernel/debug/page_owner_stacks/show_stacks> stacks_7000.txt 86 + cat stacks_7000.txt 87 + post_alloc_hook+0x177/0x1a0 88 + get_page_from_freelist+0xd01/0xd80 89 + __alloc_pages+0x39e/0x7e0 90 + alloc_pages_mpol+0x22e/0x490 91 + folio_alloc+0xd5/0x110 92 + filemap_alloc_folio+0x78/0x230 93 + page_cache_ra_order+0x287/0x6f0 94 + filemap_get_pages+0x517/0x1160 95 + filemap_read+0x304/0x9f0 96 + xfs_file_buffered_read+0xe6/0x1d0 [xfs] 97 + xfs_file_read_iter+0x1f0/0x380 [xfs] 98 + __kernel_read+0x3b9/0x730 99 + kernel_read_file+0x309/0x4d0 100 + __do_sys_finit_module+0x381/0x730 101 + do_syscall_64+0x8d/0x150 102 + entry_SYSCALL_64_after_hwframe+0x62/0x6a 103 + nr_base_pages: 20824 104 + ... 65 105 66 106 cat /sys/kernel/debug/page_owner > page_owner_full.txt 67 107 ./page_owner_sort page_owner_full.txt sorted_page_owner.txt