From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: [RFC PATCH 4/5] mm/damon/reclaim: respect addr_unit on default monitoring region setup
Date: Wed, 4 Mar 2026 21:39:16 -0800 [thread overview]
Message-ID: <20260305053918.83786-5-sj@kernel.org> (raw)
In-Reply-To: <20260305053918.83786-1-sj@kernel.org>
In the past, damon_set_region_biggest_system_ram_default(), which is the
core function for setting the default monitoring target region of
DAMON_RECLAIM, didn't support addr_unit. Hence DAMON_RECLAIM 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 ignorance 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@kernel.org>
---
mm/damon/reclaim.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
index 01f2f6cdbcdfe..86da147786583 100644
--- a/mm/damon/reclaim.c
+++ b/mm/damon/reclaim.c
@@ -201,12 +201,6 @@ static int damon_reclaim_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
next prev parent reply other threads:[~2026-03-05 5:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 5:39 [RFC PATCH 0/5] mm/damon: support addr_unit on default monitoring targets for modules SeongJae Park
2026-03-05 5:39 ` [RFC PATCH 1/5] mm/damon/core: fix wrong end address assignment on walk_system_ram() SeongJae Park
2026-03-05 5:39 ` [RFC PATCH 2/5] mm/damon/core: support addr_unit on damon_find_biggest_system_ram() SeongJae Park
2026-03-05 5:39 ` [RFC PATCH 3/5] mm/damon/core: receive addr_unit on damon_set_region_biggest_system_ram_default() SeongJae Park
2026-03-05 5:39 ` SeongJae Park [this message]
2026-03-05 5:39 ` [RFC PATCH 5/5] mm/damon/lru_sort: respect addr_unit on default monitoring region setup SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260305053918.83786-5-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox