在 2021/10/12 下午3:11, SeongJae Park 写道:
Hello Xin, thank you for this patch!
On Tue, 12 Oct 2021 13:49:48 +0800 Xin Hao <xhao@xxxxxxxxxxxxxxxxx> wrote:
Using damon-dbgfs has brought great convenience to user-mode
operation damon, but sometimes if i want to be able to view
the division of task regions, nr_access values etc,but i found
that it is impossible to view directly through the dbgfs interface,
so there i add a interface "region_stat", it displays like this.
# cat region_stat
last_aggregation=120.87s
target_id=5148
nr_regions=10
400000-258c000(34352 KiB): 1
258c000-4719000(34356 KiB): 0
4719000-abbf000(103064 KiB): 0
abbf000-c4d4000(25684 KiB): 11
c4d4000-ff5c000(59936 KiB): 15
ff5c000-152f9000(85620 KiB): 20
152f9000-1599e000(6804 KiB): 10
1599e000-19573000(61268 KiB): 0
19573000-1f92c000(102116 KiB): 0
1f92c000-22a4c000(50304 KiB): 0
I think similar information could also be collected via the 'damon_aggregated'
tracepoint[1], which is merged in the mainline, or 'DAMOS_STAT'[2], which is
merged in -mm. The recording feature[3] could also be used, though it would
take some time before it is merged in the mainline. Have you considered using
those but found some problem?
Yes, i know we can use damon_aggregated tracepoint, but i think, add a
"region_stat" will be more
convenient and intuitive, especially when we use damon-dbgfs interface.
[1] https://git.kernel.org/torvalds/c/2fcb93629ad8
[2] https://lore.kernel.org/linux-mm/20211001125604.29660-6-sj@xxxxxxxxxx/
[3] https://lore.kernel.org/linux-mm/20211008094509.16179-1-sj@xxxxxxxxxx/
Thanks,
SJ
[...]
--
Best Regards!
Xin Hao