summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2024-06-18 21:17:59 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-07-04 05:30:13 +0300
commit9cb3d0b9dfce6a3258d91e6d69e418d0b4cce46a (patch)
tree607cd2aba381b91fdd608c52b4baddfc5469626a /include
parent3ad1dce6c30175dfd3da29d76853a69affbf7489 (diff)
downloadlinux-9cb3d0b9dfce6a3258d91e6d69e418d0b4cce46a.tar.xz
mm/damon/core: implement DAMON context commit function
Implement functions for supporting online DAMON context level parameters update. The function receives two DAMON context structs. One is the struct that currently being used by a kdamond and therefore to be updated. The other one contains the parameters to be applied to the first one. The function applies the new parameters to the destination struct while keeping/updating the internal status and operation results. The function should be called from DAMON context-update-safe place, like DAMON callbacks. Link: https://lkml.kernel.org/r/20240618181809.82078-3-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/damon.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/damon.h b/include/linux/damon.h
index ce12c9f1b4e4..27c546bfc6d4 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -756,6 +756,7 @@ void damon_destroy_ctx(struct damon_ctx *ctx);
int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs);
void damon_set_schemes(struct damon_ctx *ctx,
struct damos **schemes, ssize_t nr_schemes);
+int damon_commit_ctx(struct damon_ctx *old_ctx, struct damon_ctx *new_ctx);
int damon_nr_running_ctxs(void);
bool damon_is_registered_ops(enum damon_ops_id id);
int damon_register_ops(struct damon_operations *ops);