Re: [RFC PATCH -next 12/16] mm/damon: add damon_ctx->min_region and damon_target->min_region
From: SeongJae Park
Date: Wed Aug 13 2025 - 12:52:30 EST
On Wed, 13 Aug 2025 13:07:02 +0800 Quanmin Yan <yanquanmin1@xxxxxxxxxx> wrote:
> Adopting addr_unit would make DAMON_MINREGION 'addr_unit * 4096'
> bytes and cause data alignment issues[1].
>
> Add damon_ctx->min_region to change DAMON_MIN_REGION from a global
> macro value to per-context variable,
Nice!
> let target inherit the min_region
> from its associated ctx to avoid excessive passing of ctx.
To me, keeping the synchronization seems more complicated than just passing the
addr_unit value to relevant functions. I'd prefer passing the addr_unit to
relevant functions. It could require more changes and might make code uglier,
but I think that's easier to maintain, and we can cleanup/refactor the code
later.
Could you please do so in the next version?
Thanks,
SJ
[...]