mm/damon/core: implement intervals auto-tuning
authorSeongJae Park <sj@kernel.org>
Mon, 3 Mar 2025 22:17:20 +0000 (14:17 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 07:05:32 +0000 (00:05 -0700)
commitf04b0fedbe714f822bd066b319a60faa39a985a1
tree0da2f0055572de5388ddc6f7c0e6d3e70ff6b732
parent1eb3471bf5749ff3769ec52723bd9b8d773c7a62
mm/damon/core: implement intervals auto-tuning

Implement the DAMON sampling and aggregation intervals auto-tuning
mechanism as briefly described on 'struct damon_intervals_goal'.  The core
part for deciding the direction and amount of the changes is implemented
reusing the feedback loop function which is being used for DAMOS quotas
auto-tuning.  Unlike the DAMOS quotas auto-tuning use case, limit the
maximum decreasing amount after the adjustment to 50% of the current
value, though.  This is because the intervals have no good merits at rapid
reductions since it could unnecessarily increase the monitoring overhead.

Link: https://lkml.kernel.org/r/20250303221726.484227-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/damon.h
mm/damon/core.c