Skip to content

Commit 8041c87

Browse files
sjp38torvalds
authored andcommitted
Docs/admin-guide/mm/damon/usage: update for changed initail_regions file input
A previous commit made init_regions debugfs file to use target index instead of target id for specifying the target of the init regions. This commit updates the usage document to reflect the change. Link: https://lkml.kernel.org/r/20211230100723.2238-3-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>
1 parent 144760f commit 8041c87

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

Documentation/admin-guide/mm/damon/usage.rst

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,23 @@ In such cases, users can explicitly set the initial monitoring target regions
108108
as they want, by writing proper values to the ``init_regions`` file. Each line
109109
of the input should represent one region in below form.::
110110

111-
<target id> <start address> <end address>
111+
<target idx> <start address> <end address>
112112

113-
The ``target id`` should already in ``target_ids`` file, and the regions should
114-
be passed in address order. For example, below commands will set a couple of
115-
address ranges, ``1-100`` and ``100-200`` as the initial monitoring target
116-
region of process 42, and another couple of address ranges, ``20-40`` and
117-
``50-100`` as that of process 4242.::
113+
The ``target idx`` should be the index of the target in ``target_ids`` file,
114+
starting from ``0``, and the regions should be passed in address order. For
115+
example, below commands will set a couple of address ranges, ``1-100`` and
116+
``100-200`` as the initial monitoring target region of pid 42, which is the
117+
first one (index ``0``) in ``target_ids``, and another couple of address
118+
ranges, ``20-40`` and ``50-100`` as that of pid 4242, which is the second one
119+
(index ``1``) in ``target_ids``.::
118120

119121
# cd <debugfs>/damon
120-
# echo "42 1 100
121-
42 100 200
122-
4242 20 40
123-
4242 50 100" > init_regions
122+
# cat target_ids
123+
42 4242
124+
# echo "0 1 100
125+
0 100 200
126+
1 20 40
127+
1 50 100" > init_regions
124128

125129
Note that this sets the initial monitoring target regions only. In case of
126130
virtual memory monitoring, DAMON will automatically updates the boundary of the

0 commit comments

Comments
 (0)