[RFC v4 3/8] Docs/damon: Document 'initial_regions' feature
From: SeongJae Park
Date: Tue Jun 16 2020 - 10:10:25 EST
From: SeongJae Park <sjpark@xxxxxxxxx>
This commit documents the 'initial_regions' feature.
Signed-off-by: SeongJae Park <sjpark@xxxxxxxxx>
---
Documentation/admin-guide/mm/damon/usage.rst | 34 ++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index 2f5b67302094..24f1b05a859a 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -329,6 +329,40 @@ having pids 42 and 4242 as the processes to be monitored and check it again::
Note that setting the pids doesn't start the monitoring.
+Initial Monitoring Target Regions
+---------------------------------
+
+DAMON automatically sets and updates the monitoring target regions so that
+entire memory mappings of target processes can be covered. However, users
+might want to limit the monitoring region to specific address ranges, such as
+the heap, the stack, or specific file-mapped area. Or, some users might know
+the initial access pattern of their workloads and therefore want to set optimal
+initial regions for the 'adaptive regions adjustment'.
+
+In such cases, users can explicitly set the initial monitoring target regions
+as they want, by writing proper values to the ``init_regions`` file. Each line
+of the input should represent one region in below form.::
+
+ <pid> <start address> <end address>
+
+The ``pid`` should be already in ``pids`` file, and the regions should be
+passed in address order. For example, below commands will set a couple of
+address ranges, ``1-100`` and ``100-200`` as the initial monitoring target
+region of process 42, and another couple of address ranges, ``20-40`` and
+``50-100`` as that of process 4242.::
+
+ # cd <debugfs>/damon
+ # echo "42 1 100
+ 42 100 200
+ 4242 20 40
+ 4242 50 100" > init_regions
+
+Note that this sets the initial monitoring target regions only. DAMON will
+automatically updates the boundary of the regions after one ``regions update
+interval``. Therefore, users should set the ``regions update interval`` large
+enough.
+
+
Record
------
--
2.17.1