Re: [PATCH v3 2/2] mm/damon/core: Copy only installed probe in damon_split_region_at()
From: SJ Park
Date: Mon Oct 12 2026 - 15:39:32 EST
On Mon, 12 Oct 2026 20:30:40 +0530 Suhaas Joshi <suhaas@xxxxxxxxxx> wrote:
> In damon_split_region_at(), we copy the entire probe_hits[] and
> last_probe_hits[] arrays of DAMON_MAX_PROBES size. However it is possible
> that the number of probes installed is less than DAMON_MAX_PROBES, in which
> case one or more iterations is/are redundant. To remedy this, iterate over
> only as many times as the number of installed probes. To do so, accept a
> struct damon_ctx pointer in damon_split_region_at(), and update all
> invocations of the function to pass the new argument.
>
> Also update damon_test_split_at() and damos_test_filter_out() in
> core-kunit.h to supply a context to function paths that call
> damon_split_region_at().
Sashiko raises [1] a few questions, and those look valid to me. Could you
please address those by replying to the mail [1]?
[1] https://lore.kernel.org/sashiko-outbox-168321@xxxxxxxxxx
Thanks,
SJ
[...]