While measuring vaddr monitoring overhead, I noticed that kdamond calls apply_probes() every sampling interval even if no probes are installed. The vaddr callback walks the page tables for each region's sample, and paddr looks up a folio and takes a reference if it can. There are no probe hits to count in either case. Skip the callback when the probe list is empty. Ordinary access checks still run, and installed probes with zero weight are still applied. Signed-off-by: Aveline Noir --- Tested in x86-64 KVM on 067c5c24cef2. All fvaddr probe checks passed. --- mm/damon/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index 986404b547eb..df711b6a8d03 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -4089,7 +4089,7 @@ static int kdamond_fn(void *data) if (!access_check_disabled && ctx->ops.check_accesses) max_merge_score = ctx->ops.check_accesses(ctx); - if (ctx->ops.apply_probes) { + if (ctx->ops.apply_probes && !list_empty(&ctx->probes)) { if (time_after_eq(ctx->passed_sample_intervals, next_aggregation_sis) && access_check_disabled) --- base-commit: 9f004372ebeb18fdeb699f9880a0e472df90135b change-id: 20261119-damon-skip-empty-probes-20261119-586d76178530 -- Thanks, Aveline Noir