Re: [PATCH v4 1/2] mm/damon/core: Use only installed probe in damon_merge_two_regions()
From: SJ Park
Date: Thu Oct 15 2026 - 10:28:32 EST
On Thu, 15 Oct 2026 19:27:53 +0530 Suhaas Joshi <suhaas@xxxxxxxxxx> wrote:
> While merging 2 regions, we iterate over the entire probe_hits[] array,
> whose size is determined by the DAMON_MAX_PROBES macro. However, it is
> possible that we have fewer probes installed than DAMON_MAX_PROBES. In such
> cases, we end up making redundant iterations. Therefore, to remedy this,
> iterate over the list of installed probes instead of iterating over the
> entire array. For doing this, start accepting a struct damon_ctx in
> damon_merge_two_regions(), and update calling functions to pass this
> argument.
>
> Update the damon_test_merge_two() test to use this new signature for
> damon_merge_two_regions() as well.
Looks good to me. Thank you for this patch!
>
> Signed-off-by: Suhaas Joshi <suhaas@xxxxxxxxxx>
Reviewed-by: SJ Park <sj@xxxxxxxxxx>
Thanks,
SJ
[...]