awslabs / damo

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

schemes_tried_regions not supported #101

Open rajagond opened 1 week ago

rajagond commented 1 week ago

Hi,

I'm trying to run damo but getting below error. Could you please let me know how to resolve this? Thanks!

root@node0:/tdata/tests/damo# ./damo start 
root@node0:/tdata/tests/damo# ./damo show
updating schemes tried regions fail: writing update_schemes_tried_regions to /sys/kernel/mm/damon/admin/kdamonds/0/state failed ([Errno 22] Invalid argument) (maybe schemes_tried_regions not supported?)
root@node0:/tdata/tests/damo# grep CONFIG_DAMON /boot/config-$(uname -r)
CONFIG_DAMON=y
CONFIG_DAMON_VADDR=y
CONFIG_DAMON_PADDR=y
CONFIG_DAMON_SYSFS=y
CONFIG_DAMON_DBGFS=y
CONFIG_DAMON_RECLAIM=y
CONFIG_DAMON_LRU_SORT=y
root@node0:/tdata/tests/damo# ./damo stop
sjp38 commented 1 week ago

Hi,

The current implementation of damo show relies on a DAMON feature called schemes_tried_regions, which has merged into the mainline from v6.2. Could you please let me know what version of kernel you are using? You can also check if the feature is ported on your kernel using damo features.

If you are getting the issue due to the kernel version, there could be some ways to move forward.

  1. Upgrade your kernel to v6.2 or later kernel.
  2. Use kernels that have the feature backported. Amazon Linux 5.10 kernel has DAMON that ported from v6.7 (https://sjp38.github.io/post/damon/#source-code).
  3. Use damo record and damo report instead.

Please let me know if you cannot use any of the above solutions. I could backport DAMON code on your kernel, or make damo show runs on older kernels.

rajagond commented 1 week ago

Thanks for the response! I am using linux kernel v6.0.

On a side note, how to build the executable from the damo source code? I didn't find the command for the same anywhere in the readme.

sjp38 commented 1 week ago

how to build the executable from the damo source code?

damo is written in Python3, so you don't need to compile it.

rajagond commented 1 week ago

Sorry, the setup.py file is in the packaging directory. I couldn't find it in the main directory, which is why I was confused.

sjp38 commented 1 week ago

No worry. I believe we could better document the files organization of the repo. I will try to write that up.