* [RFC PATCH v3 0/7] mm/damon: various improvements/cleanups for code, tests and comments
@ 2026-11-27 22:27 SJ Park
2026-11-27 22:27 ` [RFC PATCH v3 5/7] selftests/damon/damos_apply_interval: remove unused variables SJ Park
2026-11-27 22:27 ` [RFC PATCH v3 6/7] selftests/damon: remove unused imports of sys and time modules SJ Park
0 siblings, 2 replies; 3+ messages in thread
From: SJ Park @ 2026-11-27 22:27 UTC (permalink / raw)
Cc: SJ Park, Andrew Morton, Shuah Khan, damon, linux-kselftest,
linux-mm
Refactor code, optimize code speed, add missing feature supports, and
update comments on various areas of DAMON.
Optimize the efficiency of vaddr damos_migrate action under filter
failures with patch 1. Use damos->last_applied on damos_migrate action
in vaddr and support sz_filter_passed for damos_migrate action in vaddr,
respectively with patch 2 and 3. Drop a redundant and racy quota goal
target value validation in sysfs, in favor of that in the core layer,
with patch 4. Drop unused variables and imports from selftests with
patch 5 and 6. Update source file intro comments to call DAMON just
DAMON, via patch 7.
Issues for patches 1 and 3 were found by Sashiko. Those are
mild inefficiency and unsupported features, though. Hence not Cc-ing
stable.
Changes from RFC v2
- RFC v2: https://lore.kernel.org/20261101171630.81477-1-sj@kernel.org
- Set last_applied regardless of damos-filtering.
- Advance entire folio for invalid folio.
- update subject for unused imports removal.
- Add source file intro comments update patch.
- Rebase to the latest mm-new.
Changes from RFC
- RFC: https://lore.kernel.org/20261031202614.96036-1-sj@kernel.org
- Drop charge_target_from fixup consolidation.
- Add a patch for using last_applied on vaddr migrate action.
- Add missed damos_va_migrate_private->sz_filter_passed setup.
- Fix wrong commit message for unused imports removal.
SJ Park (7):
mm/damon/vaddr: advance migration attempt in folio level for filter
out
mm/damon/vaddr: use damos->last_applied for migrate action
mm/damon/vaddr: implement sz_filter_passed for migrate_{hot,cold}
action
mm/damon/sysfs-schemes: drop redundant and racy zero target_value
check
selftests/damon/damos_apply_interval: remove unused variables
selftests/damon: remove unused imports of sys and time modules
mm/damon: update file intro comments to call DAMON just DAMON
mm/damon/core.c | 2 +-
mm/damon/ops-common.c | 2 +-
mm/damon/ops-common.h | 2 +-
mm/damon/sysfs-schemes.c | 3 ---
mm/damon/tests/core-kunit.h | 2 +-
mm/damon/tests/paddr-kunit.h | 2 +-
mm/damon/tests/sysfs-kunit.h | 2 +-
mm/damon/tests/vaddr-kunit.h | 2 +-
mm/damon/vaddr.c | 27 ++++++++++++-------
.../selftests/damon/damos_apply_interval.py | 2 --
.../damon/sysfs_no_op_commit_break.py | 1 -
...sysfs_update_schemes_tried_regions_hang.py | 1 -
12 files changed, 24 insertions(+), 24 deletions(-)
base-commit: f3e166bac17470d6c215e1b4c2af36f5ac5ee75c
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread* [RFC PATCH v3 5/7] selftests/damon/damos_apply_interval: remove unused variables
2026-11-27 22:27 [RFC PATCH v3 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
@ 2026-11-27 22:27 ` SJ Park
2026-11-27 22:27 ` [RFC PATCH v3 6/7] selftests/damon: remove unused imports of sys and time modules SJ Park
1 sibling, 0 replies; 3+ messages in thread
From: SJ Park @ 2026-11-27 22:27 UTC (permalink / raw)
Cc: SJ Park, Shuah Khan, damon, linux-kselftest, linux-mm
wss_collected and nr_quota_exceeds in damos_apply_interval.py are
assigned to but never used. Remove.
The issue is found using flake8.
Signed-off-by: SJ Park <sj@kernel.org>
---
tools/testing/selftests/damon/damos_apply_interval.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/testing/selftests/damon/damos_apply_interval.py b/tools/testing/selftests/damon/damos_apply_interval.py
index 0bf7768b2006..0ad110be0fb9 100755
--- a/tools/testing/selftests/damon/damos_apply_interval.py
+++ b/tools/testing/selftests/damon/damos_apply_interval.py
@@ -42,8 +42,6 @@ def main():
print('kdamond start failed: %s' % err)
exit(1)
- wss_collected = []
- nr_quota_exceeds = 0
while proc.poll() == None:
time.sleep(0.1)
err = kdamonds.kdamonds[0].update_schemes_stats()
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [RFC PATCH v3 6/7] selftests/damon: remove unused imports of sys and time modules
2026-11-27 22:27 [RFC PATCH v3 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
2026-11-27 22:27 ` [RFC PATCH v3 5/7] selftests/damon/damos_apply_interval: remove unused variables SJ Park
@ 2026-11-27 22:27 ` SJ Park
1 sibling, 0 replies; 3+ messages in thread
From: SJ Park @ 2026-11-27 22:27 UTC (permalink / raw)
Cc: SJ Park, Shuah Khan, damon, linux-kselftest, linux-mm
sysfs_no_op_commit_break.py imports 'sys' module but never uses it.
sysfs_update_schemes_tried_regions_hang imports 'time' module but never
uses it. Remove the unnecessary imports.
The issue is found using flake8.
Signed-off-by: SJ Park <sj@kernel.org>
---
tools/testing/selftests/damon/sysfs_no_op_commit_break.py | 1 -
.../selftests/damon/sysfs_update_schemes_tried_regions_hang.py | 1 -
2 files changed, 2 deletions(-)
diff --git a/tools/testing/selftests/damon/sysfs_no_op_commit_break.py b/tools/testing/selftests/damon/sysfs_no_op_commit_break.py
index 81774ddc55ac..5664f75186ba 100755
--- a/tools/testing/selftests/damon/sysfs_no_op_commit_break.py
+++ b/tools/testing/selftests/damon/sysfs_no_op_commit_break.py
@@ -4,7 +4,6 @@
import json
import os
import subprocess
-import sys
import _damon_sysfs
diff --git a/tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_hang.py b/tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_hang.py
index 625761c243b5..326a14f04053 100755
--- a/tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_hang.py
+++ b/tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_hang.py
@@ -4,7 +4,6 @@
import os
import subprocess
import sys
-import time
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import _damon_sysfs
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-27 22:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 22:27 [RFC PATCH v3 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
2026-11-27 22:27 ` [RFC PATCH v3 5/7] selftests/damon/damos_apply_interval: remove unused variables SJ Park
2026-11-27 22:27 ` [RFC PATCH v3 6/7] selftests/damon: remove unused imports of sys and time modules SJ Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox