mm/damon/core: move damon_set_targets() into dbgfs
authorSeongJae Park <sj@kernel.org>
Tue, 22 Mar 2022 21:48:37 +0000 (14:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2022 22:57:12 +0000 (15:57 -0700)
commit436428255d5981e49ff015fc8e398ecf2ba10c24
treed1cf88d248ba7cc1c88b6e4762e917fb24e0ad4e
parent8041c87b915b9b7ecb2870f1c529a75aaa2483be
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: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/damon.h
mm/damon/core-test.h
mm/damon/core.c
mm/damon/dbgfs-test.h
mm/damon/dbgfs.c