[RFC PATCH v1.2 0/7] mm/damon: update probe hits for runtime parameter commits

From: SJ Park

Date: Tue Jul 07 2026 - 21:33:05 EST


DAMON users can update DAMON parameters such as sampling and aggregation
intervals at runtime. For such changes, monitoring results that depend
on the intervals should be properly updated for better accuracy. For
example, the access frequency counter (nr_accesses) is updated. The
data attribute monitoring counter (probe_hits) is not being updated,
though. Do the updates for new parameters.

Patches Sequence
================

Patch 1 removes obsolete comments and test code for a function that this
series will touch. Patches 2-5 rename functions that are being used for
nr_accesses update, to be able to be used for probe_hits without
confusion. Patch 6 does the probe_hits update. Patch 7 update
damon_probe_hits_mvsum() to cover a corner case from the update for
better accuracy.

Changelog
=========

Changes from RFC v1.1
- RFC v1.1: https://lore.kernel.org/20260707135038.90068-1-sj@xxxxxxxxxx
- Remove obsolete divide-by-zero test with comments as a separate patch.
- Remove obsolete comment removal part in a rename commit message.
- Rename name-changed function parameters.
Changes from RFC
- RFC: https://lore.kernel.org/20260707043828.97900-1-sj@xxxxxxxxxx
- Remove obsolete comment and code on the test.

SJ Park (7):
mm/damon/core: remove comment and test for nr_to_bp() divide-by-zero
mm/damon/core: s/damon_max_nr_accesses()/damon_nr_samples_per_aggr()/
mm/damon/core: s/accesses_bp_to_nr_accesses/sample_bp_to_count/
mm/damon/core: s/nr_accesses_to_accesses_bp/sample_count_to_bp/
mm/damon/core: s/nr_accesses_for_new_attrs/nr_samples_for_new_attrs/
mm/damon/core: update probe hits for new parameter commit
mm/damon/core: handle unreset probe_hits in probe_hits_mvsum()

include/linux/damon.h | 10 +++---
mm/damon/core.c | 65 +++++++++++++++++++++++--------------
mm/damon/lru_sort.c | 2 +-
mm/damon/ops-common.c | 2 +-
mm/damon/tests/core-kunit.h | 38 +++++++++++-----------
5 files changed, 68 insertions(+), 49 deletions(-)


base-commit: 29da8f7d1b66215addd212b9b7191a203e322b8c
--
2.47.3