[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200603141135.10575-10-sjpark@amazon.com>
Date: Wed, 3 Jun 2020 16:11:35 +0200
From: SeongJae Park <sjpark@...zon.com>
To: <akpm@...ux-foundation.org>
CC: SeongJae Park <sjpark@...zon.de>, <Jonathan.Cameron@...wei.com>,
<aarcange@...hat.com>, <acme@...nel.org>,
<alexander.shishkin@...ux.intel.com>, <amit@...nel.org>,
<benh@...nel.crashing.org>, <brendan.d.gregg@...il.com>,
<brendanhiggins@...gle.com>, <cai@....pw>,
<colin.king@...onical.com>, <corbet@....net>, <dwmw@...zon.com>,
<foersleo@...zon.de>, <irogers@...gle.com>, <jolsa@...hat.com>,
<kirill@...temov.name>, <mark.rutland@....com>, <mgorman@...e.de>,
<minchan@...nel.org>, <mingo@...hat.com>, <namhyung@...nel.org>,
<peterz@...radead.org>, <rdunlap@...radead.org>,
<riel@...riel.com>, <rientjes@...gle.com>, <rostedt@...dmis.org>,
<sblbir@...zon.com>, <shakeelb@...gle.com>, <shuah@...nel.org>,
<sj38.park@...il.com>, <snu@...zon.de>, <vbabka@...e.cz>,
<vdavydov.dev@...il.com>, <yang.shi@...ux.alibaba.com>,
<ying.huang@...el.com>, <linux-damon@...zon.com>,
<linux-mm@...ck.org>, <linux-doc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [RFC v2 9/9] Docs/damon: Document physical memory monitoring support
From: SeongJae Park <sjpark@...zon.de>
This commit adds description for the physical memory monitoring usage in
the DAMON document.
Signed-off-by: SeongJae Park <sjpark@...zon.de>
---
Documentation/admin-guide/mm/damon/usage.rst | 42 ++++++++++++++------
1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index 137ed770c2d6..359745f0dbfb 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -314,27 +314,42 @@ check it again::
Target PIDs
-----------
-Users can get and set the pids of monitoring target processes by reading from
-and writing to the ``pids`` file. For example, below commands set processes
-having pids 42 and 4242 as the processes to be monitored and check it again::
+To monitor the virtual memory address spaces of specific processes, users can
+get and set the pids of monitoring target processes by reading from and writing
+to the ``pids`` file. For example, below commands set processes having pids 42
+and 4242 as the processes to be monitored and check it again::
# cd <debugfs>/damon
# echo 42 4242 > pids
# cat pids
42 4242
+Users can also monitor the physical memory address space of the system by
+writing a special keyword, "``paddr\n``" to the file. In this case, reading the
+file will show ``-1``, as below::
+
+ # cd <debugfs>/damon
+ # echo paddr > pids
+ # cat pids
+ -1
+
Note that setting the pids doesn't start the monitoring.
Initla 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 case of the virtual memory monitoring, 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 contrast, DAMON do not automatically sets and updates the monitoring target
+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
@@ -354,10 +369,11 @@ region of process 42, and another couple of address ranges, ``20-40`` and
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.
+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.
Record
--
2.17.1
Powered by blists - more mailing lists