[RFC PATCH 09/16] mm/damon/core: set samples in apply_probes() if probe weights are set

From: SJ Park

Date: Sun Jul 05 2026 - 16:59:54 EST


When probe weights are set, the prepare_access_checks() ops callback is
not invoked, so sampling addresses of regions are unset. Ask
apply_probes() to set those together in the case.

Signed-off-by: SJ Park <sj@xxxxxxxxxx>
---
mm/damon/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/damon/core.c b/mm/damon/core.c
index ad0f28469e633..71008ee6ca243 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -3728,7 +3728,8 @@ static int kdamond_fn(void *data)
if (!access_check_disabled && ctx->ops.check_accesses)
max_nr_accesses = ctx->ops.check_accesses(ctx);
if (ctx->ops.apply_probes)
- ctx->ops.apply_probes(ctx, false, false);
+ ctx->ops.apply_probes(ctx, access_check_disabled,
+ false);

if (time_after_eq(ctx->passed_sample_intervals,
next_aggregation_sis)) {
--
2.47.3