Skip to contentSkip to conversation

mm-damon-core-receive-addr_unit-on-damon_set_region_biggest_system_ram_default.patch removed from -mm tree

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

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/damon/core: receive addr_unit on damon_set_region_biggest_system_ram_default()
has been removed from the -mm tree. Its filename was
mm-damon-core-receive-addr_unit-on-damon_set_region_biggest_system_ram_default.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/core: receive addr_unit on damon_set_region_biggest_system_ram_default()
Date: Tue, 10 Mar 2026 22:29:24 -0700

damon_find_biggest_system_ram() was not supporting addr_unit in the past. Hence, its caller, damon_set_region_biggest_system_ram_default(), was also not supporting addr_unit. The previous commit has updated the inner function to support addr_unit. There is no more reason to not support addr_unit on damon_set_region_biggest_system_ram_default(). Rather, it makes unnecessary inconsistency on support of addr_unit. Update it to receive addr_unit and handle it inside.

---

 include/linux/damon.h |    1 +
 mm/damon/core.c       |    7 ++++---
 mm/damon/lru_sort.c   |    1 +
 mm/damon/reclaim.c    |    1 +
 4 files changed, 7 insertions(+), 3 deletions(-)
include/linux/damon.h renamed from include/linux/damon.h~mm-damon-core-receive-addr_unit-on-damon_set_region_biggest_system_ram_default +1 -0
@@ -994,6 +994,7 @@ int damos_walk(struct damon_ctx *ctx, st
 
 int damon_set_region_biggest_system_ram_default(struct damon_target *t,
 				unsigned long *start, unsigned long *end,
+				unsigned long addr_unit,
 				unsigned long min_region_sz);
 
 #endif	/* CONFIG_DAMON */
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-core-receive-addr_unit-on-damon_set_region_biggest_system_ram_default +4 -3
@@ -3110,6 +3110,7 @@ static bool damon_find_biggest_system_ra
  * @t:		The monitoring target to set the region.
  * @start:	The pointer to the start address of the region.
  * @end:	The pointer to the end address of the region.
+ * @addr_unit:	The address unit for the damon_ctx of @t.
  * @min_region_sz:	Minimum region size.
  *
  * This function sets the region of @t as requested by @start and @end.  If the
@@ -3122,7 +3123,7 @@ static bool damon_find_biggest_system_ra
  */
 int damon_set_region_biggest_system_ram_default(struct damon_target *t,
 			unsigned long *start, unsigned long *end,
-			unsigned long min_region_sz)
+			unsigned long addr_unit, unsigned long min_region_sz)
 {
 	struct damon_addr_range addr_range;
 
@@ -3130,12 +3131,12 @@ int damon_set_region_biggest_system_ram_
 		return -EINVAL;
 
 	if (!*start && !*end &&
-		!damon_find_biggest_system_ram(start, end, 1))
+			!damon_find_biggest_system_ram(start, end, addr_unit))
 		return -EINVAL;
 
 	addr_range.start = *start;
 	addr_range.end = *end;
-	return damon_set_regions(t, &addr_range, 1, min_region_sz);
+	return damon_set_regions(t, &addr_range, addr_unit, min_region_sz);
 }
 
 /*
mm/damon/lru_sort.c renamed from mm/damon/lru_sort.c~mm-damon-core-receive-addr_unit-on-damon_set_region_biggest_system_ram_default +1 -0
@@ -345,6 +345,7 @@ static int damon_lru_sort_apply_paramete
 	err = damon_set_region_biggest_system_ram_default(param_target,
 					&monitor_region_start,
 					&monitor_region_end,
+					param_ctx->addr_unit,
 					param_ctx->min_region_sz);
 	if (err)
 		goto out;
mm/damon/reclaim.c renamed from mm/damon/reclaim.c~mm-damon-core-receive-addr_unit-on-damon_set_region_biggest_system_ram_default +1 -0
@@ -251,6 +251,7 @@ static int damon_reclaim_apply_parameter
 	err = damon_set_region_biggest_system_ram_default(param_target,
 					&monitor_region_start,
 					&monitor_region_end,
+					param_ctx->addr_unit,
 					param_ctx->min_region_sz);
 	if (err)
 		goto out;

_

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

mm-damon-sysfs-dealloc-repeat_call_control-if-damon_call-fails.patch