Skip to contentSkip to conversation

mm/damon/core: Commit damos->target_nid

PATCH Applied Bijan Tabatabai 2 participants 2 messages Jul 9, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/damon/core: Commit damos->target_nid

From: Bijan Tabatabai <[email protected]>

When committing new scheme parameters from the sysfs, the target_nid field of the damos struct would not be copied. This would result in the target_nid field to retain its original value, despite being updated in the sysfs interface.

This patch fixes this issue by copying target_nid in damos_commit().

Fixes 83dc7bbaecae ("mm/damon/sysfs: use damon_commit_ctx()")
---
 mm/damon/core.c | 1 +
 1 file changed, 1 insertion(+)
mm/damon/core.c +1 -0
index 5357a18066b0..ab28ab5d08f6 100644
@@ -978,6 +978,7 @@ static int damos_commit(struct damos *dst, struct damos *src)
 		return err;
 
 	dst->wmarks = src->wmarks;
+	dst->target_nid = src->target_nid;
 
 	err = damos_commit_filters(dst, src);
 	return err;
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Tue, 8 Jul 2025 19:47:29 -0500 Bijan Tabatabai <[email protected]> wrote:

From: Bijan Tabatabai <[email protected]>

When committing new scheme parameters from the sysfs, the target_nid field of the damos struct would not be copied. This would result in the target_nid field to retain its original value, despite being updated in the sysfs interface.

This patch fixes this issue by copying target_nid in damos_commit().

Thank you for fixing this, Bijan!

Quoted 4 lines
Fixes 83dc7bbaecae ("mm/damon/sysfs: use damon_commit_ctx()")

Thanks,
SJ

[...]