Skip to contentSkip to conversation

samples-damon-wsse-use-damon_initialized.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 21, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: samples/damon/wsse: use damon_initialized()
has been removed from the -mm tree. Its filename was
samples-damon-wsse-use-damon_initialized.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_initialized()
Date: Mon, 15 Sep 2025 20:35:09 -0700

damon_sample_wsse is assuming DAMON is ready to use in module_init time, and uses its own hack to see if it is the time. Use damon_initialized(), which is a way for seeing if DAMON is ready to be used that is more reliable and better to maintain instead of the hack.

---

 samples/damon/wsse.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
samples/damon/wsse.c renamed from samples/damon/wsse.c~samples-damon-wsse-use-damon_initialized +9 -6
@@ -102,8 +102,6 @@ static void damon_sample_wsse_stop(void)
 	}
 }
 
-static bool init_called;
-
 static int damon_sample_wsse_enable_store(
 		const char *val, const struct kernel_param *kp)
 {
@@ -117,10 +115,10 @@ static int damon_sample_wsse_enable_stor
 	if (enabled == is_enabled)
 		return 0;
 
-	if (enabled) {
-		if (!init_called)
-			return 0;
+	if (!damon_initialized())
+		return 0;
 
+	if (enabled) {
 		err = damon_sample_wsse_start();
 		if (err)
 			enabled = false;
@@ -134,7 +132,12 @@ static int __init damon_sample_wsse_init
 {
 	int err = 0;
 
-	init_called = true;
+	if (!damon_initialized()) {
+		err = -ENOMEM;
+		if (enabled)
+			enabled = false;
+	}
+
 	if (enabled) {
 		err = damon_sample_wsse_start();
 		if (err)

_

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

mm-damon-sysfs-set-damon_ctx-min_sz_region-only-for-paddr-use-case.patch