mm/damon/core: add multiple goals per damos_quota and helpers for those
authorSeongJae Park <sj@kernel.org>
Mon, 19 Feb 2024 19:44:19 +0000 (11:44 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 24 Feb 2024 01:48:27 +0000 (17:48 -0800)
commit91f21216a79d00f7da380ed4ce100e8a7a0d0cff
tree43e663b63ebde9dad3f31e72bbc250d1ed3f26b9
parent106e26fc1c4c1a0e3747246e15df2bc3aa9d46b2
mm/damon/core: add multiple goals per damos_quota and helpers for those

The feedback-driven DAMOS quota auto-tuning feature allows only single
goal to the DAMON kernel API users.  The API users could implement
multiple goals for the end-users on their level, and that's what DAMON
sysfs interface is doing.  More DAMON kernel API users such as
DAMON_RECLAIM would need to do similar work.  To reduce unnecessary future
duplciated efforts, support multiple goals from DAMOS core layer.  To make
the support in minimum non-destructive change, keep the old single goal
setup interface, and add multiple goals setup.  The single goal will
treated as one of the multiple goals, so old API users are not required to
make any change.

Link: https://lkml.kernel.org/r/20240219194431.159606-9-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/damon.h
mm/damon/core.c