diff options
| author | Yixuan Cao <[email protected]> | 2022-08-12 23:55:15 +0800 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2022-09-11 20:25:51 -0700 |
| commit | 57eb60c04d2c7b0de91eac2bc5d0331f8fe72fd7 (patch) | |
| tree | cdb859cc89869bd7ae9057dde1b63787631d5e0a /tools/perf/scripts/python/syscall-counts.py | |
| parent | 2fd86a07c9ac50dfbc5eef3c69ef6e5d370f3b28 (diff) | |
tools/vm/page_owner_sort: fix -f option
The -f option is to filter out the information of blocks whose memory has
not been released, I noticed some blocks should not be filtered out.
Commit 9cc7e96aa846 ("mm/page_owner: record timestamp and pid") records
the allocation timestamp (ts_nsec) of all pages.
Commit 866b48526217 ("mm/page_owner: record the timestamp of all pages
during free") records the free timestamp (free_ts_nsec) of all pages.
When the page is allocated for the first time, the initial value of
free_ts_nsec is 0, and the corresponding time will be obtained when the
page is released. But during reallocation the free_ts_nsec will not reset
to 0 again. In particular, when page migration occurs, these two
timestamps will be the same.
Now page_owner_sort removes all text blocks whose free_ts_nsec is not 0
when using -f option. However, this way can only select pages allocated
for the first time. If a freed page is reallocated, free_ts_nsec will be
less than ts_nsec; if page migration occurs, the two timestamps will be
equal. These cases should be considered as pages are not released.
So I fix the function is_need() to keep text blocks that meet the above
two conditions when using -f option.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yixuan Cao <[email protected]>
Cc: Chongxi Zhao <[email protected]>
Cc: Jiajian Ye <[email protected]>
Cc: Yuhong Feng <[email protected]>
Cc: Liam Mark <[email protected]>
Cc: Georgi Djakov <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions