diff options
author | SeongJae Park <sj@kernel.org> | 2022-10-24 20:46:19 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-12-01 02:58:41 +0300 |
commit | 1b0166387586cae69d7da783f0a4521864534aad (patch) | |
tree | b7f5a5cb7e76aa4ce21bb62b547f624c6cccbbcb | |
parent | bd4149290c3edc09454a8a7e7ef3a5544cb9eed6 (diff) | |
download | linux-1b0166387586cae69d7da783f0a4521864534aad.tar.xz |
Docs/admin-guide/mm/damon/usage: fix wrong usage example of init_regions file
DAMON debugfs interface assumes the users will write all inputs at once.
However, redirecting a string of multiple lines sometimes end up writing
line by line. Therefore, the example usage of 'init_regions' file, which
writes input as a string of multiple lines can fail. Fix it to use a
single line string instead. Also update the description of the usage to
not assume users will write inputs in multiple lines.
Link: https://lkml.kernel.org/r/20221024174619.15600-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Vinicius Petrucci <vpetrucci@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | Documentation/admin-guide/mm/damon/usage.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 89d9a4f75a29..c17e02e1e426 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -468,8 +468,9 @@ regions in case of physical memory monitoring. Therefore, users should set the monitoring target regions by themselves. 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.:: +as they want, by writing proper values to the ``init_regions`` file. The input +should be a sequence of three integers separated by white spaces that represent +one region in below form.:: <target idx> <start address> <end address> @@ -484,9 +485,9 @@ ranges, ``20-40`` and ``50-100`` as that of pid 4242, which is the second one # cd <debugfs>/damon # cat target_ids 42 4242 - # echo "0 1 100 - 0 100 200 - 1 20 40 + # echo "0 1 100 \ + 0 100 200 \ + 1 20 40 \ 1 50 100" > init_regions Note that this sets the initial monitoring target regions only. In case of |