mm/damon/modules: deduplicate init steps for DAMON context setup
authorSeongJae Park <sj@kernel.org>
Wed, 26 Oct 2022 22:59:42 +0000 (22:59 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 30 Nov 2022 23:01:26 +0000 (15:01 -0800)
commit7ae2c17f53d5054d1fe5c1a103ad46068034617d
tree8f6fb2b8ce5811dd56dbb17592975acb8796dd6d
parentc8e7b4d0ba348a8ef14956a80c780f152f433764
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>
mm/damon/Makefile
mm/damon/lru_sort.c
mm/damon/modules-common.c [new file with mode: 0644]
mm/damon/modules-common.h
mm/damon/reclaim.c