[RFC PATCH v1.2 12/19] mm/damon/core: set samples in apply_probes() if probe weights are set

From: SJ Park

Date: Thu Jul 09 2026 - 10:25:14 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 e250b7080708d..f1be748e9a674 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -3777,7 +3777,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