Collect the time for each allocation recorded in page owner so that
allocation "surges" can be measured.
Record the pid for each allocation recorded in page owner so that the
source of allocation "surges" can be better identified.
The above is very useful when doing memory analysis. On a crash for
example, we can get this information from kdump (or ramdump) and parse it
to figure out memory allocation problems.
Hey LiuYongQiang0816, Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
实测开启page_owner之后增加了pid和 ts消息
Page allocated via order 0, mask 0x100cc2(GFP_HIGHUSER), pid 1, ts 530982399 ns, free_ts 0 ns
PFN 1049407 type Unmovable Block 2049 type Unmovable Flags 0x17ffffc010001c(uptodate|dirty|lru|unevictable)
prep_new_page+0xc1/0xe0
get_page_from_freelist+0xbed/0xda0
__alloc_pages_nodemask+0x161/0x300
alloc_page_interleave+0x13/0x70
pagecache_get_page+0xeb/0x350
grab_cache_page_write_begin+0x1d/0x40
simple_write_begin+0x23/0x190
generic_perform_write+0xbf/0x1c0
__generic_file_write_iter+0xf9/0x1d0
generic_file_write_iter+0x5d/0xb0
__kernel_write+0x14f/0x2d0
kernel_write+0x56/0xf0
xwrite.constprop.0+0x31/0x62
do_copy+0xe0/0x15a
write_buffer+0x27/0x37
flush_buffer+0x2b/0x83
openEuler-21.09分支合入如下相关补丁:
31e369115a8d mm/page_owner: record the timestamp of all pages during free
d8136b3ccc72 mm/page_owner: record timestamp and pid
登录 后才可以发表评论