[RFC PATCH 5/5] mm/damon/lru_sort: respect addr_unit on default monitoring region setup
From: SeongJae Park
Date: Thu Mar 05 2026 - 00:41:23 EST
In the past, damon_set_region_biggest_system_ram_default(), which is the
core function for setting the default monitoring target region of
DAMON_LRU_SORT, didn't support addr_unit. Hence DAMON_LRU_SORT was
silently ignoring users input for addr_unit when the users don't
explicitly set the monitoring target regions, and therefore the default
target region is being used. No real problem from the ignorancee was
reported so far. But, the implicit rule is only making things
confusing. Also, the default target region setup function is updated to
supports addr_unit. Hence there is no reason to keep ignoring it.
Respect the user input addr_unit for the default target monitoring
region use case.
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
mm/damon/lru_sort.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c
index 133ea17e258df..554559d729760 100644
--- a/mm/damon/lru_sort.c
+++ b/mm/damon/lru_sort.c
@@ -291,12 +291,6 @@ static int damon_lru_sort_apply_parameters(void)
if (err)
return err;
- /*
- * If monitor_region_start/end are unset, always silently
- * reset addr_unit to 1.
- */
- if (!monitor_region_start && !monitor_region_end)
- addr_unit = 1;
param_ctx->addr_unit = addr_unit;
param_ctx->min_region_sz = max(DAMON_MIN_REGION_SZ / addr_unit, 1);
--
2.47.3