diff options
| author | SJ Park <sj@kernel.org> | 2026-07-08 06:53:52 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-08-04 19:18:43 -0700 |
| commit | 571cc9a34ef6c20673f0286c8e5a454ec12c91ef (patch) | |
| tree | bca4affb24a9ee9c2f03f4c9a8b4b2575900fa95 /include | |
| parent | f3ab162a921c9554c01b81a1a1b022f3adbbf96c (diff) | |
| download | linux-next-571cc9a34ef6c20673f0286c8e5a454ec12c91ef.tar.gz linux-next-571cc9a34ef6c20673f0286c8e5a454ec12c91ef.zip | |
mm/damon/core: s/damon_max_nr_accesses()/damon_nr_samples_per_aggr()/
damon_max_nr_accesses() actually returns the number of samples DAMON
checks for each region per each aggregation interval. Rename it to better
describe what it really does and not confusing for more general uses.
Link: https://lore.kernel.org/20260708135359.122587-3-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/damon.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/damon.h b/include/linux/damon.h index 19b7e839bde0..63f596957c1f 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -1056,15 +1056,17 @@ static inline bool damon_target_has_pid(const struct damon_ctx *ctx) return ctx->ops.id == DAMON_OPS_VADDR || ctx->ops.id == DAMON_OPS_FVADDR; } -static inline unsigned int damon_max_nr_accesses(const struct damon_attrs *attrs) +/* Returns number of samples per aggregation interval */ +static inline unsigned int damon_nr_samples_per_aggr( + const struct damon_attrs *attrs) { unsigned long sample_interval; - unsigned long max_nr_accesses; + unsigned long nr_samples; sample_interval = attrs->sample_interval ? : 1; - max_nr_accesses = min(attrs->aggr_interval / sample_interval, + nr_samples = min(attrs->aggr_interval / sample_interval, (unsigned long)UINT_MAX); - return max_nr_accesses ? : 1; + return nr_samples ? : 1; } |
