diff options
| author | SeongJae Park <sj@kernel.org> | 2022-10-26 22:59:42 +0000 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2022-11-30 15:01:26 -0800 |
| commit | 7ae2c17f53d5054d1fe5c1a103ad46068034617d (patch) | |
| tree | 8f6fb2b8ce5811dd56dbb17592975acb8796dd6d /mm/damon/modules-common.h | |
| parent | c8e7b4d0ba348a8ef14956a80c780f152f433764 (diff) | |
| download | linux-next-7ae2c17f53d5054d1fe5c1a103ad46068034617d.tar.gz linux-next-7ae2c17f53d5054d1fe5c1a103ad46068034617d.zip | |
mm/damon/modules: deduplicate init steps for DAMON context setup
DAMON_RECLAIM and DAMON_LRU_SORT has duplicated code for DAMON context and
target initializations. Deduplicate the part by implementing a function
for the initialization in 'modules-common.c' and using it.
Link: https://lkml.kernel.org/r/20221026225943.100429-12-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon/modules-common.h')
| -rw-r--r-- | mm/damon/modules-common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/damon/modules-common.h b/mm/damon/modules-common.h index 5a4921851d32..f49cdb417005 100644 --- a/mm/damon/modules-common.h +++ b/mm/damon/modules-common.h @@ -44,3 +44,6 @@ 0400); \ module_param_named(nr_##qt_exceed_name, stat.qt_exceeds, ulong, \ 0400); + +int damon_modules_new_paddr_ctx_target(struct damon_ctx **ctxp, + struct damon_target **targetp); |
