mm/damon/damo: saving damon sysfs configuration
Subsystems (2)
Hi SJ and Community,
I've noticed that damo [1] doesn't seem to have a feature for saving DAMON SYSFS configuration. I tried 'damo args damon', but it doesn't save the DAMOS schemes information. 'damo report damon --json' provides more detailed information, but its output cannot be read by 'damo start --kdamonds'.
I'd like to know if there is currently any way in damo to save the DAMON SYSFS configuration that can be correctly read by 'damo start --kdamonds'. If not, would it be worth adding one?
[1] https://github.com/damonitor/damo
Best regards,
Rui Yan
SJ Park
maintainerHi Liew,
Quoted 5 lines · On Tue, 29 Sep 2026 03:13:06 +0800 Liew Rui Yan <[email protected]>…
Hi SJ and Community,
I've noticed that damo [1] doesn't seem to have a feature for saving DAMON SYSFS configuration. I tried 'damo args damon', but it doesn't save the DAMOS schemes information.
If so, it is a bug. Could you share more details including how the issue can be reproduced? Directly sending a PR should also be fine.
Quoted 3 lines
'damo report damon --json' provides
more detailed information, but its output cannot be read by 'damo start --kdamonds'.
Maybe this is also an issue that we could fix.
Quoted 4 lines
I'd like to know if there is currently any way in damo to save the DAMON SYSFS configuration that can be correctly read by 'damo start --kdamonds'. If not, would it be worth adding one?
I believe it would be useful. Please feel free to send a PR.
Nonetheless, we added the json/yaml kdamonds config support mainly because there was no good way to flexibly configure kdamonds with the command line interface. Now it is much more improved [1].
I'd recommend using the command line interface. That is, you could copy your command line setup in a bash script and modify/reuse it.
Is there a use case that it cannot work or suboptimum?
[1] https://github.com/damonitor/damo/issues/3#issuecomment-5655965736
Thanks,
SJ
[...]
Quoted 4 lines · On Tue, 29 Sep 2026 00:43:00 -0700 SJ Park <[email protected]> wrote:
Hi Liew,
On Tue, 29 Sep 2026 03:13:06 +0800 Liew Rui Yan <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines
Hi SJ and Community,
I've noticed that damo [1] doesn't seem to have a feature for saving DAMON SYSFS configuration. I tried 'damo args damon', but it doesn't save the DAMOS schemes information.
If so, it is a bug. Could you share more details including how the issue can be reproduced? Directly sending a PR should also be fine.
Yes, this can be reproduced easily.
# make sure DAMON is started
$ sudo ./damo args damon > damo_args_damon.json
$ sudo ./damo report damon --json > damo_report_damon.json$ sudo ./damo stop
$ sudo ./damo start --kdamonds damo_args_damon.json
$ sudo ./damo report damon --json > damo_report_damon_after.json $ diff damo_report_damon.json damo_report_damon_after.json
4c4
< "pid": "4959",
---Quoted 1 line
"pid": "5582",
16,17c16,17
< "start": "4,294,967,296",
< "end": "15,807,283,199"
---
> "start": "4,096",
> "end": "15,807,283,200"
25c25
< "ops_update_us": "1 m",
---
> "ops_update_us": "1 s",
46,159c46
< "schemes": [
< {
< "action": "pageout",
< "dests": [],
< "access_pattern": {
< "sz_bytes": {
< "min": "4.000 KiB",
< "max": "max"
< },
< "nr_accesses": {
< "min": "0 samples",
< "max": "0 samples"
< },
< "age": {
< "min": "60,000 aggr_intervals",
< "max": "18,446,744,073,709,551,615 aggr_intervals"
< }
< },
< "apply_interval_us": "0 ns",
< "quotas": {
< "time_ms": "0 ns",
< "sz_bytes": "16.000 MiB",
< "reset_interval_ms": "1 s",
< "fail_charge_num": "0",
< "fail_charge_denom": "0",
< "goals": [
< {
< "metric": "user_input",
< "nid": "0",
< "memcg_path": "",
< "target_value": "3,000",
< "current_value": "7,855"
< }
< ],
< "goal_tuner": "temporal\n",
< "effective_sz_bytes": "0 B",
< "weights": {
< "sz_permil": "0 %",
< "nr_accesses_permil": "0 %",
< "age_permil": "0 %"
< }
< },
< "watermarks": {
< "metric": "none",
< "interval_us": "0 ns",
< "high_permil": "0 %",
< "mid_permil": "0 %",
< "low_permil": "0 %"
< },
< "filters": [],
< "stats": {
< "nr_tried": "0",
< "sz_tried": "0 B",
< "nr_applied": "0",
< "sz_applied": "0 B",
< "sz_ops_filter_passed": "0 B",
< "qt_exceeds": "19",
< "nr_snapshots": "0",
< "max_nr_snapshots": "0"
< }
< },
< {
< "action": "stat",
< "dests": [],
< "access_pattern": {
< "sz_bytes": {
< "min": "0 B",
< "max": "max"
< },
< "nr_accesses": {
< "min": "0 samples",
< "max": "18,446,744,073,709,551,615 samples"
< },
< "age": {
< "min": "0 aggr_intervals",
< "max": "18,446,744,073,709,551,615 aggr_intervals"
< }
< },
< "apply_interval_us": "0 ns",
< "quotas": {
< "time_ms": "0 ns",
< "sz_bytes": "0 B",
< "reset_interval_ms": "0 ns",
< "fail_charge_num": "0",
< "fail_charge_denom": "0",
< "goals": [],
< "goal_tuner": "consist\n",
< "effective_sz_bytes": "0 B",
< "weights": {
< "sz_permil": "0 %",
< "nr_accesses_permil": "0 %",
< "age_permil": "0 %"
< }
< },
< "watermarks": {
< "metric": "none",
< "interval_us": "0 ns",
< "high_permil": "0 %",
< "mid_permil": "0 %",
< "low_permil": "0 %"
< },
< "filters": [],
< "stats": {
< "nr_tried": "2,000",
< "sz_tried": "1.801 TiB",
< "nr_applied": "0",
< "sz_applied": "0 B",
< "sz_ops_filter_passed": "0 B",
< "qt_exceeds": "0",
< "nr_snapshots": "172",
< "max_nr_snapshots": "0"
< }
< }
< ]
---
> "schemes": []
Quoted 6 lines
Quoted 4 lines
'damo report damon --json' provides
more detailed information, but its output cannot be read by 'damo start --kdamonds'.Maybe this is also an issue that we could fix.
In my opinion, this is not an issue, since there's no documentation recommending we use the 'damo report damon --json' to generate configuration for 'damo start --kdamonds'.
Quoted 11 lines
Quoted 5 lines
I'd like to know if there is currently any way in damo to save the DAMON SYSFS configuration that can be correctly read by 'damo start --kdamonds'. If not, would it be worth adding one?
I believe it would be useful. Please feel free to send a PR.
Nonetheless, we added the json/yaml kdamonds config support mainly because there was no good way to flexibly configure kdamonds with the command line interface. Now it is much more improved [1].
Thank you for clarifying this!
Quoted 5 lines
I'd recommend using the command line interface. That is, you could copy your command line setup in a bash script and modify/reuse it.
Is there a use case that it cannot work or suboptimum?
No, CLI (Command Line Interface) do very convenience. I can write my configuration in CLI and it is very readable. Thank you for letting me know this feature!
#!/bin/bash
# update-damon-config.sh
./damo args damon \
--kdamond --damon_ctx --ops paddr \
--monitoring_intervals 5000 100000 1000000 \
--damon_target --regions 4294967296-15807283199 \
--damos_scheme --damos_action pageout \
--damos_sz_region 4096 18446744073709551615 \
--damos_access_rate 0 0 \
--damos_age 600000000 18446744073709551615 \
--damos_quota_goal user_input 3000 10000 \
--damos_quota_goal_tuner temporal \
--damos_quota_interval 1000 \
--damos_quota_time 0 \
--damos_quota_space 16777216 \
--damos_quota_weights 0 0 0 \
> config.jsonQuoted 2 lines
[1] https://github.com/damonitor/damo/issues/3#issuecomment-5655965736
[...]
Best regards,
Rui Yan
Hi SJ,
Just a reminder, I think you might have missed the question I asked.
Quoted 222 lines · On Wed, 30 Sep 2026 17:58:54 +0800 Liew Rui Yan <[email protected]>…
Quoted 4 lines · On Tue, 29 Sep 2026 00:43:00 -0700 SJ Park <[email protected]> wrote:
Hi Liew,
On Tue, 29 Sep 2026 03:13:06 +0800 Liew Rui Yan <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines
Hi SJ and Community,
I've noticed that damo [1] doesn't seem to have a feature for saving DAMON SYSFS configuration. I tried 'damo args damon', but it doesn't save the DAMOS schemes information.
If so, it is a bug. Could you share more details including how the issue can be reproduced? Directly sending a PR should also be fine.
Yes, this can be reproduced easily.
# make sure DAMON is started $ sudo ./damo args damon > damo_args_damon.json $ sudo ./damo report damon --json > damo_report_damon.json$ sudo ./damo stop$ sudo ./damo start --kdamonds damo_args_damon.json $ sudo ./damo report damon --json > damo_report_damon_after.json$ diff damo_report_damon.json damo_report_damon_after.json 4c4 < "pid": "4959", ---Quoted 1 line
"pid": "5582",16,17c16,17
< "start": "4,294,967,296",
< "end": "15,807,283,199"
---
> "start": "4,096",
> "end": "15,807,283,200"
25c25
< "ops_update_us": "1 m",
---
> "ops_update_us": "1 s",
46,159c46
< "schemes": [
< {
< "action": "pageout",
< "dests": [],
< "access_pattern": {
< "sz_bytes": {
< "min": "4.000 KiB",
< "max": "max"
< },
< "nr_accesses": {
< "min": "0 samples",
< "max": "0 samples"
< },
< "age": {
< "min": "60,000aggr_intervals",
< "max": "18,446,744,073,709,551,615aggr_intervals"
< }
< },
< "apply_interval_us": "0 ns",
< "quotas": {
< "time_ms": "0 ns",
< "sz_bytes": "16.000 MiB",
< "reset_interval_ms": "1 s",
< "fail_charge_num": "0",
< "fail_charge_denom": "0",
< "goals": [
< {
< "metric": "user_input",
< "nid": "0",
< "memcg_path": "",
< "target_value": "3,000",
< "current_value": "7,855"
< }
< ],
< "goal_tuner": "temporal\n",
< "effective_sz_bytes": "0 B",
< "weights": {
< "sz_permil": "0 %",
< "nr_accesses_permil": "0 %",
< "age_permil": "0 %"
< }
< },
< "watermarks": {
< "metric": "none",
< "interval_us": "0 ns",
< "high_permil": "0 %",
< "mid_permil": "0 %",
< "low_permil": "0 %"
< },
< "filters": [],
< "stats": {
< "nr_tried": "0",
< "sz_tried": "0 B",
< "nr_applied": "0",
< "sz_applied": "0 B",
< "sz_ops_filter_passed": "0 B",
< "qt_exceeds": "19",
< "nr_snapshots": "0",
< "max_nr_snapshots": "0"
< }
< },
< {
< "action": "stat",
< "dests": [],
< "access_pattern": {
< "sz_bytes": {
< "min": "0 B",
< "max": "max"
< },
< "nr_accesses": {
< "min": "0 samples",
< "max": "18,446,744,073,709,551,615 samples"
< },
< "age": {
< "min": "0aggr_intervals",
< "max": "18,446,744,073,709,551,615aggr_intervals"
< }
< },
< "apply_interval_us": "0 ns",
< "quotas": {
< "time_ms": "0 ns",
< "sz_bytes": "0 B",
< "reset_interval_ms": "0 ns",
< "fail_charge_num": "0",
< "fail_charge_denom": "0",
< "goals": [],
< "goal_tuner": "consist\n",
< "effective_sz_bytes": "0 B",
< "weights": {
< "sz_permil": "0 %",
< "nr_accesses_permil": "0 %",
< "age_permil": "0 %"
< }
< },
< "watermarks": {
< "metric": "none",
< "interval_us": "0 ns",
< "high_permil": "0 %",
< "mid_permil": "0 %",
< "low_permil": "0 %"
< },
< "filters": [],
< "stats": {
< "nr_tried": "2,000",
< "sz_tried": "1.801 TiB",
< "nr_applied": "0",
< "sz_applied": "0 B",
< "sz_ops_filter_passed": "0 B",
< "qt_exceeds": "0",
< "nr_snapshots": "172",
< "max_nr_snapshots": "0"
< }
< }
< ]
---
> "schemes": []Quoted 6 lines
Quoted 4 lines
'damo report damon --json' provides
more detailed information, but its output cannot be read by 'damo start --kdamonds'.Maybe this is also an issue that we could fix.
In my opinion, this is not an issue, since there's no documentation recommending we use the 'damo report damon --json' to generate configuration for 'damo start --kdamonds'.
Quoted 11 lines
Quoted 5 lines
I'd like to know if there is currently any way in damo to save the DAMON SYSFS configuration that can be correctly read by 'damo start --kdamonds'. If not, would it be worth adding one?
I believe it would be useful. Please feel free to send a PR.
Nonetheless, we added the json/yaml kdamonds config support mainly because there was no good way to flexibly configure kdamonds with the command line interface. Now it is much more improved [1].
Thank you for clarifying this!
Quoted 5 lines
I'd recommend using the command line interface. That is, you could copy your command line setup in a bash script and modify/reuse it.
Is there a use case that it cannot work or suboptimum?
No, CLI (Command Line Interface) do very convenience. I can write my configuration in CLI and it is very readable. Thank you for letting me know this feature!
#!/bin/bash # update-damon-config.sh ./damo args damon \ --kdamond --damon_ctx --ops paddr \ --monitoring_intervals 5000 100000 1000000 \ --damon_target --regions 4294967296-15807283199 \ --damos_scheme --damos_action pageout \ --damos_sz_region 4096 18446744073709551615 \ --damos_access_rate 0 0 \ --damos_age 600000000 18446744073709551615 \ --damos_quota_goal user_input 3000 10000 \ --damos_quota_goal_tuner temporal \ --damos_quota_interval 1000 \ --damos_quota_time 0 \ --damos_quota_space 16777216 \ --damos_quota_weights 0 0 0 \ > config.jsonQuoted 2 lines
[1] https://github.com/damonitor/damo/issues/3#issuecomment-5655965736
[...]
Best regards,
Rui Yan
SJ Park
maintainerHi Liew,
Quoted 3 lines · On Thu, 8 Oct 2026 20:09:05 +0800 Liew Rui Yan <[email protected]>…
Hi SJ,
Just a reminder, I think you might have missed the question I asked.
Could you please clarify what is the question that is not yet answered?
Thanks,
SJ
Quoted 9 lines · On Thu, 08 Oct 2026 05:32:31 -0700 SJ Park <[email protected]> wrote:
Hi Liew,
Quoted 3 lines · On Thu, 8 Oct 2026 20:09:05 +0800 Liew Rui Yan <[email protected]>…
Hi SJ,
Just a reminder, I think you might have missed the question I asked.
Could you please clarify what is the question that is not yet answered?
It seems I forgot to ask the question, my apologies.
I would like to ask: after reviewing the reproduction, do you still think this is a real issue? If so, I will start working on a fix.
[...]
Best regards,
Rui Yan
SJ Park
maintainerQuoted 6 lines · On Thu, 8 Oct 2026 21:44:19 +0800 Liew Rui Yan <[email protected]>…
Quoted 4 lines · On Thu, 08 Oct 2026 05:32:31 -0700 SJ Park <[email protected]> wrote:
Hi Liew,
On Thu, 8 Oct 2026 20:09:05 +0800 Liew Rui Yan <[email protected]> wrote:
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Hi SJ,
Just a reminder, I think you might have missed the question I asked.
Could you please clarify what is the question that is not yet answered?
It seems I forgot to ask the question, my apologies.
No worry!
Quoted 3 lines
I would like to ask: after reviewing the reproduction, do you still think this is a real issue? If so, I will start working on a fix.
I'm not good at reading the diff in your previous reply. It makes me difficult to understand what the issue is. So I tried the commands on my system.
'''
$ sudo ./damo start
$ sudo ./damo args damon > damo_args_damon.json
$ sudo ./damo report damon --json > damo_report_damon.json
$ sudo ./damo stop
$ sudo ./damo start --kdamonds damo_args_damon.json
$ sudo ./damo report damon --json > damo_report_damon_aftr.json
$ diff -u damo_report_damon.json damo_report_damon_aftr.json
--- damo_report_damon.json 2026-10-08 07:56:04.979178016 -0700
+++ damo_report_damon_aftr.json 2026-10-08 07:56:27.717941609 -0700
@@ -1,7 +1,7 @@
[
{
"state": "on",
- "pid": "46402",
+ "pid": "46449",
"refresh_ms": 0,
"contexts": [
{
'''And still it is unclear what is the problem. Could I ask your elaboration?
Thanks,
SJ
[...]
Quoted 46 lines · On Thu, 08 Oct 2026 08:00:43 -0700 SJ Park <[email protected]> wrote:
Quoted 6 lines · On Thu, 8 Oct 2026 21:44:19 +0800 Liew Rui Yan <[email protected]>…
Quoted 4 lines · On Thu, 08 Oct 2026 05:32:31 -0700 SJ Park <[email protected]> wrote:
Hi Liew,
On Thu, 8 Oct 2026 20:09:05 +0800 Liew Rui Yan <[email protected]> wrote:
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Hi SJ,
Just a reminder, I think you might have missed the question I asked.
Could you please clarify what is the question that is not yet answered?
It seems I forgot to ask the question, my apologies.
No worry!
Quoted 3 lines
I would like to ask: after reviewing the reproduction, do you still think this is a real issue? If so, I will start working on a fix.
I'm not good at reading the diff in your previous reply. It makes me difficult to understand what the issue is. So I tried the commands on my system.
'''
$ sudo ./damo start $ sudo ./damo args damon > damo_args_damon.json $ sudo ./damo report damon --json > damo_report_damon.json $ sudo ./damo stop $ sudo ./damo start --kdamonds damo_args_damon.json $ sudo ./damo report damon --json > damo_report_damon_aftr.json $ diff -u damo_report_damon.json damo_report_damon_aftr.jsondamo_report_damon_aftr.json 2026-10-08 07:56:27.717941609 -0700 renamed from damo_report_damon.json 2026-10-08 07:56:04.979178016 -0700 +1
-1@@ -1,7 +1,7 @@ [ { "state": "on", - "pid": "46402", + "pid": "46449", "refresh_ms": 0, "contexts": [ {'''
Quoted 1 line
And still it is unclear what is the problem. Could I ask your elaboration?
Thank you for testing this!
The reason it did not reproduce is that no DAMOS Schemes were configured during this test.
This is a bash script for reproduce:
'''
#!/bin/bash
mkdir -p /tmp/config
mkdir -p /tmp/output
./damo args damon \
--kdamond --damon_ctx --ops paddr \
--monitoring_intervals 5000 100000 1000000 \
--damon_target --regions 0-4096 \
--damos_scheme --damos_action lru_deprio \
--damos_sz_region 4096 max \
--damos_access_rate 0 max \
--damos_age 120000000 max \
--damos_quota_interval 1000 \
--damos_quota_time 0 \
--damos_quota_space 16777216 \
--damos_quota_weights 0 1000 1000 \Quoted 1 line
/tmp/config/lru.json
./damo stop
./damo start --kdamonds /tmp/config/lru.json
./damo args damon > /tmp/output/damo_args_damon.json
./damo report damon --json > /tmp/output/damo_report_damon.json ./damo stop
./damo start --kdamonds /tmp/output/damo_args_damon.json
./damo report damon --json > /tmp/output/damo_report_damon_aftr.json diff -u /tmp/output/damo_report_damon.json /tmp/output/damo_report_damon_aftr.json ./damo stop
rm -r /tmp/config
rm -r /tmp/output
'''
[...]
Best regards,
Rui Yan
SJ Park
maintainerQuoted 87 lines · On Fri, 9 Oct 2026 00:14:54 +0800 Liew Rui Yan <[email protected]>…
Quoted 46 lines · On Thu, 08 Oct 2026 08:00:43 -0700 SJ Park <[email protected]> wrote:
Quoted 6 lines · On Thu, 8 Oct 2026 21:44:19 +0800 Liew Rui Yan <[email protected]>…
Quoted 4 lines · On Thu, 08 Oct 2026 05:32:31 -0700 SJ Park <[email protected]> wrote:
Hi Liew,
On Thu, 8 Oct 2026 20:09:05 +0800 Liew Rui Yan <[email protected]> wrote:
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Hi SJ,
Just a reminder, I think you might have missed the question I asked.
Could you please clarify what is the question that is not yet answered?
It seems I forgot to ask the question, my apologies.
No worry!
Quoted 3 lines
I would like to ask: after reviewing the reproduction, do you still think this is a real issue? If so, I will start working on a fix.
I'm not good at reading the diff in your previous reply. It makes me difficult to understand what the issue is. So I tried the commands on my system.
'''
$ sudo ./damo start $ sudo ./damo args damon > damo_args_damon.json $ sudo ./damo report damon --json > damo_report_damon.json $ sudo ./damo stop $ sudo ./damo start --kdamonds damo_args_damon.json $ sudo ./damo report damon --json > damo_report_damon_aftr.json $ diff -u damo_report_damon.json damo_report_damon_aftr.jsondamo_report_damon_aftr.json 2026-10-08 07:56:27.717941609 -0700 renamed from damo_report_damon.json 2026-10-08 07:56:04.979178016 -0700 +1
-1@@ -1,7 +1,7 @@ [ { "state": "on", - "pid": "46402", + "pid": "46449", "refresh_ms": 0, "contexts": [ {'''
Quoted 1 line
And still it is unclear what is the problem. Could I ask your elaboration?
Thank you for testing this!
The reason it did not reproduce is that no DAMOS Schemes were configured during this test.
This is a bash script for reproduce:
'''
#!/bin/bashmkdir -p
/tmp/config
mkdir -p/tmp/output./damo args damon \
--kdamond --damon_ctx --ops paddr \ --monitoring_intervals 5000 100000 1000000 \ --damon_target --regions 0-4096 \ --damos_scheme --damos_action lru_deprio \ --damos_sz_region 4096 max \ --damos_access_rate 0 max \ --damos_age 120000000 max \ --damos_quota_interval 1000 \ --damos_quota_time 0 \ --damos_quota_space 16777216 \ --damos_quota_weights 0 1000 1000 \Quoted 1 line
/tmp/config/lru.json./damo stop
./damo start --kdamonds/tmp/config/lru.json
./damo args damon >/tmp/output/damo_args_damon.json
./damo report damon --json >/tmp/output/damo_report_damon.json./damo stop
./damo start --kdamonds/tmp/output/damo_args_damon.json
./damo report damon --json >/tmp/output/damo_report_damon_aftr.jsondiff -u/tmp/output/damo_report_damon.json/tmp/output/damo_report_damon_aftr.json./damo stop
Quoted 3 lines
rm -r
/tmp/config
rm -r/tmp/output
'''
Thank you for sharing this script.
However, issue reports in genral are better to clarify the expected and unexpected behaviors of the repro together. Please add such clarifications from the next time.
And maybe because of the lack of such clarification, I still don't get what is the problem. Clarify, please?
Thanks,
SJ
[...]
Quoted 93 lines · On Fri, 09 Oct 2026 01:01:38 -0700 SJ Park <[email protected]> wrote:
Quoted 87 lines · On Fri, 9 Oct 2026 00:14:54 +0800 Liew Rui Yan <[email protected]>…
Quoted 46 lines · On Thu, 08 Oct 2026 08:00:43 -0700 SJ Park <[email protected]> wrote:
Quoted 6 lines · On Thu, 8 Oct 2026 21:44:19 +0800 Liew Rui Yan <[email protected]>…
Quoted 4 lines · On Thu, 08 Oct 2026 05:32:31 -0700 SJ Park <[email protected]> wrote:
Hi Liew,
On Thu, 8 Oct 2026 20:09:05 +0800 Liew Rui Yan <[email protected]> wrote:
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Hi SJ,
Just a reminder, I think you might have missed the question I asked.
Could you please clarify what is the question that is not yet answered?
It seems I forgot to ask the question, my apologies.
No worry!
Quoted 3 lines
I would like to ask: after reviewing the reproduction, do you still think this is a real issue? If so, I will start working on a fix.
I'm not good at reading the diff in your previous reply. It makes me difficult to understand what the issue is. So I tried the commands on my system.
'''
$ sudo ./damo start $ sudo ./damo args damon > damo_args_damon.json $ sudo ./damo report damon --json > damo_report_damon.json $ sudo ./damo stop $ sudo ./damo start --kdamonds damo_args_damon.json $ sudo ./damo report damon --json > damo_report_damon_aftr.json $ diff -u damo_report_damon.json damo_report_damon_aftr.jsondamo_report_damon_aftr.json 2026-10-08 07:56:27.717941609 -0700 renamed from damo_report_damon.json 2026-10-08 07:56:04.979178016 -0700 +1
-1@@ -1,7 +1,7 @@ [ { "state": "on", - "pid": "46402", + "pid": "46449", "refresh_ms": 0, "contexts": [ {'''
Quoted 1 line
And still it is unclear what is the problem. Could I ask your elaboration?
Thank you for testing this!
The reason it did not reproduce is that no DAMOS Schemes were configured during this test.
This is a bash script for reproduce:
'''
#!/bin/bashmkdir -p
/tmp/config
mkdir -p/tmp/output./damo args damon \
--kdamond --damon_ctx --ops paddr \ --monitoring_intervals 5000 100000 1000000 \ --damon_target --regions 0-4096 \ --damos_scheme --damos_action lru_deprio \ --damos_sz_region 4096 max \ --damos_access_rate 0 max \ --damos_age 120000000 max \ --damos_quota_interval 1000 \ --damos_quota_time 0 \ --damos_quota_space 16777216 \ --damos_quota_weights 0 1000 1000 \Quoted 1 line
/tmp/config/lru.json./damo stop
./damo start --kdamonds/tmp/config/lru.json
./damo args damon >/tmp/output/damo_args_damon.json
./damo report damon --json >/tmp/output/damo_report_damon.json./damo stop
./damo start --kdamonds/tmp/output/damo_args_damon.json
./damo report damon --json >/tmp/output/damo_report_damon_aftr.jsondiff -u/tmp/output/damo_report_damon.json/tmp/output/damo_report_damon_aftr.json./damo stopQuoted 3 lines
rm -r
/tmp/config
rm -r/tmp/output
'''
Quoted 5 lines
Thank you for sharing this script.
However, issue reports in genral are better to clarify the expected and unexpected behaviors of the repro together. Please add such clarifications from the next time.
Thank you for your guidance.
Quoted 3 lines
And maybe because of the lack of such clarification, I still don't get what is the problem. Clarify, please?
Yes. My expected behavior is to completely save and restore the DAMON SYSFS configuration, including DAMOS Schemes. But it cannot done by 'damo args damon'.
In the script I provided, it first apply lru.json and then uses 'damo args damon' to export the current configuration file. I expected that reapplying this exported configuration (via 'damo start --kdamonds') would fully restore the previous DAMON SYSFS setup.
However, the current/unexpected behavior is that it drops the DAMOS Schemes configuration entirely. In other words, I cannot fully save and restore the DAMON SYSFS configuration using 'damo args damon'.
[...]
Best regards,
Rui Yan
SJ Park
maintainerHi Liew,
On Fri, 9 Oct 2026 20:08:33 +0800 Liew Rui Yan <[email protected]> wrote:
[...]
Quoted 6 lines
Yes. My expected behavior is to completely save and restore the DAMON SYSFS configuration, including DAMOS Schemes. But it cannot done by 'damo args damon'.
In the script I provided, it first apply lru.json and then uses 'damo args damon' to export the current configuration file.
'damo args damon' does not export the running DAMON parameters. Why do you expect so? Has some document confused you?
Quoted 3 lines
I expected
that reapplying this exported configuration (via 'damo start --kdamonds') would fully restore the previous DAMON SYSFS setup.
So this expectation is wrong.
Quoted 4 lines
However, the current/unexpected behavior is that it drops the DAMOS Schemes configuration entirely. In other words, I cannot fully save and restore the DAMON SYSFS configuration using 'damo args damon'.
So it looks like there is not problem. Please let me know if I'm missing something.
Thanks,
SJ
[...]
Quoted 9 lines · On Fri, 09 Oct 2026 07:00:41 -0700 SJ Park <[email protected]> wrote:
Hi Liew,
On Fri, 9 Oct 2026 20:08:33 +0800 Liew Rui Yan <[email protected]> wrote:
[...]
Quoted 4 lines
Yes. My expected behavior is to completely save and restore the DAMON SYSFS configuration, including DAMOS Schemes. But it cannot done by 'damo args damon'.
Quoted 5 lines
Quoted 2 lines
In the script I provided, it first apply lru.json and then uses 'damo args damon' to export the current configuration file.
'damo args damon' does not export the running DAMON parameters. Why do you expect so? Has some document confused you?
Thank you for your clarify.
Actually, there is no any document confused me. 'damo args' section in USAGE.md is good enough. I think it is just because I made assumption about what 'damo args damon' would do.
Quoted 8 lines
Quoted 4 lines
I expected
that reapplying this exported configuration (via 'damo start --kdamonds') would fully restore the previous DAMON SYSFS setup.So this expectation is wrong.
Quoted 1 line
Quoted 6 lines
Quoted 3 lines
However, the current/unexpected behavior is that it drops the DAMOS Schemes configuration entirely. In other words, I cannot fully save and restore the DAMON SYSFS configuration using 'damo args damon'.
So it looks like there is not problem. Please let me know if I'm missing something.
I will reduce these kinds of false positive from the next time. At least, I will state what behavior I expect.
[...]
Best regards,
Rui Yan