Skip to contentSkip to conversation

mm-damon-remove-unused-target-param-of-get_scheme_score.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Mar 24

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/damon: remove unused target param of get_scheme_score()
has been removed from the -mm tree. Its filename was
mm-damon-remove-unused-target-param-of-get_scheme_score.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: Asier Gutierrez <[email protected]>
Subject: mm/damon: remove unused target param of get_scheme_score()
Date: Fri, 13 Feb 2026 14:50:32 +0000

damon_target is not used by get_scheme_score operations, nor with virtual neither with physical addresses.

---

 include/linux/damon.h |    3 +--
 mm/damon/core.c       |   10 +++++-----
 mm/damon/paddr.c      |    3 +--
 mm/damon/vaddr.c      |    3 +--
 4 files changed, 8 insertions(+), 11 deletions(-)
include/linux/damon.h renamed from include/linux/damon.h~mm-damon-remove-unused-target-param-of-get_scheme_score +1 -2
@@ -647,8 +647,7 @@ struct damon_operations {
 	void (*prepare_access_checks)(struct damon_ctx *context);
 	unsigned int (*check_accesses)(struct damon_ctx *context);
 	int (*get_scheme_score)(struct damon_ctx *context,
-			struct damon_target *t, struct damon_region *r,
-			struct damos *scheme);
+			struct damon_region *r, struct damos *scheme);
 	unsigned long (*apply_scheme)(struct damon_ctx *context,
 			struct damon_target *t, struct damon_region *r,
 			struct damos *scheme, unsigned long *sz_filter_passed);
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-remove-unused-target-param-of-get_scheme_score +5 -5
@@ -1689,15 +1689,15 @@ static bool __damos_valid_target(struct
 		r->age <= s->pattern.max_age_region;
 }
 
-static bool damos_valid_target(struct damon_ctx *c, struct damon_target *t,
-		struct damon_region *r, struct damos *s)
+static bool damos_valid_target(struct damon_ctx *c, struct damon_region *r,
+		struct damos *s)
 {
 	bool ret = __damos_valid_target(r, s);
 
 	if (!ret || !s->quota.esz || !c->ops.get_scheme_score)
 		return ret;
 
-	return c->ops.get_scheme_score(c, t, r, s) >= s->quota.min_score;
+	return c->ops.get_scheme_score(c, r, s) >= s->quota.min_score;
 }
 
 /*
@@ -2021,7 +2021,7 @@ static void damon_do_apply_schemes(struc
 				s->max_nr_snapshots <= s->stat.nr_snapshots)
 			continue;
 
-		if (damos_valid_target(c, t, r, s))
+		if (damos_valid_target(c, r, s))
 			damos_apply_scheme(c, t, r, s);
 
 		if (damon_is_last_region(r, t))
@@ -2319,7 +2319,7 @@ static void damos_adjust_quota(struct da
 		damon_for_each_region(r, t) {
 			if (!__damos_valid_target(r, s))
 				continue;
-			score = c->ops.get_scheme_score(c, t, r, s);
+			score = c->ops.get_scheme_score(c, r, s);
 			c->regions_score_histogram[score] +=
 				damon_sz_region(r);
 			if (score > max_score)
mm/damon/paddr.c renamed from mm/damon/paddr.c~mm-damon-remove-unused-target-param-of-get_scheme_score +1 -2
@@ -343,8 +343,7 @@ static unsigned long damon_pa_apply_sche
 }
 
 static int damon_pa_scheme_score(struct damon_ctx *context,
-		struct damon_target *t, struct damon_region *r,
-		struct damos *scheme)
+		struct damon_region *r, struct damos *scheme)
 {
 	switch (scheme->action) {
 	case DAMOS_PAGEOUT:
mm/damon/vaddr.c renamed from mm/damon/vaddr.c~mm-damon-remove-unused-target-param-of-get_scheme_score +1 -2
@@ -985,8 +985,7 @@ static unsigned long damon_va_apply_sche
 }
 
 static int damon_va_scheme_score(struct damon_ctx *context,
-		struct damon_target *t, struct damon_region *r,
-		struct damos *scheme)
+		struct damon_region *r, struct damos *scheme)
 {
 
 	switch (scheme->action) {

_

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

docs-mm-damon-design-document-damon-actions-when-transparent_hugepage-is-off.patch