diff options
| author | SJ Park <sj@kernel.org> | 2026-07-10 06:46:40 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-08-04 19:18:51 -0700 |
| commit | 05c978da7f0222b7bd2407fbcd6d66a3f57a61de (patch) | |
| tree | b52a44a47534107b110c43ea9734188b0d6ee33e | |
| parent | 23c0623f802bf5bda6523d57ee8716711d1ecf29 (diff) | |
| download | linux-05c978da7f0222b7bd2407fbcd6d66a3f57a61de.tar.gz linux-05c978da7f0222b7bd2407fbcd6d66a3f57a61de.zip | |
mm/damon/core: disable access monitoring when probe weights are set
When users set probe weights, they are interested in the data attributes.
Not necessarily they are interested in data access patterns. Disable the
data access monitoring in the case.
Link: https://lore.kernel.org/20260710134651.18084-12-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
| -rw-r--r-- | mm/damon/core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/damon/core.c b/mm/damon/core.c index a0e6a5129fbf..65f91e3b58d2 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -3763,17 +3763,18 @@ static int kdamond_fn(void *data) unsigned long next_aggregation_sis = ctx->next_aggregation_sis; unsigned long next_ops_update_sis = ctx->next_ops_update_sis; unsigned long sample_interval = ctx->attrs.sample_interval; + bool access_check_disabled = damon_has_probe_weights(ctx); if (kdamond_wait_activation(ctx)) break; - if (ctx->ops.prepare_access_checks) + if (!access_check_disabled && ctx->ops.prepare_access_checks) ctx->ops.prepare_access_checks(ctx); kdamond_usleep(sample_interval); ctx->passed_sample_intervals++; - if (ctx->ops.check_accesses) + 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); |
