awslabs / damo

DAMON user-space tool
https://damonitor.github.io/
GNU General Public License v2.0
148 stars 28 forks source link

_damo_paddr_layout.py: Handle System RAM (kmem) #84

Closed honggyukim closed 8 months ago

honggyukim commented 8 months ago

As shown in the kernel commit at [1], there could be "System RAM" with "(kmem)" postfix as follows.

  [root@localhost ~]# cat /proc/iomem
  ...
  140000000-33fffffff : Persistent Memory
    140000000-1481fffff : namespace0.0
    150000000-33fffffff : dax0.0
      150000000-33fffffff : System RAM (kmem)

But the current comparison logic does not handle this case as it tries exact match only.

So this patch changes "System RAM" string match logic to handle this case as well.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8a725e4694b52ffad755500277d36f3b2eb34755 Signed-off-by: Honggyu Kim honggyu.kim@sk.com

sj-aws commented 8 months ago

Looks good to me. Thank you Honggyu!

honggyukim commented 8 months ago

Thanks you too :)