]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/damon/core: add cleanup_target() ops callback
authorSeongJae Park <sj@kernel.org>
Sat, 12 Jul 2025 19:50:11 +0000 (12:50 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 20 Jul 2025 01:59:56 +0000 (18:59 -0700)
commit7114bc5e01cf393e1fdc97e10399eb9451b6af45
treecae382f9ae3fb2802795d925e3c5e58744f2606a
parentd4614161fb6d4a56ead3e8e3e9cafa83a54747e4
mm/damon/core: add cleanup_target() ops callback

Some DAMON operation sets may need additional cleanup per target.  For
example, [f]vaddr need to put pids of each target.  Each user and core
logic is doing that redundantly.  Add another DAMON ops callback that will
be used for doing such cleanups in operations set layer.

[sj@kernel.org: add kernel-doc comment for damon_operations->cleanup_target]
Link: https://lkml.kernel.org/r/20250715185239.89152-2-sj@kernel.org
[sj@kernel.org: remove damon_ctx->callback kernel-doc comment]
Link: https://lkml.kernel.org/r/20250715185239.89152-3-sj@kernel.org
Link: https://lkml.kernel.org/r/20250712195016.151108-10-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
mm/damon/sysfs.c
mm/damon/tests/core-kunit.h
mm/damon/tests/vaddr-kunit.h