Docs/ABI/damon: document scheme filters files
authorSeongJae Park <sj@kernel.org>
Mon, 5 Dec 2022 23:08:30 +0000 (23:08 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 19 Jan 2023 01:12:44 +0000 (17:12 -0800)
Document newly added DAMON sysfs interface files for DAMOS filtering on
the DAMON ABI document.

Link: https://lkml.kernel.org/r/20221205230830.144349-12-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/ABI/testing/sysfs-kernel-mm-damon

index 13397b8536926780fc0f967099b6e193d6b23f50..2744f21b5a6b360c25758a48abf12ac609949fc1 100644 (file)
@@ -258,6 +258,35 @@ Contact:   SeongJae Park <sj@kernel.org>
 Description:   Writing to and reading from this file sets and gets the low
                watermark of the scheme in permil.
 
+What:          /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/nr_filters
+Date:          Dec 2022
+Contact:       SeongJae Park <sj@kernel.org>
+Description:   Writing a number 'N' to this file creates the number of
+               directories for setting filters of the scheme named '0' to
+               'N-1' under the filters/ directory.
+
+What:          /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/type
+Date:          Dec 2022
+Contact:       SeongJae Park <sj@kernel.org>
+Description:   Writing to and reading from this file sets and gets the type of
+               the memory of the interest.  'anon' for anonymous pages, or
+               'memcg' for specific memory cgroup can be written and read.
+
+What:          /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/memcg_path
+Date:          Dec 2022
+Contact:       SeongJae Park <sj@kernel.org>
+Description:   If 'memcg' is written to the 'type' file, writing to and
+               reading from this file sets and gets the path to the memory
+               cgroup of the interest.
+
+What:          /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/matching
+Date:          Dec 2022
+Contact:       SeongJae Park <sj@kernel.org>
+Description:   Writing 'Y' or 'N' to this file sets whether to filter out
+               pages that do or do not match to the 'type' and 'memcg_path',
+               respectively.  Filter out means the action of the scheme will
+               not be applied to.
+
 What:          /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_tried
 Date:          Mar 2022
 Contact:       SeongJae Park <sj@kernel.org>