Skip to content

mm/damon/sysfs: commit parameters online via damon_call()

SeongJae Park damon linux-mm lkml 1 version Applied

Status from this message: [merged mm-stable] mm-damon-remove-damon_operations-reset_aggregated.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 0 repliesApplied 13/13

Patches in v1 All 13 applied

#Subject and filesSizeRepliesApplied
1/13mm/damon/sysfs: validate user inputs from damon_sysfs_commit_input()mm/damon/sysfs.c+10 -20 repliesApplied
2/13mm/damon/core: invoke kdamond_call() after merging is done if possiblemm/damon/core.c+3 -30 repliesApplied
3/13mm/damon/core: make damon_set_attrs() be safe to be called from damon_call()mm/damon/core.c mm/damon/tests/core-kunit.h+48 -140 repliesApplied
4/13mm/damon/sysfs: handle commit command using damon_call()mm/damon/sysfs.c+6 -110 repliesApplied
5/13mm/damon/sysfs: remove damon_sysfs_cmd_request code from damon_sysfs_handle_cmd()mm/damon/sysfs.c+0 -320 repliesApplied
6/13mm/damon/sysfs: remove damon_sysfs_cmd_request_callback() and its callersmm/damon/sysfs.c+0 -620 repliesApplied
7/13mm/damon/sysfs: remove damon_sysfs_cmd_request and its readersmm/damon/sysfs.c+1 -230 repliesApplied
8/13mm/damon/sysfs-schemes: remove obsolete comment for damon_sysfs_schemes_clear_regions()mm/damon/sysfs-schemes.c+0 -10 repliesApplied
9/13mm/damon: remove damon_callback->privateinclude/linux/damon.h+1 -50 repliesApplied
10/13mm/damon: remove ->before_start of damon_callbackinclude/linux/damon.h mm/damon/core.c+2 -70 repliesApplied
11/13mm/damon: remove damon_callback->after_samplinginclude/linux/damon.h mm/damon/core.c+4 -100 repliesApplied
12/13mm/damon: remove damon_callback->before_damos_applyinclude/linux/damon.h mm/damon/core.c+4 -140 repliesApplied
13/13mm/damon: remove damon_operations->reset_aggregatedinclude/linux/damon.h mm/damon/core.c mm/damon/paddr.c +1 more+1 -100 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/13] mm/damon/sysfs: commit parameters online via damon_call()

Due to the lack of ways to synchronously access DAMON internal data, DAMON sysfs interface is using damon_callback hooks with its own synchronization mechanism. The mechanism is built on top of damon_callback hooks in an ineifficient and complicated way.

Patch series "mm/damon: replace most damon_callback usages in sysfs with new core functions", which starts with commit e035320fd38e ("mm/damon/sysfs-schemes: remove unnecessary schemes existence check in damon_sysfs_schemes_clear_regions()") introduced two new DAMON kernel API functions that providing the synchronous access, replaced most damon_callback hooks usage in DAMON sysfs interface, and cleaned up unnecessary code.

Continue the replacement and cleanup works. Update the last DAMON sysfs' usage of its own synchronization mechanism, namely online DAMON parameters commit, to use damon_call() instead of the damon_callback hooks and the hard-to-maintain core-external synchronization mechanism. Then remove the no more be used code due to the change, and more unused code that just not yet cleaned up.

The first four patches (patches 1-4) of this series makes DAMON sysfs interface's online parameters commit to use damon_call(). Then, following three patches (patches 5-7) remove the DAMON sysfs interface's own synchronization mechanism and its usages, which is no more be used by anyone due to the first four patches. Finally, six patches (8-13) do more cleanup of outdated comment and unused code.

Changes from RFC
(https://lore.kernel.org/[email protected])
- Fix aggregated information double reset problem
- Wordsmith commit messages
- Rebase to latest mm-unstable

SeongJae Park (13):
mm/damon/sysfs: validate user inputs from damon_sysfs_commit_input() mm/damon/core: invoke kdamond_call() after merging is done if possible mm/damon/core: make damon_set_attrs() be safe to be called from
damon_call()
mm/damon/sysfs: handle commit command using damon_call() mm/damon/sysfs: remove damon_sysfs_cmd_request code from
damon_sysfs_handle_cmd()
mm/damon/sysfs: remove damon_sysfs_cmd_request_callback() and its
callers
mm/damon/sysfs: remove damon_sysfs_cmd_request and its readers mm/damon/sysfs-schemes: remove obsolete comment for
damon_sysfs_schemes_clear_regions()
mm/damon: remove damon_callback->private
mm/damon: remove ->before_start of damon_callback mm/damon: remove damon_callback->after_sampling
mm/damon: remove damon_callback->before_damos_apply mm/damon: remove damon_operations->reset_aggregated

 include/linux/damon.h       |  34 ++-------
 mm/damon/core.c             |  82 ++++++++++++--------
 mm/damon/paddr.c            |   1 -
 mm/damon/sysfs-schemes.c    |   1 -
 mm/damon/sysfs.c            | 147 +++++-------------------------------
 mm/damon/tests/core-kunit.h |   6 +-
 mm/damon/vaddr.c            |   1 -
 7 files changed, 79 insertions(+), 193 deletions(-)

base-commit: 1ef510599e7f933f1cd250ba33cd4a1a532a0510

Signature · 1 line
2.39.5