mm/damon/sysfs: add a file for listing available monitoring ops
authorSeongJae Park <sj@kernel.org>
Tue, 10 May 2022 01:20:51 +0000 (18:20 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 13 May 2022 14:20:06 +0000 (07:20 -0700)
commit0f2cb5885771b31fd1c82a1293787d1e378eaab5
tree38b08a687cc93c89d13284a22fa749f2efd7c8ad
parent152e56178ad72037bc6a2f08d4a608543bc67cdf
mm/damon/sysfs: add a file for listing available monitoring ops

DAMON programming interface users can know if specific monitoring ops set
is registered or not using 'damon_is_registered_ops()', but there is no
such method for the user space.  To help the case, this commit adds a new
DAMON sysfs file called 'avail_operations' under each context directory
for listing available monitoring ops.  Reading the file will list each
registered monitoring ops on each line.

Link: https://lkml.kernel.org/r/20220426203843.45238-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/sysfs.c