mm/damon/core: move damon_set_targets() into dbgfs
authorSeongJae Park <sj@kernel.org>
Mon, 28 Feb 2022 23:01:49 +0000 (10:01 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 28 Feb 2022 23:01:49 +0000 (10:01 +1100)
commit2d670903df2e6d1d8b3d87bcc81da9d946009c54
tree6d34b1c7b3534a98c2dca6dafe23b4b6130092d6
parent84711b326e5f47eceb23654b30c8dabcedcb924d
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