From: sj@kernel.org
To: akpm@linux-foundation.org
Cc: linux-damon@amazon.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, SeongJae Park <sj@kernel.org>
Subject: [PATCH 4/4] Docs/{ABI,admin-guide}/damon: document 'avail_operations' sysfs file
Date: Tue, 26 Apr 2022 20:38:43 +0000 [thread overview]
Message-ID: <20220426203843.45238-5-sj@kernel.org> (raw)
In-Reply-To: <20220426203843.45238-1-sj@kernel.org>
From: SeongJae Park <sj@kernel.org>
This commit updates the DAMON ABI and usage documents for the new sysfs
file, 'avail_operations'.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
.../ABI/testing/sysfs-kernel-mm-damon | 10 +++++++++-
Documentation/admin-guide/mm/damon/usage.rst | 18 ++++++++++++------
2 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentation/ABI/testing/sysfs-kernel-mm-damon
index 9e282065cbcf..d724b8a12228 100644
--- a/Documentation/ABI/testing/sysfs-kernel-mm-damon
+++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon
@@ -40,6 +40,12 @@ Description: Writing a number 'N' to this file creates the number of
directories for controlling each DAMON context named '0' to
'N-1' under the contexts/ directory.
+What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/avail_operations
+Date: Apr 2022
+Contact: SeongJae Park <sj@kernel.org>
+Description: Reading this file returns the available monitoring operations
+ sets on the currently running kernel.
+
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/operations
Date: Mar 2022
Contact: SeongJae Park <sj@kernel.org>
@@ -47,7 +53,9 @@ Description: Writing a keyword for a monitoring operations set ('vaddr' for
virtual address spaces monitoring, and 'paddr' for the physical
address space monitoring) to this file makes the context to use
the operations set. Reading the file returns the keyword for
- the operations set the context is set to use.
+ the operations set the context is set to use. Note that only
+ the operations sets that listed in 'avail_operations' file are
+ valid inputs.
What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/sample_us
Date: Mar 2022
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index 592ea9a50881..af6ffaea567b 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -68,7 +68,7 @@ comma (","). ::
│ kdamonds/nr_kdamonds
│ │ 0/state,pid
│ │ │ contexts/nr_contexts
- │ │ │ │ 0/operations
+ │ │ │ │ 0/avail_operations,operations
│ │ │ │ │ monitoring_attrs/
│ │ │ │ │ │ intervals/sample_us,aggr_us,update_us
│ │ │ │ │ │ nr_regions/min,max
@@ -143,17 +143,23 @@ be written to the file.
contexts/<N>/
-------------
-In each context directory, one file (``operations``) and three directories
-(``monitoring_attrs``, ``targets``, and ``schemes``) exist.
+In each context directory, two files (``avail_operations`` and ``operations``)
+and three directories (``monitoring_attrs``, ``targets``, and ``schemes``)
+exist.
DAMON supports multiple types of monitoring operations, including those for
-virtual address space and the physical address space. You can set and get what
-type of monitoring operations DAMON will use for the context by writing one of
-below keywords to, and reading from the file.
+virtual address space and the physical address space. You can get the list of
+available monitoring operations set on the currently running kernel by reading
+``avail_operations`` file. Based on the kernel configuration, the file will
+list some or all of below keywords.
- vaddr: Monitor virtual address spaces of specific processes
- paddr: Monitor the physical address space of the system
+You can set and get what type of monitoring operations DAMON will use for the
+context by writing one of the keywords listed in ``avail_operations`` file and
+reading from the ``operations`` file.
+
contexts/<N>/monitoring_attrs/
------------------------------
--
2.25.1
prev parent reply other threads:[~2022-04-26 20:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 20:38 [PATCH 0/4] mm/damon: allow users know which monitoring ops are available sj
2022-04-26 20:38 ` [PATCH 1/4] mm/damon/core: add a function for damon_operations registration checks sj
2022-04-26 20:38 ` [PATCH 2/4] mm/damon/sysfs: add a file for listing available monitoring ops sj
2022-04-26 20:38 ` [PATCH 3/4] selftets/damon/sysfs: test existence and permission of avail_operations sj
2022-04-26 20:38 ` sj [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220426203843.45238-5-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-damon@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).