mm/damon/core: move damon_set_targets() into dbgfs
authorSeongJae Park <sj@kernel.org>
Wed, 16 Feb 2022 04:31:41 +0000 (15:31 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 17 Feb 2022 03:46:46 +0000 (14:46 +1100)
commitd5b00c3ca1da448e227997763ae41414913c9096
tree62665fc8c8c5827fafea798e184e424214d5dab5
parentc229ef6dbd138cb4875be048ce9278cfbffe24e8
mm/damon/core: move damon_set_targets() into dbgfs

damon_set_targets() function is defined in the core for general use cases,
but called from only dbgfs.  Also, because the function is for general use
cases, dbgfs does additional handling of pid type target id case.  To make
the situation simpler, this commit moves the function into dbgfs and makes
it to do the pid type case handling on its own.

Link: https://lkml.kernel.org/r/20211230100723.2238-4-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
include/linux/damon.h
mm/damon/core-test.h
mm/damon/core.c
mm/damon/dbgfs-test.h
mm/damon/dbgfs.c