* [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments
@ 2026-11-29 19:14 SJ Park
2026-11-29 19:14 ` [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out SJ Park
` (7 more replies)
0 siblings, 8 replies; 22+ messages in thread
From: SJ Park @ 2026-11-29 19:14 UTC (permalink / raw)
To: Andrew Morton; +Cc: SJ Park, 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 v4
- RFC v4: https://lore.kernel.org/20261128190033.164440-1-sj@kernel.org
- Rebase to the latest mm-new.
- Drop RFC tag.
Changes from RFC v3
- RFC v3: https://lore.kernel.org/20261127222719.105510-1-sj@kernel.org
- Avoid NULL dereference when vm_normal_folio() returns NULL, in patch 2.
- Rebase to the latest mm-new.
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, 25 insertions(+), 23 deletions(-)
base-commit: b7ee96f81dbca196a4aed69e280a444e8369dac2
--
2.47.3
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out
2026-11-29 19:14 [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
@ 2026-11-29 19:14 ` SJ Park
2026-11-29 20:26 ` + mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch added to mm-unstable branch Andrew Morton
2026-12-01 2:44 ` [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out Enze Li
2026-11-29 19:14 ` [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action SJ Park
` (6 subsequent siblings)
7 siblings, 2 replies; 22+ messages in thread
From: SJ Park @ 2026-11-29 19:14 UTC (permalink / raw)
To: Andrew Morton; +Cc: SJ Park, damon, linux-mm
damos_va_migrate_pmd_entry() finds folios to migrate under the given
pmd, using a loop for the pmd address range. The loop advances in page
size if a given folio is excluded by DAMOS ops filters. DAMOS ops
filters work in folio granularity. Hence it is more efficient and makes
sense to advance in the folio size.
Advance the loop in folio size for the ops filter out decision. For
that, do the folio size based loop advancement offset update before
applying DAMOS ops filters.
Closes: https://sashiko.dev/#/bug/linux-67c34df7-6dfb-4e18-9ce0-0d26915e5785
Signed-off-by: SJ Park <sj@kernel.org>
---
mm/damon/vaddr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index 750e643e020f..ca7ce9bd96e7 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -883,12 +883,12 @@ static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
folio = vm_normal_folio(walk->vma, addr, ptent);
if (!folio)
continue;
+ page_idx = folio_page_idx(folio, pte_page(ptent));
+ nr = folio_nr_pages(folio) - page_idx;
if (damos_va_filter_out(s, folio, walk->vma, addr, pte, NULL))
continue;
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
migration_lists);
- page_idx = folio_page_idx(folio, pte_page(ptent));
- nr = folio_nr_pages(folio) - page_idx;
}
pte_unmap_unlock(start_pte, ptl);
return 0;
--
2.47.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action
2026-11-29 19:14 [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
2026-11-29 19:14 ` [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out SJ Park
@ 2026-11-29 19:14 ` SJ Park
2026-11-29 20:26 ` + mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch added to mm-unstable branch Andrew Morton
2026-12-01 16:31 ` [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action Enze Li
2026-11-29 19:14 ` [PATCH 3/7] mm/damon/vaddr: implement sz_filter_passed for migrate_{hot,cold} action SJ Park
` (5 subsequent siblings)
7 siblings, 2 replies; 22+ messages in thread
From: SJ Park @ 2026-11-29 19:14 UTC (permalink / raw)
To: Andrew Morton; +Cc: SJ Park, damon, linux-mm
To avoid applying the same DAMOS action multiple times to folios that
are located across adjacent regions, damos->last_applied was introduced.
DAMOS_MIGRATE_{HOT,COLD} action support in vaddr is not utilizing it.
Use it to avoid unnecessarily applying the same action to the same folio
multiple times.
Signed-off-by: SJ Park <sj@kernel.org>
---
mm/damon/vaddr.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index ca7ce9bd96e7..fd649cd335c9 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -837,6 +837,12 @@ static void damos_va_migrate_dests_add(struct folio *folio,
list_add(&folio->lru, &migration_lists[i]);
}
+static inline bool damos_va_invalid_folio(struct folio *folio,
+ struct damos *s)
+{
+ return !folio || folio == s->last_applied;
+}
+
static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
unsigned long next, struct mm_walk *walk)
{
@@ -856,8 +862,9 @@ static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
if (!pmd_present(pmde))
goto huge_out;
folio = vm_normal_folio_pmd(walk->vma, addr, pmde);
- if (!folio)
+ if (damos_va_invalid_folio(folio, s))
goto huge_out;
+ s->last_applied = folio;
if (damos_va_filter_out(s, folio, walk->vma, addr, NULL, pmd))
goto huge_out;
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
@@ -885,6 +892,9 @@ static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
continue;
page_idx = folio_page_idx(folio, pte_page(ptent));
nr = folio_nr_pages(folio) - page_idx;
+ if (damos_va_invalid_folio(folio, s))
+ continue;
+ s->last_applied = folio;
if (damos_va_filter_out(s, folio, walk->vma, addr, pte, NULL))
continue;
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
@@ -993,12 +1003,6 @@ struct damos_va_stat_private {
unsigned long *sz_filter_passed;
};
-static inline bool damos_va_invalid_folio(struct folio *folio,
- struct damos *s)
-{
- return !folio || folio == s->last_applied;
-}
-
static int damos_va_stat_pmd_entry(pmd_t *pmd, unsigned long addr,
unsigned long next, struct mm_walk *walk)
{
--
2.47.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 3/7] mm/damon/vaddr: implement sz_filter_passed for migrate_{hot,cold} action
2026-11-29 19:14 [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
2026-11-29 19:14 ` [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out SJ Park
2026-11-29 19:14 ` [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action SJ Park
@ 2026-11-29 19:14 ` SJ Park
2026-11-29 20:26 ` + mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch added to mm-unstable branch Andrew Morton
2026-11-29 19:14 ` [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check SJ Park
` (4 subsequent siblings)
7 siblings, 1 reply; 22+ messages in thread
From: SJ Park @ 2026-11-29 19:14 UTC (permalink / raw)
To: Andrew Morton; +Cc: SJ Park, damon, linux-mm
Support of DAMOS ops filter and sz_filter_passed support is up to each
operation set. DAMON_VADDR supports both for only damos_stat action.
It intentionally does not support those for madvise-based actions
because applying filters could make it unnecessarily complicated and
expensive. The vaddr implementation of migrate_{hot,cold} action does
support DAMOS ops filters but sz_filter_passed. There is no real reason
to not support sz_filter_passed. Add the support.
Pass the sz_filter_passed pointer to the filter applying logic and
accumulate the number.
Closes: https://sashiko.dev/#/bug/linux-986e8b64-8e65-4e32-970f-4d3ebdf8206e
Signed-off-by: SJ Park <sj@kernel.org>
---
mm/damon/vaddr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index fd649cd335c9..170f77f74e84 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -776,6 +776,7 @@ static bool damos_va_filter_out(struct damos *scheme, struct folio *folio,
struct damos_va_migrate_private {
struct list_head *migration_lists;
struct damos *scheme;
+ unsigned long *sz_filter_passed;
};
/*
@@ -849,6 +850,7 @@ static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
struct damos_va_migrate_private *priv = walk->private;
struct list_head *migration_lists = priv->migration_lists;
struct damos *s = priv->scheme;
+ unsigned long *sz_filter_passed = priv->sz_filter_passed;
struct folio *folio;
spinlock_t *ptl;
pte_t *start_pte, *pte, ptent;
@@ -867,6 +869,7 @@ static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
s->last_applied = folio;
if (damos_va_filter_out(s, folio, walk->vma, addr, NULL, pmd))
goto huge_out;
+ *sz_filter_passed += folio_size(folio);
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
migration_lists);
huge_out:
@@ -897,6 +900,7 @@ static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
s->last_applied = folio;
if (damos_va_filter_out(s, folio, walk->vma, addr, pte, NULL))
continue;
+ *sz_filter_passed += folio_size(folio);
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
migration_lists);
}
@@ -975,6 +979,7 @@ static unsigned long damos_va_migrate(struct damon_target *target,
priv.migration_lists = kmalloc_objs(*priv.migration_lists, nr_dests);
if (!priv.migration_lists)
return 0;
+ priv.sz_filter_passed = sz_filter_passed;
for (int i = 0; i < nr_dests; i++)
INIT_LIST_HEAD(&priv.migration_lists[i]);
--
2.47.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check
2026-11-29 19:14 [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
` (2 preceding siblings ...)
2026-11-29 19:14 ` [PATCH 3/7] mm/damon/vaddr: implement sz_filter_passed for migrate_{hot,cold} action SJ Park
@ 2026-11-29 19:14 ` SJ Park
2026-11-29 20:26 ` + mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch added to mm-unstable branch Andrew Morton
2026-12-01 6:30 ` [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check Enze Li
2026-11-29 19:14 ` [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables SJ Park
` (3 subsequent siblings)
7 siblings, 2 replies; 22+ messages in thread
From: SJ Park @ 2026-11-29 19:14 UTC (permalink / raw)
To: Andrew Morton; +Cc: SJ Park, damon, linux-mm
DAMON sysfs interface disallowed zero target_value because it could
result in divide-by-zero in damos_quota_store(). Because similar checks
were duplicated to other DAMON API callers, a patch series that starts
with commit 610c4438fb66 ("mm/damon/core: error
damos_commit_quota_goal() for zero target_value") added a same check in
the core layer central parameters, and dropped redundant checks in
DAMON_LRU_SORT and DAMON_SAMPLIE_MTIER. It forgot to drop that in the
DAMON sysfs interface.
Now the zero target_value check in DAMON sysfs interface is only
redundant. Further, it has a time-of-check to time-of-use (toctou) race
with target_value_store(). It can confuse readers to believe [1] the
division-by-zero can still happen. Drop the redundant and racy check.
[1] https://lore.kernel.org/20261021005234.94107-1-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
---
mm/damon/sysfs-schemes.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c
index 750f70f0c31b..b0d07994f6c0 100644
--- a/mm/damon/sysfs-schemes.c
+++ b/mm/damon/sysfs-schemes.c
@@ -2917,9 +2917,6 @@ static int damos_sysfs_add_quota_score(
struct damos_sysfs_quota_goal *sysfs_goal =
sysfs_goals->goals_arr[i];
- if (!sysfs_goal->target_value)
- continue;
-
goal = damos_new_quota_goal(sysfs_goal->metric,
sysfs_goal->complement,
sysfs_goal->target_value);
--
2.47.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables
2026-11-29 19:14 [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
` (3 preceding siblings ...)
2026-11-29 19:14 ` [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check SJ Park
@ 2026-11-29 19:14 ` SJ Park
2026-11-29 20:26 ` + selftests-damon-damos_apply_interval-remove-unused-variables.patch added to mm-unstable branch Andrew Morton
2026-12-01 4:27 ` [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables Enze Li
2026-11-29 19:14 ` [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules SJ Park
` (2 subsequent siblings)
7 siblings, 2 replies; 22+ messages in thread
From: SJ Park @ 2026-11-29 19:14 UTC (permalink / raw)
To: Andrew Morton; +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] 22+ messages in thread
* [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules
2026-11-29 19:14 [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
` (4 preceding siblings ...)
2026-11-29 19:14 ` [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables SJ Park
@ 2026-11-29 19:14 ` SJ Park
2026-11-29 20:26 ` + selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch added to mm-unstable branch Andrew Morton
2026-11-30 14:30 ` [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules Enze Li
2026-11-29 19:14 ` [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON SJ Park
2026-11-29 19:21 ` [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments sashiko-bot
7 siblings, 2 replies; 22+ messages in thread
From: SJ Park @ 2026-11-29 19:14 UTC (permalink / raw)
To: Andrew Morton; +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] 22+ messages in thread
* [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON
2026-11-29 19:14 [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
` (5 preceding siblings ...)
2026-11-29 19:14 ` [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules SJ Park
@ 2026-11-29 19:14 ` SJ Park
2026-11-29 20:26 ` + mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch added to mm-unstable branch Andrew Morton
2026-11-30 9:30 ` [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON Enze Li
2026-11-29 19:21 ` [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments sashiko-bot
7 siblings, 2 replies; 22+ messages in thread
From: SJ Park @ 2026-11-29 19:14 UTC (permalink / raw)
To: Andrew Morton; +Cc: SJ Park, damon, linux-mm
DAMON source file intro comments call DAMON as Data Access Monitor.
Since the introduction of DAMOS, DAMON has been somewhat more than a
Data Access Monitor. Update the comments to call it just DAMON. Also
some of the comments are not appropriate. Update those together.
Signed-off-by: SJ Park <sj@kernel.org>
---
mm/damon/core.c | 2 +-
mm/damon/ops-common.c | 2 +-
mm/damon/ops-common.h | 2 +-
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 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 5eac19ed99b1..cccd9910a963 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Data Access Monitor
+ * DAMON Core
*/
#define pr_fmt(fmt) "damon: " fmt
diff --git a/mm/damon/ops-common.c b/mm/damon/ops-common.c
index 2216a0023154..38720794c9fc 100644
--- a/mm/damon/ops-common.c
+++ b/mm/damon/ops-common.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Common Code for Data Access Monitoring
+ * Common Code for DAMON Operation Set
*/
#include <linux/hugetlb.h>
diff --git a/mm/damon/ops-common.h b/mm/damon/ops-common.h
index ee2705825100..aabcf09ff501 100644
--- a/mm/damon/ops-common.h
+++ b/mm/damon/ops-common.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Common Code for Data Access Monitoring
+ * Common Code for DAMON Operation Set
*/
#include <linux/damon.h>
diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
index 4446574a3565..73c3bd6a9612 100644
--- a/mm/damon/tests/core-kunit.h
+++ b/mm/damon/tests/core-kunit.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Data Access Monitor Unit Tests
+ * DAMON Core Unit Tests
*/
#ifdef CONFIG_DAMON_KUNIT_TEST
diff --git a/mm/damon/tests/paddr-kunit.h b/mm/damon/tests/paddr-kunit.h
index 2b11f0e67a12..547e1b3c989f 100644
--- a/mm/damon/tests/paddr-kunit.h
+++ b/mm/damon/tests/paddr-kunit.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Data Access Monitor Unit Tests
+ * DAMON Physical Address Space Operation Set Unit Tests
*/
#ifdef CONFIG_DAMON_PADDR_KUNIT_TEST
diff --git a/mm/damon/tests/sysfs-kunit.h b/mm/damon/tests/sysfs-kunit.h
index 16373ba751db..c2bba2e01301 100644
--- a/mm/damon/tests/sysfs-kunit.h
+++ b/mm/damon/tests/sysfs-kunit.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Data Access Monitor Unit Tests
+ * DAMON sysfs Interface Unit Tests
*/
#ifdef CONFIG_DAMON_SYSFS_KUNIT_TEST
diff --git a/mm/damon/tests/vaddr-kunit.h b/mm/damon/tests/vaddr-kunit.h
index d61b503e319a..979e459327bf 100644
--- a/mm/damon/tests/vaddr-kunit.h
+++ b/mm/damon/tests/vaddr-kunit.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Data Access Monitor Unit Tests
+ * DAMON Virtual Address Space Operation Set Unit Tests
*/
#ifdef CONFIG_DAMON_VADDR_KUNIT_TEST
--
2.47.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments
2026-11-29 19:14 [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
` (6 preceding siblings ...)
2026-11-29 19:14 ` [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON SJ Park
@ 2026-11-29 19:21 ` sashiko-bot
7 siblings, 0 replies; 22+ messages in thread
From: sashiko-bot @ 2026-11-29 19:21 UTC (permalink / raw)
To: SJ Park; +Cc: damon
Sashiko has reviewed this 7-patch series and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261129191416.92575-1-sj@kernel.org
^ permalink raw reply [flat|nested] 22+ messages in thread
* + mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch added to mm-unstable branch
2026-11-29 19:14 ` [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out SJ Park
@ 2026-11-29 20:26 ` Andrew Morton
2026-12-01 2:44 ` [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Andrew Morton @ 2026-11-29 20:26 UTC (permalink / raw)
To: mm-commits, sj, akpm
The patch titled
Subject: mm/damon/vaddr: advance migration attempt in folio level for filter out
has been added to the -mm mm-unstable branch. Its filename is
mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: SJ Park <sj@kernel.org>
Subject: mm/damon/vaddr: advance migration attempt in folio level for filter out
Date: Sun, 29 Nov 2026 11:14:09 -0800
Patch series "mm/damon: various improvements/cleanups for code, tests and
comments".
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.
This patch (of 7):
damos_va_migrate_pmd_entry() finds folios to migrate under the given
pmd, using a loop for the pmd address range. The loop advances in page
size if a given folio is excluded by DAMOS ops filters. DAMOS ops
filters work in folio granularity. Hence it is more efficient and makes
sense to advance in the folio size.
Advance the loop in folio size for the ops filter out decision. For
that, do the folio size based loop advancement offset update before
applying DAMOS ops filters.
Link: https://lore.kernel.org/20261129191416.92575-1-sj@kernel.org
Link: https://patch.msgid.link/20261129191416.92575-2-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Closes: https://sashiko.dev/#/bug/linux-67c34df7-6dfb-4e18-9ce0-0d26915e5785
mm/damon/vaddr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/damon/vaddr.c~mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out
+++ a/mm/damon/vaddr.c
@@ -883,12 +883,12 @@ huge_out:
folio = vm_normal_folio(walk->vma, addr, ptent);
if (!folio)
continue;
+ page_idx = folio_page_idx(folio, pte_page(ptent));
+ nr = folio_nr_pages(folio) - page_idx;
if (damos_va_filter_out(s, folio, walk->vma, addr, pte, NULL))
continue;
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
migration_lists);
- page_idx = folio_page_idx(folio, pte_page(ptent));
- nr = folio_nr_pages(folio) - page_idx;
}
pte_unmap_unlock(start_pte, ptl);
return 0;
_
Patches currently in -mm which might be from sj@kernel.org are
mm-damon-core-let-kdamond-freezable.patch
mm-damon-core-cleanup-damos-walk_completed-in-damos_walk_cancel.patch
mm-damon-core-do-not-update-stat-for-core-filter-rejecting-region.patch
mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch
mm-damon-core-add-damos_filter_type_age_ms.patch
mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch
docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch
mm-damon-api-define-damon_filter_type_active.patch
mm-damon-ops-common-implement-damon_filter_type_active-operation.patch
mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch
docs-mm-damon-design-update-for-damon_filter_type_active.patch
maintainers-change-damon-scm-tree-to-mm-damongit.patch
docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch
docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch
docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch
mm-damon-api-introduce-struct-damon_report.patch
mm-damon-core-implement-data-attribute-report-queue.patch
mm-damon-core-introduce-damon_submit_report.patch
mm-damon-sysfs-add-admin-reports-directory.patch
mm-damon-sysfs-add-reports-producers-directory.patch
mm-damon-sysfs-add-producers-nr_producers-file.patch
mm-damon-sysfs-implement-report-producer-directory.patch
mm-damon-sysfs-implement-report-producer-type-and-state-files.patch
docs-mm-damon-design-update-for-report-system.patch
docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch
docs-abi-damon-update-for-report-producer-sysfs-files.patch
mm-damon-core-introduce-damon_filter_type_report_made.patch
mm-damon-core-introduce-damon_report_exist.patch
mm-damon-paddr-support-report_made-type-probe-filter.patch
mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch
mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch
docs-mm-damon-design-update-for-report_made-probe-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch
docs-abi-damon-update-for-report_made-probe-filter.patch
mm-damon-api-introduce-user_report-report-type.patch
mm-damon-sysfs-add-user_report-support-for-report-type-input.patch
mm-damon-sysfs-implement-report-producer-addr_startend-files.patch
mm-damon-sysfs-implement-submit-command-for-report-producer.patch
selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch
docs-mm-damon-design-update-for-user-report-support.patch
docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch
docs-abi-damon-update-for-user_report-report-support.patch
mm-damon-sysfs-define-damon_sysfs_cmd_name-type-and-array.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_store.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_show.patch
mm-damon-sysfs-remove-damon_sysfs_cmd_strs-and-nr_damon_sysfs_cmds.patch
mm-damon-kconfig-update-for-features-other-than-access-monitoring.patch
mm-damon-kconfig-clarify-kunit-scope-of-kunit-configs.patch
mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch
mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch
mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch
mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch
selftests-damon-damos_apply_interval-remove-unused-variables.patch
selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch
mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch
^ permalink raw reply [flat|nested] 22+ messages in thread
* + mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch added to mm-unstable branch
2026-11-29 19:14 ` [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action SJ Park
@ 2026-11-29 20:26 ` Andrew Morton
2026-12-01 16:31 ` [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Andrew Morton @ 2026-11-29 20:26 UTC (permalink / raw)
To: mm-commits, sj, akpm
The patch titled
Subject: mm/damon/vaddr: use damos->last_applied for migrate action
has been added to the -mm mm-unstable branch. Its filename is
mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: SJ Park <sj@kernel.org>
Subject: mm/damon/vaddr: use damos->last_applied for migrate action
Date: Sun, 29 Nov 2026 11:14:10 -0800
To avoid applying the same DAMOS action multiple times to folios that
are located across adjacent regions, damos->last_applied was introduced.
DAMOS_MIGRATE_{HOT,COLD} action support in vaddr is not utilizing it.
Use it to avoid unnecessarily applying the same action to the same folio
multiple times.
Link: https://patch.msgid.link/20261129191416.92575-3-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/vaddr.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
--- a/mm/damon/vaddr.c~mm-damon-vaddr-use-damos-last_applied-for-migrate-action
+++ a/mm/damon/vaddr.c
@@ -837,6 +837,12 @@ check_nid:
list_add(&folio->lru, &migration_lists[i]);
}
+static inline bool damos_va_invalid_folio(struct folio *folio,
+ struct damos *s)
+{
+ return !folio || folio == s->last_applied;
+}
+
static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
unsigned long next, struct mm_walk *walk)
{
@@ -856,8 +862,9 @@ static int damos_va_migrate_pmd_entry(pm
if (!pmd_present(pmde))
goto huge_out;
folio = vm_normal_folio_pmd(walk->vma, addr, pmde);
- if (!folio)
+ if (damos_va_invalid_folio(folio, s))
goto huge_out;
+ s->last_applied = folio;
if (damos_va_filter_out(s, folio, walk->vma, addr, NULL, pmd))
goto huge_out;
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
@@ -885,6 +892,9 @@ huge_out:
continue;
page_idx = folio_page_idx(folio, pte_page(ptent));
nr = folio_nr_pages(folio) - page_idx;
+ if (damos_va_invalid_folio(folio, s))
+ continue;
+ s->last_applied = folio;
if (damos_va_filter_out(s, folio, walk->vma, addr, pte, NULL))
continue;
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
@@ -993,12 +1003,6 @@ struct damos_va_stat_private {
unsigned long *sz_filter_passed;
};
-static inline bool damos_va_invalid_folio(struct folio *folio,
- struct damos *s)
-{
- return !folio || folio == s->last_applied;
-}
-
static int damos_va_stat_pmd_entry(pmd_t *pmd, unsigned long addr,
unsigned long next, struct mm_walk *walk)
{
_
Patches currently in -mm which might be from sj@kernel.org are
mm-damon-core-let-kdamond-freezable.patch
mm-damon-core-cleanup-damos-walk_completed-in-damos_walk_cancel.patch
mm-damon-core-do-not-update-stat-for-core-filter-rejecting-region.patch
mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch
mm-damon-core-add-damos_filter_type_age_ms.patch
mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch
docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch
mm-damon-api-define-damon_filter_type_active.patch
mm-damon-ops-common-implement-damon_filter_type_active-operation.patch
mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch
docs-mm-damon-design-update-for-damon_filter_type_active.patch
maintainers-change-damon-scm-tree-to-mm-damongit.patch
docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch
docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch
docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch
mm-damon-api-introduce-struct-damon_report.patch
mm-damon-core-implement-data-attribute-report-queue.patch
mm-damon-core-introduce-damon_submit_report.patch
mm-damon-sysfs-add-admin-reports-directory.patch
mm-damon-sysfs-add-reports-producers-directory.patch
mm-damon-sysfs-add-producers-nr_producers-file.patch
mm-damon-sysfs-implement-report-producer-directory.patch
mm-damon-sysfs-implement-report-producer-type-and-state-files.patch
docs-mm-damon-design-update-for-report-system.patch
docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch
docs-abi-damon-update-for-report-producer-sysfs-files.patch
mm-damon-core-introduce-damon_filter_type_report_made.patch
mm-damon-core-introduce-damon_report_exist.patch
mm-damon-paddr-support-report_made-type-probe-filter.patch
mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch
mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch
docs-mm-damon-design-update-for-report_made-probe-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch
docs-abi-damon-update-for-report_made-probe-filter.patch
mm-damon-api-introduce-user_report-report-type.patch
mm-damon-sysfs-add-user_report-support-for-report-type-input.patch
mm-damon-sysfs-implement-report-producer-addr_startend-files.patch
mm-damon-sysfs-implement-submit-command-for-report-producer.patch
selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch
docs-mm-damon-design-update-for-user-report-support.patch
docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch
docs-abi-damon-update-for-user_report-report-support.patch
mm-damon-sysfs-define-damon_sysfs_cmd_name-type-and-array.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_store.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_show.patch
mm-damon-sysfs-remove-damon_sysfs_cmd_strs-and-nr_damon_sysfs_cmds.patch
mm-damon-kconfig-update-for-features-other-than-access-monitoring.patch
mm-damon-kconfig-clarify-kunit-scope-of-kunit-configs.patch
mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch
mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch
mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch
mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch
selftests-damon-damos_apply_interval-remove-unused-variables.patch
selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch
mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch
^ permalink raw reply [flat|nested] 22+ messages in thread
* + mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch added to mm-unstable branch
2026-11-29 19:14 ` [PATCH 3/7] mm/damon/vaddr: implement sz_filter_passed for migrate_{hot,cold} action SJ Park
@ 2026-11-29 20:26 ` Andrew Morton
0 siblings, 0 replies; 22+ messages in thread
From: Andrew Morton @ 2026-11-29 20:26 UTC (permalink / raw)
To: mm-commits, sj, akpm
The patch titled
Subject: mm/damon/vaddr: implement sz_filter_passed for migrate_{hot,cold} action
has been added to the -mm mm-unstable branch. Its filename is
mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: SJ Park <sj@kernel.org>
Subject: mm/damon/vaddr: implement sz_filter_passed for migrate_{hot,cold} action
Date: Sun, 29 Nov 2026 11:14:11 -0800
Support of DAMOS ops filter and sz_filter_passed support is up to each
operation set. DAMON_VADDR supports both for only damos_stat action.
It intentionally does not support those for madvise-based actions
because applying filters could make it unnecessarily complicated and
expensive. The vaddr implementation of migrate_{hot,cold} action does
support DAMOS ops filters but sz_filter_passed. There is no real reason
to not support sz_filter_passed. Add the support.
Pass the sz_filter_passed pointer to the filter applying logic and
accumulate the number.
Link: https://patch.msgid.link/20261129191416.92575-4-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Closes: https://sashiko.dev/#/bug/linux-986e8b64-8e65-4e32-970f-4d3ebdf8206e
mm/damon/vaddr.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/mm/damon/vaddr.c~mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action
+++ a/mm/damon/vaddr.c
@@ -776,6 +776,7 @@ static bool damos_va_filter_out(struct d
struct damos_va_migrate_private {
struct list_head *migration_lists;
struct damos *scheme;
+ unsigned long *sz_filter_passed;
};
/*
@@ -849,6 +850,7 @@ static int damos_va_migrate_pmd_entry(pm
struct damos_va_migrate_private *priv = walk->private;
struct list_head *migration_lists = priv->migration_lists;
struct damos *s = priv->scheme;
+ unsigned long *sz_filter_passed = priv->sz_filter_passed;
struct folio *folio;
spinlock_t *ptl;
pte_t *start_pte, *pte, ptent;
@@ -867,6 +869,7 @@ static int damos_va_migrate_pmd_entry(pm
s->last_applied = folio;
if (damos_va_filter_out(s, folio, walk->vma, addr, NULL, pmd))
goto huge_out;
+ *sz_filter_passed += folio_size(folio);
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
migration_lists);
huge_out:
@@ -897,6 +900,7 @@ huge_out:
s->last_applied = folio;
if (damos_va_filter_out(s, folio, walk->vma, addr, pte, NULL))
continue;
+ *sz_filter_passed += folio_size(folio);
damos_va_migrate_dests_add(folio, walk->vma, addr, s,
migration_lists);
}
@@ -975,6 +979,7 @@ static unsigned long damos_va_migrate(st
priv.migration_lists = kmalloc_objs(*priv.migration_lists, nr_dests);
if (!priv.migration_lists)
return 0;
+ priv.sz_filter_passed = sz_filter_passed;
for (int i = 0; i < nr_dests; i++)
INIT_LIST_HEAD(&priv.migration_lists[i]);
_
Patches currently in -mm which might be from sj@kernel.org are
mm-damon-core-let-kdamond-freezable.patch
mm-damon-core-cleanup-damos-walk_completed-in-damos_walk_cancel.patch
mm-damon-core-do-not-update-stat-for-core-filter-rejecting-region.patch
mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch
mm-damon-core-add-damos_filter_type_age_ms.patch
mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch
docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch
mm-damon-api-define-damon_filter_type_active.patch
mm-damon-ops-common-implement-damon_filter_type_active-operation.patch
mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch
docs-mm-damon-design-update-for-damon_filter_type_active.patch
maintainers-change-damon-scm-tree-to-mm-damongit.patch
docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch
docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch
docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch
mm-damon-api-introduce-struct-damon_report.patch
mm-damon-core-implement-data-attribute-report-queue.patch
mm-damon-core-introduce-damon_submit_report.patch
mm-damon-sysfs-add-admin-reports-directory.patch
mm-damon-sysfs-add-reports-producers-directory.patch
mm-damon-sysfs-add-producers-nr_producers-file.patch
mm-damon-sysfs-implement-report-producer-directory.patch
mm-damon-sysfs-implement-report-producer-type-and-state-files.patch
docs-mm-damon-design-update-for-report-system.patch
docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch
docs-abi-damon-update-for-report-producer-sysfs-files.patch
mm-damon-core-introduce-damon_filter_type_report_made.patch
mm-damon-core-introduce-damon_report_exist.patch
mm-damon-paddr-support-report_made-type-probe-filter.patch
mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch
mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch
docs-mm-damon-design-update-for-report_made-probe-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch
docs-abi-damon-update-for-report_made-probe-filter.patch
mm-damon-api-introduce-user_report-report-type.patch
mm-damon-sysfs-add-user_report-support-for-report-type-input.patch
mm-damon-sysfs-implement-report-producer-addr_startend-files.patch
mm-damon-sysfs-implement-submit-command-for-report-producer.patch
selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch
docs-mm-damon-design-update-for-user-report-support.patch
docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch
docs-abi-damon-update-for-user_report-report-support.patch
mm-damon-sysfs-define-damon_sysfs_cmd_name-type-and-array.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_store.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_show.patch
mm-damon-sysfs-remove-damon_sysfs_cmd_strs-and-nr_damon_sysfs_cmds.patch
mm-damon-kconfig-update-for-features-other-than-access-monitoring.patch
mm-damon-kconfig-clarify-kunit-scope-of-kunit-configs.patch
mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch
mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch
mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch
mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch
selftests-damon-damos_apply_interval-remove-unused-variables.patch
selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch
mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch
^ permalink raw reply [flat|nested] 22+ messages in thread
* + mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch added to mm-unstable branch
2026-11-29 19:14 ` [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check SJ Park
@ 2026-11-29 20:26 ` Andrew Morton
2026-12-01 6:30 ` [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Andrew Morton @ 2026-11-29 20:26 UTC (permalink / raw)
To: mm-commits, sj, akpm
The patch titled
Subject: mm/damon/sysfs-schemes: drop redundant and racy zero target_value check
has been added to the -mm mm-unstable branch. Its filename is
mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: SJ Park <sj@kernel.org>
Subject: mm/damon/sysfs-schemes: drop redundant and racy zero target_value check
Date: Sun, 29 Nov 2026 11:14:12 -0800
DAMON sysfs interface disallowed zero target_value because it could
result in divide-by-zero in damos_quota_store(). Because similar checks
were duplicated to other DAMON API callers, a patch series that starts
with commit 610c4438fb66 ("mm/damon/core: error
damos_commit_quota_goal() for zero target_value") added a same check in
the core layer central parameters, and dropped redundant checks in
DAMON_LRU_SORT and DAMON_SAMPLIE_MTIER. It forgot to drop that in the
DAMON sysfs interface.
Now the zero target_value check in DAMON sysfs interface is only
redundant. Further, it has a time-of-check to time-of-use (toctou) race
with target_value_store(). It can confuse readers to believe [1] the
division-by-zero can still happen. Drop the redundant and racy check.
Link: https://patch.msgid.link/20261129191416.92575-5-sj@kernel.org
Link: https://lore.kernel.org/20261021005234.94107-1-sj@kernel.org [1]
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/sysfs-schemes.c | 3 ---
1 file changed, 3 deletions(-)
--- a/mm/damon/sysfs-schemes.c~mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check
+++ a/mm/damon/sysfs-schemes.c
@@ -2917,9 +2917,6 @@ static int damos_sysfs_add_quota_score(
struct damos_sysfs_quota_goal *sysfs_goal =
sysfs_goals->goals_arr[i];
- if (!sysfs_goal->target_value)
- continue;
-
goal = damos_new_quota_goal(sysfs_goal->metric,
sysfs_goal->complement,
sysfs_goal->target_value);
_
Patches currently in -mm which might be from sj@kernel.org are
mm-damon-core-let-kdamond-freezable.patch
mm-damon-core-cleanup-damos-walk_completed-in-damos_walk_cancel.patch
mm-damon-core-do-not-update-stat-for-core-filter-rejecting-region.patch
mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch
mm-damon-core-add-damos_filter_type_age_ms.patch
mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch
docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch
mm-damon-api-define-damon_filter_type_active.patch
mm-damon-ops-common-implement-damon_filter_type_active-operation.patch
mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch
docs-mm-damon-design-update-for-damon_filter_type_active.patch
maintainers-change-damon-scm-tree-to-mm-damongit.patch
docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch
docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch
docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch
mm-damon-api-introduce-struct-damon_report.patch
mm-damon-core-implement-data-attribute-report-queue.patch
mm-damon-core-introduce-damon_submit_report.patch
mm-damon-sysfs-add-admin-reports-directory.patch
mm-damon-sysfs-add-reports-producers-directory.patch
mm-damon-sysfs-add-producers-nr_producers-file.patch
mm-damon-sysfs-implement-report-producer-directory.patch
mm-damon-sysfs-implement-report-producer-type-and-state-files.patch
docs-mm-damon-design-update-for-report-system.patch
docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch
docs-abi-damon-update-for-report-producer-sysfs-files.patch
mm-damon-core-introduce-damon_filter_type_report_made.patch
mm-damon-core-introduce-damon_report_exist.patch
mm-damon-paddr-support-report_made-type-probe-filter.patch
mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch
mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch
docs-mm-damon-design-update-for-report_made-probe-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch
docs-abi-damon-update-for-report_made-probe-filter.patch
mm-damon-api-introduce-user_report-report-type.patch
mm-damon-sysfs-add-user_report-support-for-report-type-input.patch
mm-damon-sysfs-implement-report-producer-addr_startend-files.patch
mm-damon-sysfs-implement-submit-command-for-report-producer.patch
selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch
docs-mm-damon-design-update-for-user-report-support.patch
docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch
docs-abi-damon-update-for-user_report-report-support.patch
mm-damon-sysfs-define-damon_sysfs_cmd_name-type-and-array.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_store.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_show.patch
mm-damon-sysfs-remove-damon_sysfs_cmd_strs-and-nr_damon_sysfs_cmds.patch
mm-damon-kconfig-update-for-features-other-than-access-monitoring.patch
mm-damon-kconfig-clarify-kunit-scope-of-kunit-configs.patch
mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch
mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch
mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch
mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch
selftests-damon-damos_apply_interval-remove-unused-variables.patch
selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch
mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch
^ permalink raw reply [flat|nested] 22+ messages in thread
* + selftests-damon-damos_apply_interval-remove-unused-variables.patch added to mm-unstable branch
2026-11-29 19:14 ` [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables SJ Park
@ 2026-11-29 20:26 ` Andrew Morton
2026-12-01 4:27 ` [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Andrew Morton @ 2026-11-29 20:26 UTC (permalink / raw)
To: mm-commits, shuah, sj, akpm
The patch titled
Subject: selftests/damon/damos_apply_interval: remove unused variables
has been added to the -mm mm-unstable branch. Its filename is
selftests-damon-damos_apply_interval-remove-unused-variables.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-damon-damos_apply_interval-remove-unused-variables.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: SJ Park <sj@kernel.org>
Subject: selftests/damon/damos_apply_interval: remove unused variables
Date: Sun, 29 Nov 2026 11:14:13 -0800
wss_collected and nr_quota_exceeds in damos_apply_interval.py are
assigned to but never used. Remove.
The issue is found using flake8.
Link: https://patch.msgid.link/20261129191416.92575-6-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Shuah Khan <shuah@kernel.org>
tools/testing/selftests/damon/damos_apply_interval.py | 2 --
1 file changed, 2 deletions(-)
--- a/tools/testing/selftests/damon/damos_apply_interval.py~selftests-damon-damos_apply_interval-remove-unused-variables
+++ a/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()
_
Patches currently in -mm which might be from sj@kernel.org are
mm-damon-core-let-kdamond-freezable.patch
mm-damon-core-cleanup-damos-walk_completed-in-damos_walk_cancel.patch
mm-damon-core-do-not-update-stat-for-core-filter-rejecting-region.patch
mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch
mm-damon-core-add-damos_filter_type_age_ms.patch
mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch
docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch
mm-damon-api-define-damon_filter_type_active.patch
mm-damon-ops-common-implement-damon_filter_type_active-operation.patch
mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch
docs-mm-damon-design-update-for-damon_filter_type_active.patch
maintainers-change-damon-scm-tree-to-mm-damongit.patch
docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch
docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch
docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch
mm-damon-api-introduce-struct-damon_report.patch
mm-damon-core-implement-data-attribute-report-queue.patch
mm-damon-core-introduce-damon_submit_report.patch
mm-damon-sysfs-add-admin-reports-directory.patch
mm-damon-sysfs-add-reports-producers-directory.patch
mm-damon-sysfs-add-producers-nr_producers-file.patch
mm-damon-sysfs-implement-report-producer-directory.patch
mm-damon-sysfs-implement-report-producer-type-and-state-files.patch
docs-mm-damon-design-update-for-report-system.patch
docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch
docs-abi-damon-update-for-report-producer-sysfs-files.patch
mm-damon-core-introduce-damon_filter_type_report_made.patch
mm-damon-core-introduce-damon_report_exist.patch
mm-damon-paddr-support-report_made-type-probe-filter.patch
mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch
mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch
docs-mm-damon-design-update-for-report_made-probe-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch
docs-abi-damon-update-for-report_made-probe-filter.patch
mm-damon-api-introduce-user_report-report-type.patch
mm-damon-sysfs-add-user_report-support-for-report-type-input.patch
mm-damon-sysfs-implement-report-producer-addr_startend-files.patch
mm-damon-sysfs-implement-submit-command-for-report-producer.patch
selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch
docs-mm-damon-design-update-for-user-report-support.patch
docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch
docs-abi-damon-update-for-user_report-report-support.patch
mm-damon-sysfs-define-damon_sysfs_cmd_name-type-and-array.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_store.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_show.patch
mm-damon-sysfs-remove-damon_sysfs_cmd_strs-and-nr_damon_sysfs_cmds.patch
mm-damon-kconfig-update-for-features-other-than-access-monitoring.patch
mm-damon-kconfig-clarify-kunit-scope-of-kunit-configs.patch
mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch
mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch
mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch
mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch
selftests-damon-damos_apply_interval-remove-unused-variables.patch
selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch
mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch
^ permalink raw reply [flat|nested] 22+ messages in thread
* + selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch added to mm-unstable branch
2026-11-29 19:14 ` [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules SJ Park
@ 2026-11-29 20:26 ` Andrew Morton
2026-11-30 14:30 ` [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Andrew Morton @ 2026-11-29 20:26 UTC (permalink / raw)
To: mm-commits, shuah, sj, akpm
The patch titled
Subject: selftests/damon: remove unused imports of sys and time modules
has been added to the -mm mm-unstable branch. Its filename is
selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: SJ Park <sj@kernel.org>
Subject: selftests/damon: remove unused imports of sys and time modules
Date: Sun, 29 Nov 2026 11:14:14 -0800
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.
Link: https://patch.msgid.link/20261129191416.92575-7-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Shuah Khan <shuah@kernel.org>
tools/testing/selftests/damon/sysfs_no_op_commit_break.py | 1 -
tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_hang.py | 1 -
2 files changed, 2 deletions(-)
--- a/tools/testing/selftests/damon/sysfs_no_op_commit_break.py~selftests-damon-remove-unused-imports-of-sys-and-time-modules
+++ a/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
--- a/tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_hang.py~selftests-damon-remove-unused-imports-of-sys-and-time-modules
+++ a/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
_
Patches currently in -mm which might be from sj@kernel.org are
mm-damon-core-let-kdamond-freezable.patch
mm-damon-core-cleanup-damos-walk_completed-in-damos_walk_cancel.patch
mm-damon-core-do-not-update-stat-for-core-filter-rejecting-region.patch
mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch
mm-damon-core-add-damos_filter_type_age_ms.patch
mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch
docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch
mm-damon-api-define-damon_filter_type_active.patch
mm-damon-ops-common-implement-damon_filter_type_active-operation.patch
mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch
docs-mm-damon-design-update-for-damon_filter_type_active.patch
maintainers-change-damon-scm-tree-to-mm-damongit.patch
docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch
docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch
docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch
mm-damon-api-introduce-struct-damon_report.patch
mm-damon-core-implement-data-attribute-report-queue.patch
mm-damon-core-introduce-damon_submit_report.patch
mm-damon-sysfs-add-admin-reports-directory.patch
mm-damon-sysfs-add-reports-producers-directory.patch
mm-damon-sysfs-add-producers-nr_producers-file.patch
mm-damon-sysfs-implement-report-producer-directory.patch
mm-damon-sysfs-implement-report-producer-type-and-state-files.patch
docs-mm-damon-design-update-for-report-system.patch
docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch
docs-abi-damon-update-for-report-producer-sysfs-files.patch
mm-damon-core-introduce-damon_filter_type_report_made.patch
mm-damon-core-introduce-damon_report_exist.patch
mm-damon-paddr-support-report_made-type-probe-filter.patch
mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch
mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch
docs-mm-damon-design-update-for-report_made-probe-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch
docs-abi-damon-update-for-report_made-probe-filter.patch
mm-damon-api-introduce-user_report-report-type.patch
mm-damon-sysfs-add-user_report-support-for-report-type-input.patch
mm-damon-sysfs-implement-report-producer-addr_startend-files.patch
mm-damon-sysfs-implement-submit-command-for-report-producer.patch
selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch
docs-mm-damon-design-update-for-user-report-support.patch
docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch
docs-abi-damon-update-for-user_report-report-support.patch
mm-damon-sysfs-define-damon_sysfs_cmd_name-type-and-array.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_store.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_show.patch
mm-damon-sysfs-remove-damon_sysfs_cmd_strs-and-nr_damon_sysfs_cmds.patch
mm-damon-kconfig-update-for-features-other-than-access-monitoring.patch
mm-damon-kconfig-clarify-kunit-scope-of-kunit-configs.patch
mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch
mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch
mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch
mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch
selftests-damon-damos_apply_interval-remove-unused-variables.patch
selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch
mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch
^ permalink raw reply [flat|nested] 22+ messages in thread
* + mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch added to mm-unstable branch
2026-11-29 19:14 ` [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON SJ Park
@ 2026-11-29 20:26 ` Andrew Morton
2026-11-30 9:30 ` [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Andrew Morton @ 2026-11-29 20:26 UTC (permalink / raw)
To: mm-commits, sj, akpm
The patch titled
Subject: mm/damon: update file intro comments to call DAMON just DAMON
has been added to the -mm mm-unstable branch. Its filename is
mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: SJ Park <sj@kernel.org>
Subject: mm/damon: update file intro comments to call DAMON just DAMON
Date: Sun, 29 Nov 2026 11:14:15 -0800
DAMON source file intro comments call DAMON as Data Access Monitor.
Since the introduction of DAMOS, DAMON has been somewhat more than a
Data Access Monitor. Update the comments to call it just DAMON. Also
some of the comments are not appropriate. Update those together.
Link: https://patch.msgid.link/20261129191416.92575-8-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c | 2 +-
mm/damon/ops-common.c | 2 +-
mm/damon/ops-common.h | 2 +-
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 +-
7 files changed, 7 insertions(+), 7 deletions(-)
--- a/mm/damon/core.c~mm-damon-update-file-intro-comments-to-call-damon-just-damon
+++ a/mm/damon/core.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Data Access Monitor
+ * DAMON Core
*/
#define pr_fmt(fmt) "damon: " fmt
--- a/mm/damon/ops-common.c~mm-damon-update-file-intro-comments-to-call-damon-just-damon
+++ a/mm/damon/ops-common.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Common Code for Data Access Monitoring
+ * Common Code for DAMON Operation Set
*/
#include <linux/hugetlb.h>
--- a/mm/damon/ops-common.h~mm-damon-update-file-intro-comments-to-call-damon-just-damon
+++ a/mm/damon/ops-common.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Common Code for Data Access Monitoring
+ * Common Code for DAMON Operation Set
*/
#include <linux/damon.h>
--- a/mm/damon/tests/core-kunit.h~mm-damon-update-file-intro-comments-to-call-damon-just-damon
+++ a/mm/damon/tests/core-kunit.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Data Access Monitor Unit Tests
+ * DAMON Core Unit Tests
*/
#ifdef CONFIG_DAMON_KUNIT_TEST
--- a/mm/damon/tests/paddr-kunit.h~mm-damon-update-file-intro-comments-to-call-damon-just-damon
+++ a/mm/damon/tests/paddr-kunit.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Data Access Monitor Unit Tests
+ * DAMON Physical Address Space Operation Set Unit Tests
*/
#ifdef CONFIG_DAMON_PADDR_KUNIT_TEST
--- a/mm/damon/tests/sysfs-kunit.h~mm-damon-update-file-intro-comments-to-call-damon-just-damon
+++ a/mm/damon/tests/sysfs-kunit.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Data Access Monitor Unit Tests
+ * DAMON sysfs Interface Unit Tests
*/
#ifdef CONFIG_DAMON_SYSFS_KUNIT_TEST
--- a/mm/damon/tests/vaddr-kunit.h~mm-damon-update-file-intro-comments-to-call-damon-just-damon
+++ a/mm/damon/tests/vaddr-kunit.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Data Access Monitor Unit Tests
+ * DAMON Virtual Address Space Operation Set Unit Tests
*/
#ifdef CONFIG_DAMON_VADDR_KUNIT_TEST
_
Patches currently in -mm which might be from sj@kernel.org are
mm-damon-core-let-kdamond-freezable.patch
mm-damon-core-cleanup-damos-walk_completed-in-damos_walk_cancel.patch
mm-damon-core-do-not-update-stat-for-core-filter-rejecting-region.patch
mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch
mm-damon-core-add-damos_filter_type_age_ms.patch
mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch
docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch
mm-damon-api-define-damon_filter_type_active.patch
mm-damon-ops-common-implement-damon_filter_type_active-operation.patch
mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch
docs-mm-damon-design-update-for-damon_filter_type_active.patch
maintainers-change-damon-scm-tree-to-mm-damongit.patch
docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch
docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch
docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch
mm-damon-api-introduce-struct-damon_report.patch
mm-damon-core-implement-data-attribute-report-queue.patch
mm-damon-core-introduce-damon_submit_report.patch
mm-damon-sysfs-add-admin-reports-directory.patch
mm-damon-sysfs-add-reports-producers-directory.patch
mm-damon-sysfs-add-producers-nr_producers-file.patch
mm-damon-sysfs-implement-report-producer-directory.patch
mm-damon-sysfs-implement-report-producer-type-and-state-files.patch
docs-mm-damon-design-update-for-report-system.patch
docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch
docs-abi-damon-update-for-report-producer-sysfs-files.patch
mm-damon-core-introduce-damon_filter_type_report_made.patch
mm-damon-core-introduce-damon_report_exist.patch
mm-damon-paddr-support-report_made-type-probe-filter.patch
mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch
mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch
docs-mm-damon-design-update-for-report_made-probe-filter-type.patch
docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch
docs-abi-damon-update-for-report_made-probe-filter.patch
mm-damon-api-introduce-user_report-report-type.patch
mm-damon-sysfs-add-user_report-support-for-report-type-input.patch
mm-damon-sysfs-implement-report-producer-addr_startend-files.patch
mm-damon-sysfs-implement-submit-command-for-report-producer.patch
selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch
docs-mm-damon-design-update-for-user-report-support.patch
docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch
docs-abi-damon-update-for-user_report-report-support.patch
mm-damon-sysfs-define-damon_sysfs_cmd_name-type-and-array.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_store.patch
mm-damon-sysfs-use-damon_sysfs_cmd_names-in-state_show.patch
mm-damon-sysfs-remove-damon_sysfs_cmd_strs-and-nr_damon_sysfs_cmds.patch
mm-damon-kconfig-update-for-features-other-than-access-monitoring.patch
mm-damon-kconfig-clarify-kunit-scope-of-kunit-configs.patch
mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch
mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch
mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch
mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch
selftests-damon-damos_apply_interval-remove-unused-variables.patch
selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch
mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON
2026-11-29 19:14 ` [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON SJ Park
2026-11-29 20:26 ` + mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch added to mm-unstable branch Andrew Morton
@ 2026-11-30 9:30 ` Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Enze Li @ 2026-11-30 9:30 UTC (permalink / raw)
To: SJ Park, Andrew Morton; +Cc: damon, linux-mm
On 11/30/26 03:14, SJ Park wrote:
> DAMON source file intro comments call DAMON as Data Access Monitor.
> Since the introduction of DAMOS, DAMON has been somewhat more than a
> Data Access Monitor. Update the comments to call it just DAMON. Also
> some of the comments are not appropriate. Update those together.
>
> Signed-off-by: SJ Park <sj@kernel.org>
Reviewed-by: Enze Li <lienze@kylinos.cn>
Thanks,
Enze
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules
2026-11-29 19:14 ` [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules SJ Park
2026-11-29 20:26 ` + selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch added to mm-unstable branch Andrew Morton
@ 2026-11-30 14:30 ` Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Enze Li @ 2026-11-30 14:30 UTC (permalink / raw)
To: SJ Park, Andrew Morton; +Cc: Shuah Khan, damon, linux-kselftest, linux-mm
On 2026/11/30 03:14, SJ Park wrote:
> 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>
Tested on an x86_64 VM, no regression found.
Tested-by: Enze Li <lienze@kylinos.cn>
Reviewed-by: Enze Li <lienze@kylinos.cn>
Thanks,
Enze
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out
2026-11-29 19:14 ` [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out SJ Park
2026-11-29 20:26 ` + mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch added to mm-unstable branch Andrew Morton
@ 2026-12-01 2:44 ` Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Enze Li @ 2026-12-01 2:44 UTC (permalink / raw)
To: SJ Park, Andrew Morton; +Cc: damon, linux-mm
On 11/30/26 03:14, SJ Park wrote:
> damos_va_migrate_pmd_entry() finds folios to migrate under the given
> pmd, using a loop for the pmd address range. The loop advances in page
> size if a given folio is excluded by DAMOS ops filters. DAMOS ops
> filters work in folio granularity. Hence it is more efficient and makes
> sense to advance in the folio size.
>
> Advance the loop in folio size for the ops filter out decision. For
> that, do the folio size based loop advancement offset update before
> applying DAMOS ops filters.
>
> Closes: https://sashiko.dev/#/bug/linux-67c34df7-6dfb-4e18-9ce0-0d26915e5785
> Signed-off-by: SJ Park <sj@kernel.org>
Nice patch. LGTM, thank you!
Reviewed-by: Enze Li <lienze@kylinos.cn>
Thanks,
Enze
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables
2026-11-29 19:14 ` [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables SJ Park
2026-11-29 20:26 ` + selftests-damon-damos_apply_interval-remove-unused-variables.patch added to mm-unstable branch Andrew Morton
@ 2026-12-01 4:27 ` Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Enze Li @ 2026-12-01 4:27 UTC (permalink / raw)
To: SJ Park, Andrew Morton; +Cc: Shuah Khan, damon, linux-kselftest, linux-mm
Hi SJ,
I reproduced the flake8 warnings. Without this patch, running flake8 on
damos_apply_interval.py gives:
8<------------------------------------------------------
damos_apply_interval.py:45:5: F841 local variable 'wss_collected' is assigned to but never used
damos_apply_interval.py:46:5: F841 local variable 'nr_quota_exceeds' is assigned to but never used
----------------------------------------------------->8
On 11/30/26 03:14, SJ Park wrote:
> 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>
I also ran the script with this patch applied and it works as expected.
8<------------------------------------------------------
ok 6 selftests: damon: damos_apply_interval.py
# timeout set to 45
# selftests: damon: damos_tried_regions.py
# 50-th percentile nr_regions: 33
----------------------------------------------------->8
LGTM, thank you for cleaning this up.
Tested-by: Enze Li <lienze@kylinos.cn>
Reviewed-by: Enze Li <lienze@kylinos.cn>
Thanks,
Enze
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check
2026-11-29 19:14 ` [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check SJ Park
2026-11-29 20:26 ` + mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch added to mm-unstable branch Andrew Morton
@ 2026-12-01 6:30 ` Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Enze Li @ 2026-12-01 6:30 UTC (permalink / raw)
To: SJ Park, Andrew Morton; +Cc: damon, linux-mm
On 11/30/26 03:14, SJ Park wrote:
> DAMON sysfs interface disallowed zero target_value because it could
> result in divide-by-zero in damos_quota_store(). Because similar checks
> were duplicated to other DAMON API callers, a patch series that starts
> with commit 610c4438fb66 ("mm/damon/core: error
> damos_commit_quota_goal() for zero target_value") added a same check in
> the core layer central parameters, and dropped redundant checks in
> DAMON_LRU_SORT and DAMON_SAMPLIE_MTIER. It forgot to drop that in the
> DAMON sysfs interface.
>
> Now the zero target_value check in DAMON sysfs interface is only
> redundant. Further, it has a time-of-check to time-of-use (toctou) race
> with target_value_store(). It can confuse readers to believe [1] the
> division-by-zero can still happen. Drop the redundant and racy check.
>
> [1] https://lore.kernel.org/20261021005234.94107-1-sj@kernel.org
>
> Signed-off-by: SJ Park <sj@kernel.org>
Reviewed-by: Enze Li <lienze@kylinos.cn>
Thanks,
Enze
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action
2026-11-29 19:14 ` [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action SJ Park
2026-11-29 20:26 ` + mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch added to mm-unstable branch Andrew Morton
@ 2026-12-01 16:31 ` Enze Li
1 sibling, 0 replies; 22+ messages in thread
From: Enze Li @ 2026-12-01 16:31 UTC (permalink / raw)
To: SJ Park, Andrew Morton; +Cc: damon, linux-mm
On 2026/11/30 03:14, SJ Park wrote:
> To avoid applying the same DAMOS action multiple times to folios that
> are located across adjacent regions, damos->last_applied was introduced.
> DAMOS_MIGRATE_{HOT,COLD} action support in vaddr is not utilizing it.
> Use it to avoid unnecessarily applying the same action to the same folio
> multiple times.
>
> Signed-off-by: SJ Park <sj@kernel.org>
Nice work! LGTM, thank you :)
Reviewed-by: Enze Li <lienze@kylinos.cn>
Thanks,
Enze
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2026-12-01 16:31 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 19:14 [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments SJ Park
2026-11-29 19:14 ` [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out SJ Park
2026-11-29 20:26 ` + mm-damon-vaddr-advance-migration-attempt-in-folio-level-for-filter-out.patch added to mm-unstable branch Andrew Morton
2026-12-01 2:44 ` [PATCH 1/7] mm/damon/vaddr: advance migration attempt in folio level for filter out Enze Li
2026-11-29 19:14 ` [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action SJ Park
2026-11-29 20:26 ` + mm-damon-vaddr-use-damos-last_applied-for-migrate-action.patch added to mm-unstable branch Andrew Morton
2026-12-01 16:31 ` [PATCH 2/7] mm/damon/vaddr: use damos->last_applied for migrate action Enze Li
2026-11-29 19:14 ` [PATCH 3/7] mm/damon/vaddr: implement sz_filter_passed for migrate_{hot,cold} action SJ Park
2026-11-29 20:26 ` + mm-damon-vaddr-implement-sz_filter_passed-for-migrate_hotcold-action.patch added to mm-unstable branch Andrew Morton
2026-11-29 19:14 ` [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check SJ Park
2026-11-29 20:26 ` + mm-damon-sysfs-schemes-drop-redundant-and-racy-zero-target_value-check.patch added to mm-unstable branch Andrew Morton
2026-12-01 6:30 ` [PATCH 4/7] mm/damon/sysfs-schemes: drop redundant and racy zero target_value check Enze Li
2026-11-29 19:14 ` [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables SJ Park
2026-11-29 20:26 ` + selftests-damon-damos_apply_interval-remove-unused-variables.patch added to mm-unstable branch Andrew Morton
2026-12-01 4:27 ` [PATCH 5/7] selftests/damon/damos_apply_interval: remove unused variables Enze Li
2026-11-29 19:14 ` [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules SJ Park
2026-11-29 20:26 ` + selftests-damon-remove-unused-imports-of-sys-and-time-modules.patch added to mm-unstable branch Andrew Morton
2026-11-30 14:30 ` [PATCH 6/7] selftests/damon: remove unused imports of sys and time modules Enze Li
2026-11-29 19:14 ` [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON SJ Park
2026-11-29 20:26 ` + mm-damon-update-file-intro-comments-to-call-damon-just-damon.patch added to mm-unstable branch Andrew Morton
2026-11-30 9:30 ` [PATCH 7/7] mm/damon: update file intro comments to call DAMON just DAMON Enze Li
2026-11-29 19:21 ` [PATCH 0/7] mm/damon: various improvements/cleanups for code, tests and comments sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.