[PATCH 00/14] mm/damon: Support online tuning

From: sj
Date: Fri Apr 29 2022 - 12:06:21 EST


From: SeongJae Park <sj@xxxxxxxxxx>

Effects of DAMON and DAMON-based Operation Schemes highly depends on the
configurations. Wrong configurations could even result in unexpected
efficiency degradations. For finding a best configuration, repeating
incremental configuration changes and results measurements, in other
words, online tuning, could be helpful.

Nevertheless, DAMON kernel API supports only restrictive online tuning.
Worse yet, the sysfs-based DAMON user interface doesn't support online
tuning at all. DAMON_RECLAIM also doesn't support online tuning.

This patchset makes the DAMON kernel API, DAMON sysfs interface, and
DAMON_RECLAIM supports online tuning.

Sequence of patches
-------------------

First two patches enhance DAMON online tuning for kernel API users.
Specifically, patch 1 let kernel API users to be able to do DAMON online
tuning without a restriction, and patch 2 makes error handling easier.

Following seven patches (patches 3-9) refactor code for better
readability and easier reuse of code fragments that will be useful for
online tuning support.

Patch 10 introduces DAMON callback based user request handling structure
for DAMON sysfs interface, and patch 11 enables DAMON online tuning via
DAMON sysfs interface. Documentation patch (patch 12) for usage of it
follows.

Patch 13 enables online tuning of DAMON_RECLAIM and finally patch 14
documents the DAMON_RECLAIM online tuning usage.

SeongJae Park (14):
mm/damon/core: add a new callback for watermarks checks
mm/damon/core: finish kdamond as soon as any callback returns an error
mm/damon/vaddr: generalize damon_va_apply_three_regions()
mm/damon/vaddr: move 'damon_set_regions()' to core
mm/damon/vaddr: remove damon_va_apply_three_regions()
mm/damon/sysfs: prohibit multiple physical address space monitoring
targets
mm/damon/sysfs: move targets setup code to a separated function
mm/damon/sysfs: reuse damon_set_regions() for regions setting
mm/damon/sysfs: use enum for 'state' input handling
mm/damon/sysfs: update schemes stat in the kdamond context
mm/damon/sysfs: support online inputs update
Docs/{ABI,admin-guide}/damon: Update for 'state' sysfs file input
keyword, 'commit'
mm/damon/reclaim: support online inputs update
Docs/admin-guide/mm/damon/reclaim: document 'commit_inputs' parameter

.../ABI/testing/sysfs-kernel-mm-damon | 7 +-
.../admin-guide/mm/damon/reclaim.rst | 11 +
Documentation/admin-guide/mm/damon/usage.rst | 9 +-
include/linux/damon.h | 9 +
mm/damon/core.c | 89 +++-
mm/damon/reclaim.c | 95 +++--
mm/damon/sysfs.c | 382 +++++++++++++++---
mm/damon/vaddr-test.h | 6 +-
mm/damon/vaddr.c | 73 +---
9 files changed, 500 insertions(+), 181 deletions(-)

--
2.25.1