Skip to contentSkip to conversation

mm-damon-sysfs-setup-probes-on-damon-core-api-parameters.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jun 2

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/damon/sysfs: setup probes on DAMON core API parameters
has been removed from the -mm tree. Its filename was
mm-damon-sysfs-setup-probes-on-damon-core-api-parameters.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: mm/damon/sysfs: setup probes on DAMON core API parameters
Date: Mon, 18 May 2026 16:41:02 -0700

Add user-installed data probes to DAMON core API parameters, so that user inputs for data probes are passed to DAMON core.

Cc David Hildenbrand <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc "Masami Hiramatsu (Google)" <[email protected]>
Cc Mathieu Desnoyers <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Vlastimil Babka <[email protected]>

---

 mm/damon/sysfs.c |   37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-setup-probes-on-damon-core-api-parameters +37 -0
@@ -1855,6 +1855,40 @@ static int damon_sysfs_set_attrs(struct
 	return damon_set_attrs(ctx, &attrs);
 }
 
+static int damon_sysfs_set_probes(struct damon_ctx *ctx,
+		struct damon_sysfs_probes *sys_probes)
+{
+	int i;
+
+	for (i = 0; i < sys_probes->nr; i++) {
+		struct damon_sysfs_filters *sys_filters =
+			sys_probes->probes_arr[i]->filters;
+		struct damon_probe *c;
+		int j;
+
+		if (!sys_filters)
+			continue;
+		c = damon_new_probe();
+		if (!c)
+			return -ENOMEM;
+		damon_add_probe(ctx, c);
+
+		for (j = 0; j < sys_filters->nr; j++) {
+			struct damon_sysfs_filter *sys_filter =
+				sys_filters->filters_arr[j];
+			struct damon_filter *filter;
+
+			filter = damon_new_filter(sys_filter->type,
+					sys_filter->matching,
+					sys_filter->allow);
+			if (!filter)
+				return -ENOMEM;
+			damon_add_filter(c, filter);
+		}
+	}
+	return 0;
+}
+
 static int damon_sysfs_set_regions(struct damon_target *t,
 		struct damon_sysfs_regions *sysfs_regions,
 		unsigned long min_region_sz)
@@ -1969,6 +2003,9 @@ static int damon_sysfs_apply_inputs(stru
 	err = damon_sysfs_set_attrs(ctx, sys_ctx->attrs);
 	if (err)
 		return err;
+	err = damon_sysfs_set_probes(ctx, sys_ctx->attrs->probes);
+	if (err)
+		return err;
 	err = damon_sysfs_add_targets(ctx, sys_ctx->targets);
 	if (err)
 		return err;

_

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

mm-damon-reclaim-handle-ctx-allocation-failure.patch mm-damonn-lru_sort-handle-ctx-allocation-failure.patch maintainers-add-testing-abi-documents-for-mm.patch