Skip to contentSkip to conversation

samples-damon-wsse-use-damon_call-repeat-mode-instead-of-damon_callback.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 20, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: samples/damon/wsse: use damon_call() repeat mode instead of damon_callback
has been removed from the -mm tree. Its filename was
samples-damon-wsse-use-damon_call-repeat-mode-instead-of-damon_callback.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: samples/damon/wsse: use damon_call() repeat mode instead of damon_callback
Date: Sat, 12 Jul 2025 12:50:09 -0700

wsse uses damon_callback for periodically reading DAMON internal data. Use its alternative, damon_call() repeat mode.

---

 samples/damon/wsse.c |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
samples/damon/wsse.c renamed from samples/damon/wsse.c~samples-damon-wsse-use-damon_call-repeat-mode-instead-of-damon_callback +13 -3
@@ -35,8 +35,9 @@ MODULE_PARM_DESC(enabled, "Enable or dis
 static struct damon_ctx *ctx;
 static struct pid *target_pidp;
 
-static int damon_sample_wsse_after_aggregate(struct damon_ctx *c)
+static int damon_sample_wsse_repeat_call_fn(void *data)
 {
+	struct damon_ctx *c = data;
 	struct damon_target *t;
 
 	damon_for_each_target(t, c) {
@@ -52,9 +53,15 @@ static int damon_sample_wsse_after_aggre
 	return 0;
 }
 
+static struct damon_call_control repeat_call_control = {
+	.fn = damon_sample_wsse_repeat_call_fn,
+	.repeat = true,
+};
+
 static int damon_sample_wsse_start(void)
 {
 	struct damon_target *target;
+	int err;
 
 	pr_info("start\n");
 
@@ -79,8 +86,11 @@ static int damon_sample_wsse_start(void)
 	}
 	target->pid = target_pidp;
 
-	ctx->callback.after_aggregation = damon_sample_wsse_after_aggregate;
-	return damon_start(&ctx, 1, true);
+	err = damon_start(&ctx, 1, true);
+	if (err)
+		return err;
+	repeat_call_control.data = ctx;
+	return damon_call(ctx, &repeat_call_control);
 }
 
 static void damon_sample_wsse_stop(void)

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-commit-damos_quota_goal-nid.patch mm-damon-sysfs-implement-refresh_ms-file-under-kdamond-directory.patch mm-damon-sysfs-implement-refresh_ms-file-internal-work.patch docs-admin-guide-mm-damon-usage-document-refresh_ms-file.patch docs-abi-damon-update-for-refresh_ms.patch