From: SeongJae Park <sj@kernel.org>
To: akpm@linux-foundation.org
Cc: SeongJae Park <sj@kernel.org>,
Jonathan.Cameron@Huawei.com, amit@kernel.org,
benh@kernel.crashing.org, corbet@lwn.net, david@redhat.com,
dwmw@amazon.com, elver@google.com, foersleo@amazon.de,
gthelen@google.com, markubo@amazon.de, rientjes@google.com,
shakeelb@google.com, shuah@kernel.org, linux-damon@amazon.com,
linux-mm@kvack.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/7] Docs/admin-guide/mm/damon: Document 'init_regions' feature
Date: Tue, 12 Oct 2021 20:57:07 +0000 [thread overview]
Message-ID: <20211012205711.29216-4-sj@kernel.org> (raw)
In-Reply-To: <20211012205711.29216-1-sj@kernel.org>
This commit adds description of the 'init_regions' feature in the DAMON
usage document.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
Documentation/admin-guide/mm/damon/usage.rst | 41 +++++++++++++++++++-
1 file changed, 39 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index c0296c14babf..f7d5cfbb50c2 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -34,8 +34,9 @@ the reason, this document describes only the debugfs interface
debugfs Interface
=================
-DAMON exports four files, ``attrs``, ``target_ids``, ``schemes`` and
-``monitor_on`` under its debugfs directory, ``<debugfs>/damon/``.
+DAMON exports five files, ``attrs``, ``target_ids``, ``init_regions``,
+``schemes`` and ``monitor_on`` under its debugfs directory,
+``<debugfs>/damon/``.
Attributes
@@ -74,6 +75,42 @@ check it again::
Note that setting the target ids doesn't start the monitoring.
+Initial Monitoring Target Regions
+---------------------------------
+
+In case of the debugfs based monitoring, DAMON automatically sets and updates
+the monitoring target regions so that entire memory mappings of target
+processes can be covered. However, users can want to limit the monitoring
+region to specific address ranges, such as the heap, the stack, or specific
+file-mapped area. Or, some users can 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.::
+
+ <target id> <start address> <end address>
+
+The ``target id`` should already in ``target_ids`` 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. In case of
+virtual memory monitoring, DAMON will automatically updates the boundary of the
+regions after one ``regions update interval``. Therefore, users should set the
+``regions update interval`` large enough in this case, if they don't want the
+update.
+
+
Schemes
-------
--
2.17.1
next prev parent reply other threads:[~2021-10-12 20:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 20:57 [PATCH 0/7] DAMON: Support Physical Memory Address Space Monitoring SeongJae Park
2021-10-12 20:57 ` [PATCH 1/7] mm/damon/dbgfs: Allow users to set initial monitoring target regions SeongJae Park
2021-10-13 22:45 ` Andrew Morton
2021-10-14 6:45 ` SeongJae Park
2021-10-12 20:57 ` [PATCH 2/7] mm/damon/dbgfs-test: Add a unit test case for 'init_regions' SeongJae Park
2021-10-12 20:57 ` SeongJae Park [this message]
2021-10-12 20:57 ` [PATCH 4/7] mm/damon/vaddr: Separate commonly usable functions SeongJae Park
2021-10-12 20:57 ` [PATCH 5/7] mm/damon: Implement primitives for physical address space monitoring SeongJae Park
2021-10-12 20:57 ` [PATCH 6/7] mm/damon/dbgfs: Support physical memory monitoring SeongJae Park
2021-10-12 20:57 ` [PATCH 7/7] Docs/DAMON: Document physical memory monitoring support SeongJae Park
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=20211012205711.29216-4-sj@kernel.org \
--to=sj@kernel.org \
--cc=Jonathan.Cameron@Huawei.com \
--cc=akpm@linux-foundation.org \
--cc=amit@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=dwmw@amazon.com \
--cc=elver@google.com \
--cc=foersleo@amazon.de \
--cc=gthelen@google.com \
--cc=linux-damon@amazon.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=markubo@amazon.de \
--cc=rientjes@google.com \
--cc=shakeelb@google.com \
--cc=shuah@kernel.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