xref: /linux/Documentation/admin-guide/mm/damon/usage.rst (revision 114b480877698f7835a5ba95c6fbd97b63b119f6)
1c4ba6014SSeongJae Park.. SPDX-License-Identifier: GPL-2.0
2c4ba6014SSeongJae Park
3c4ba6014SSeongJae Park===============
4c4ba6014SSeongJae ParkDetailed Usages
5c4ba6014SSeongJae Park===============
6c4ba6014SSeongJae Park
7b1840272SSeongJae ParkDAMON provides below interfaces for different users.
8c4ba6014SSeongJae Park
9c4ba6014SSeongJae Park- *DAMON user space tool.*
1023a425aaSSeongJae Park  `This <https://github.com/damonitor/damo>`_ is for privileged people such as
1135b43d40SSeongJae Park  system administrators who want a just-working human-friendly interface.
1235b43d40SSeongJae Park  Using this, users can use the DAMON’s major features in a human-friendly way.
13ddb7d012SSeongJae Park  It may not be highly tuned for special cases, though.  For more detail,
14ddb7d012SSeongJae Park  please refer to its `usage document
1523a425aaSSeongJae Park  <https://github.com/damonitor/damo/blob/next/USAGE.md>`_.
16b1840272SSeongJae Park- *sysfs interface.*
17b1840272SSeongJae Park  :ref:`This <sysfs_interface>` is for privileged user space programmers who
1835b43d40SSeongJae Park  want more optimized use of DAMON.  Using this, users can use DAMON’s major
19b1840272SSeongJae Park  features by reading from and writing to special sysfs files.  Therefore,
20b1840272SSeongJae Park  you can write and use your personalized DAMON sysfs wrapper programs that
21b1840272SSeongJae Park  reads/writes the sysfs files instead of you.  The `DAMON user space tool
2223a425aaSSeongJae Park  <https://github.com/damonitor/damo>`_ is one example of such programs.
23c4ba6014SSeongJae Park- *Kernel Space Programming Interface.*
24ee65728eSMike Rapoport  :doc:`This </mm/damon/api>` is for kernel space programmers.  Using this,
2535b43d40SSeongJae Park  users can utilize every feature of DAMON most flexibly and efficiently by
2635b43d40SSeongJae Park  writing kernel space DAMON application programs for you.  You can even extend
2735b43d40SSeongJae Park  DAMON for various address spaces.  For detail, please refer to the interface
28ee65728eSMike Rapoport  :doc:`document </mm/damon/api>`.
29c4ba6014SSeongJae Park
30b1840272SSeongJae Park.. _sysfs_interface:
31b1840272SSeongJae Park
32b1840272SSeongJae Parksysfs Interface
33b1840272SSeongJae Park===============
34b1840272SSeongJae Park
35b1840272SSeongJae ParkDAMON sysfs interface is built when ``CONFIG_DAMON_SYSFS`` is defined.  It
36b1840272SSeongJae Parkcreates multiple directories and files under its sysfs directory,
37b1840272SSeongJae Park``<sysfs>/kernel/mm/damon/``.  You can control DAMON by writing to and reading
38b1840272SSeongJae Parkfrom the files under the directory.
39b1840272SSeongJae Park
40b1840272SSeongJae ParkFor a short example, users can monitor the virtual address space of a given
41b1840272SSeongJae Parkworkload as below. ::
42b1840272SSeongJae Park
43b1840272SSeongJae Park    # cd /sys/kernel/mm/damon/admin/
44465d0eb0SKairui Song    # echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts
45b1840272SSeongJae Park    # echo vaddr > kdamonds/0/contexts/0/operations
46465d0eb0SKairui Song    # echo 1 > kdamonds/0/contexts/0/targets/nr_targets
47465d0eb0SKairui Song    # echo $(pidof <workload>) > kdamonds/0/contexts/0/targets/0/pid_target
48b1840272SSeongJae Park    # echo on > kdamonds/0/state
49b1840272SSeongJae Park
50b1840272SSeongJae ParkFiles Hierarchy
51b1840272SSeongJae Park---------------
52b1840272SSeongJae Park
53b1840272SSeongJae ParkThe files hierarchy of DAMON sysfs interface is shown below.  In the below
54b1840272SSeongJae Parkfigure, parents-children relations are represented with indentations, each
55b1840272SSeongJae Parkdirectory is having ``/`` suffix, and files in each directory are separated by
569c8c315dSSeongJae Parkcomma (",").
57b1840272SSeongJae Park
589c8c315dSSeongJae Park.. parsed-literal::
599c8c315dSSeongJae Park
609c8c315dSSeongJae Park    :ref:`/sys/kernel/mm/damon <sysfs_root>`/admin
619c8c315dSSeongJae Park    │ :ref:`kdamonds <sysfs_kdamonds>`/nr_kdamonds
629c8c315dSSeongJae Park    │ │ :ref:`0 <sysfs_kdamond>`/state,pid
639c8c315dSSeongJae Park    │ │ │ :ref:`contexts <sysfs_contexts>`/nr_contexts
649c8c315dSSeongJae Park    │ │ │ │ :ref:`0 <sysfs_context>`/avail_operations,operations
659c8c315dSSeongJae Park    │ │ │ │ │ :ref:`monitoring_attrs <sysfs_monitoring_attrs>`/
66b1840272SSeongJae Park    │ │ │ │ │ │ intervals/sample_us,aggr_us,update_us
67b243d666SSeongJae Park    │ │ │ │ │ │ │ intervals_goal/access_bp,aggrs,min_sample_us,max_sample_us
68b1840272SSeongJae Park    │ │ │ │ │ │ nr_regions/min,max
699c8c315dSSeongJae Park    │ │ │ │ │ :ref:`targets <sysfs_targets>`/nr_targets
709c8c315dSSeongJae Park    │ │ │ │ │ │ :ref:`0 <sysfs_target>`/pid_target
719c8c315dSSeongJae Park    │ │ │ │ │ │ │ :ref:`regions <sysfs_regions>`/nr_regions
729c8c315dSSeongJae Park    │ │ │ │ │ │ │ │ :ref:`0 <sysfs_region>`/start,end
73b1840272SSeongJae Park    │ │ │ │ │ │ │ │ ...
74b1840272SSeongJae Park    │ │ │ │ │ │ ...
759c8c315dSSeongJae Park    │ │ │ │ │ :ref:`schemes <sysfs_schemes>`/nr_schemes
7683d0d46aSHonggyu Kim    │ │ │ │ │ │ :ref:`0 <sysfs_scheme>`/action,target_nid,apply_interval_us
779c8c315dSSeongJae Park    │ │ │ │ │ │ │ :ref:`access_pattern <sysfs_access_pattern>`/
78b1840272SSeongJae Park    │ │ │ │ │ │ │ │ sz/min,max
79b1840272SSeongJae Park    │ │ │ │ │ │ │ │ nr_accesses/min,max
80b1840272SSeongJae Park    │ │ │ │ │ │ │ │ age/min,max
81a6068d6dSSeongJae Park    │ │ │ │ │ │ │ :ref:`quotas <sysfs_quotas>`/ms,bytes,reset_interval_ms,effective_bytes
82b1840272SSeongJae Park    │ │ │ │ │ │ │ │ weights/sz_permil,nr_accesses_permil,age_permil
839c8c315dSSeongJae Park    │ │ │ │ │ │ │ │ :ref:`goals <sysfs_schemes_quota_goals>`/nr_goals
8457e88e86SSeongJae Park    │ │ │ │ │ │ │ │ │ 0/target_metric,target_value,current_value
859c8c315dSSeongJae Park    │ │ │ │ │ │ │ :ref:`watermarks <sysfs_watermarks>`/metric,interval_us,high,mid,low
86*114b4808SSeongJae Park    │ │ │ │ │ │ │ :ref:`{core_,ops_,}filters <sysfs_filters>`/nr_filters
874ddb2092SUsama Arif    │ │ │ │ │ │ │ │ 0/type,matching,allow,memcg_path,addr_start,addr_end,target_idx,min,max
886bbdb28dSSeongJae Park    │ │ │ │ │ │ │ :ref:`stats <sysfs_schemes_stats>`/nr_tried,sz_tried,nr_applied,sz_applied,sz_ops_filter_passed,qt_exceeds
899c8c315dSSeongJae Park    │ │ │ │ │ │ │ :ref:`tried_regions <sysfs_schemes_tried_regions>`/total_bytes
90f423944bSSeongJae Park    │ │ │ │ │ │ │ │ 0/start,end,nr_accesses,age,sz_filter_passed
917f0a86f3SSeongJae Park    │ │ │ │ │ │ │ │ ...
92b1840272SSeongJae Park    │ │ │ │ │ │ ...
93b1840272SSeongJae Park    │ │ │ │ ...
94b1840272SSeongJae Park    │ │ ...
95b1840272SSeongJae Park
969c8c315dSSeongJae Park.. _sysfs_root:
979c8c315dSSeongJae Park
98b1840272SSeongJae ParkRoot
99b1840272SSeongJae Park----
100b1840272SSeongJae Park
101b1840272SSeongJae ParkThe root of the DAMON sysfs interface is ``<sysfs>/kernel/mm/damon/``, and it
102b1840272SSeongJae Parkhas one directory named ``admin``.  The directory contains the files for
103d56b699dSBjorn Helgaasprivileged user space programs' control of DAMON.  User space tools or daemons
104b1840272SSeongJae Parkhaving the root permission could use this directory.
105b1840272SSeongJae Park
1069c8c315dSSeongJae Park.. _sysfs_kdamonds:
1079c8c315dSSeongJae Park
108b1840272SSeongJae Parkkdamonds/
109b1840272SSeongJae Park---------
110b1840272SSeongJae Park
111b1840272SSeongJae ParkUnder the ``admin`` directory, one directory, ``kdamonds``, which has files for
11246158bf2SSeongJae Parkcontrolling the kdamonds (refer to
11346158bf2SSeongJae Park:ref:`design <damon_design_execution_model_and_data_structures>` for more
11446158bf2SSeongJae Parkdetails) exists.  In the beginning, this directory has only one file,
11546158bf2SSeongJae Park``nr_kdamonds``.  Writing a number (``N``) to the file creates the number of
11646158bf2SSeongJae Parkchild directories named ``0`` to ``N-1``.  Each directory represents each
117b1840272SSeongJae Parkkdamond.
118b1840272SSeongJae Park
1196140edeeSSeongJae Park.. _sysfs_kdamond:
1206140edeeSSeongJae Park
121b1840272SSeongJae Parkkdamonds/<N>/
122b1840272SSeongJae Park-------------
123b1840272SSeongJae Park
124b1840272SSeongJae ParkIn each kdamond directory, two files (``state`` and ``pid``) and one directory
125b1840272SSeongJae Park(``contexts``) exist.
126b1840272SSeongJae Park
127b1840272SSeongJae ParkReading ``state`` returns ``on`` if the kdamond is currently running, or
128e93b81a3SSeongJae Park``off`` if it is not running.
1296140edeeSSeongJae Park
130e93b81a3SSeongJae ParkUsers can write below commands for the kdamond to the ``state`` file.
1316140edeeSSeongJae Park
132e93b81a3SSeongJae Park- ``on``: Start running.
133e93b81a3SSeongJae Park- ``off``: Stop running.
134e93b81a3SSeongJae Park- ``commit``: Read the user inputs in the sysfs files except ``state`` file
135e93b81a3SSeongJae Park  again.
136b243d666SSeongJae Park- ``update_tuned_intervals``: Update the contents of ``sample_us`` and
137b243d666SSeongJae Park  ``aggr_us`` files of the kdamond with the auto-tuning applied ``sampling
138b243d666SSeongJae Park  interval`` and ``aggregation interval`` for the files.  Please refer to
139b243d666SSeongJae Park  :ref:`intervals_goal section <damon_usage_sysfs_monitoring_intervals_goal>`
140b243d666SSeongJae Park  for more details.
141e93b81a3SSeongJae Park- ``commit_schemes_quota_goals``: Read the DAMON-based operation schemes'
142e93b81a3SSeongJae Park  :ref:`quota goals <sysfs_schemes_quota_goals>`.
143e93b81a3SSeongJae Park- ``update_schemes_stats``: Update the contents of stats files for each
144e93b81a3SSeongJae Park  DAMON-based operation scheme of the kdamond.  For details of the stats,
145e93b81a3SSeongJae Park  please refer to :ref:`stats section <sysfs_schemes_stats>`.
146e93b81a3SSeongJae Park- ``update_schemes_tried_regions``: Update the DAMON-based operation scheme
147e93b81a3SSeongJae Park  action tried regions directory for each DAMON-based operation scheme of the
148e93b81a3SSeongJae Park  kdamond.  For details of the DAMON-based operation scheme action tried
149e93b81a3SSeongJae Park  regions directory, please refer to
150e93b81a3SSeongJae Park  :ref:`tried_regions section <sysfs_schemes_tried_regions>`.
151e93b81a3SSeongJae Park- ``update_schemes_tried_bytes``: Update only ``.../tried_regions/total_bytes``
152e93b81a3SSeongJae Park  files.
153e93b81a3SSeongJae Park- ``clear_schemes_tried_regions``: Clear the DAMON-based operating scheme
154e93b81a3SSeongJae Park  action tried regions directory for each DAMON-based operation scheme of the
155e93b81a3SSeongJae Park  kdamond.
15614e70e46SSeongJae Park- ``update_schemes_effective_quotas``: Update the contents of
157a6068d6dSSeongJae Park  ``effective_bytes`` files for each DAMON-based operation scheme of the
158a6068d6dSSeongJae Park  kdamond.  For more details, refer to :ref:`quotas directory <sysfs_quotas>`.
159b1840272SSeongJae Park
160b1840272SSeongJae ParkIf the state is ``on``, reading ``pid`` shows the pid of the kdamond thread.
161b1840272SSeongJae Park
162b1840272SSeongJae Park``contexts`` directory contains files for controlling the monitoring contexts
163b1840272SSeongJae Parkthat this kdamond will execute.
164b1840272SSeongJae Park
1659c8c315dSSeongJae Park.. _sysfs_contexts:
1669c8c315dSSeongJae Park
167b1840272SSeongJae Parkkdamonds/<N>/contexts/
168b1840272SSeongJae Park----------------------
169b1840272SSeongJae Park
170b1840272SSeongJae ParkIn the beginning, this directory has only one file, ``nr_contexts``.  Writing a
171b1840272SSeongJae Parknumber (``N``) to the file creates the number of child directories named as
17246158bf2SSeongJae Park``0`` to ``N-1``.  Each directory represents each monitoring context (refer to
17346158bf2SSeongJae Park:ref:`design <damon_design_execution_model_and_data_structures>` for more
17446158bf2SSeongJae Parkdetails).  At the moment, only one context per kdamond is supported, so only
17546158bf2SSeongJae Park``0`` or ``1`` can be written to the file.
176b1840272SSeongJae Park
177c7ae9634SSeongJae Park.. _sysfs_context:
1789b7f9322SSeongJae Park
179b1840272SSeongJae Parkcontexts/<N>/
180b1840272SSeongJae Park-------------
181b1840272SSeongJae Park
1822fe60ec9SSeongJae ParkIn each context directory, two files (``avail_operations`` and ``operations``)
1832fe60ec9SSeongJae Parkand three directories (``monitoring_attrs``, ``targets``, and ``schemes``)
1842fe60ec9SSeongJae Parkexist.
185b1840272SSeongJae Park
186669971b4SSeongJae ParkDAMON supports multiple types of :ref:`monitoring operations
187669971b4SSeongJae Park<damon_design_configurable_operations_set>`, including those for virtual address
188669971b4SSeongJae Parkspace and the physical address space.  You can get the list of available
189669971b4SSeongJae Parkmonitoring operations set on the currently running kernel by reading
1902fe60ec9SSeongJae Park``avail_operations`` file.  Based on the kernel configuration, the file will
191669971b4SSeongJae Parklist different available operation sets.  Please refer to the :ref:`design
192669971b4SSeongJae Park<damon_operations_set>` for the list of all available operation sets and their
193669971b4SSeongJae Parkbrief explanations.
19491541808SSeongJae Park
1952fe60ec9SSeongJae ParkYou can set and get what type of monitoring operations DAMON will use for the
1962fe60ec9SSeongJae Parkcontext by writing one of the keywords listed in ``avail_operations`` file and
1972fe60ec9SSeongJae Parkreading from the ``operations`` file.
1982fe60ec9SSeongJae Park
1997f0a86f3SSeongJae Park.. _sysfs_monitoring_attrs:
2007f0a86f3SSeongJae Park
201b1840272SSeongJae Parkcontexts/<N>/monitoring_attrs/
202b1840272SSeongJae Park------------------------------
203b1840272SSeongJae Park
204b1840272SSeongJae ParkFiles for specifying attributes of the monitoring including required quality
205b1840272SSeongJae Parkand efficiency of the monitoring are in ``monitoring_attrs`` directory.
206b1840272SSeongJae ParkSpecifically, two directories, ``intervals`` and ``nr_regions`` exist in this
207b1840272SSeongJae Parkdirectory.
208b1840272SSeongJae Park
209b1840272SSeongJae ParkUnder ``intervals`` directory, three files for DAMON's sampling interval
210b1840272SSeongJae Park(``sample_us``), aggregation interval (``aggr_us``), and update interval
211b1840272SSeongJae Park(``update_us``) exist.  You can set and get the values in micro-seconds by
212b1840272SSeongJae Parkwriting to and reading from the files.
213b1840272SSeongJae Park
214b1840272SSeongJae ParkUnder ``nr_regions`` directory, two files for the lower-bound and upper-bound
215b1840272SSeongJae Parkof DAMON's monitoring regions (``min`` and ``max``, respectively), which
216b1840272SSeongJae Parkcontrols the monitoring overhead, exist.  You can set and get the values by
217b1840272SSeongJae Parkwriting to and rading from the files.
218b1840272SSeongJae Park
219b1840272SSeongJae ParkFor more details about the intervals and monitoring regions range, please refer
220ee65728eSMike Rapoportto the Design document (:doc:`/mm/damon/design`).
221b1840272SSeongJae Park
222b243d666SSeongJae Park.. _damon_usage_sysfs_monitoring_intervals_goal:
223b243d666SSeongJae Park
224b243d666SSeongJae Parkcontexts/<N>/monitoring_attrs/intervals/intervals_goal/
225b243d666SSeongJae Park-------------------------------------------------------
226b243d666SSeongJae Park
227b243d666SSeongJae ParkUnder the ``intervals`` directory, one directory for automated tuning of
228b243d666SSeongJae Park``sample_us`` and ``aggr_us``, namely ``intervals_goal`` directory also exists.
229b243d666SSeongJae ParkUnder the directory, four files for the auto-tuning control, namely
230b243d666SSeongJae Park``access_bp``, ``aggrs``, ``min_sample_us`` and ``max_sample_us`` exist.
231b243d666SSeongJae ParkPlease refer to  the :ref:`design document of the feature
232b243d666SSeongJae Park<damon_design_monitoring_intervals_autotuning>` for the internal of the tuning
233b243d666SSeongJae Parkmechanism.  Reading and writing the four files under ``intervals_goal``
234b243d666SSeongJae Parkdirectory shows and updates the tuning parameters that described in the
235b243d666SSeongJae Park:ref:design doc <damon_design_monitoring_intervals_autotuning>` with the same
236b243d666SSeongJae Parknames.  The tuning starts with the user-set ``sample_us`` and ``aggr_us``.  The
237b243d666SSeongJae Parktuning-applied current values of the two intervals can be read from the
238b243d666SSeongJae Park``sample_us`` and ``aggr_us`` files after writing ``update_tuned_intervals`` to
239b243d666SSeongJae Parkthe ``state`` file.
240b243d666SSeongJae Park
2419c8c315dSSeongJae Park.. _sysfs_targets:
2429c8c315dSSeongJae Park
243b1840272SSeongJae Parkcontexts/<N>/targets/
244b1840272SSeongJae Park---------------------
245b1840272SSeongJae Park
246b1840272SSeongJae ParkIn the beginning, this directory has only one file, ``nr_targets``.  Writing a
247b1840272SSeongJae Parknumber (``N``) to the file creates the number of child directories named ``0``
248b1840272SSeongJae Parkto ``N-1``.  Each directory represents each monitoring target.
249b1840272SSeongJae Park
2509c8c315dSSeongJae Park.. _sysfs_target:
2519c8c315dSSeongJae Park
252b1840272SSeongJae Parktargets/<N>/
253b1840272SSeongJae Park------------
254b1840272SSeongJae Park
255b1840272SSeongJae ParkIn each target directory, one file (``pid_target``) and one directory
256b1840272SSeongJae Park(``regions``) exist.
257b1840272SSeongJae Park
258b1840272SSeongJae ParkIf you wrote ``vaddr`` to the ``contexts/<N>/operations``, each target should
259b1840272SSeongJae Parkbe a process.  You can specify the process to DAMON by writing the pid of the
260b1840272SSeongJae Parkprocess to the ``pid_target`` file.
261b1840272SSeongJae Park
26291541808SSeongJae Park.. _sysfs_regions:
26391541808SSeongJae Park
264b1840272SSeongJae Parktargets/<N>/regions
265b1840272SSeongJae Park-------------------
266b1840272SSeongJae Park
2672d89957cSSeongJae ParkIn case of ``fvaddr`` or ``paddr`` monitoring operations sets, users are
2682d89957cSSeongJae Parkrequired to set the monitoring target address ranges.  In case of ``vaddr``
2692d89957cSSeongJae Parkoperations set, it is not mandatory, but users can optionally set the initial
2702d89957cSSeongJae Parkmonitoring region to specific address ranges.  Please refer to the :ref:`design
2712d89957cSSeongJae Park<damon_design_vaddr_target_regions_construction>` for more details.
272b1840272SSeongJae Park
273b1840272SSeongJae ParkFor such cases, users can explicitly set the initial monitoring target regions
274b1840272SSeongJae Parkas they want, by writing proper values to the files under this directory.
275b1840272SSeongJae Park
276b1840272SSeongJae ParkIn the beginning, this directory has only one file, ``nr_regions``.  Writing a
277b1840272SSeongJae Parknumber (``N``) to the file creates the number of child directories named ``0``
278b1840272SSeongJae Parkto ``N-1``.  Each directory represents each initial monitoring target region.
279b1840272SSeongJae Park
2809c8c315dSSeongJae Park.. _sysfs_region:
2819c8c315dSSeongJae Park
282b1840272SSeongJae Parkregions/<N>/
283b1840272SSeongJae Park------------
284b1840272SSeongJae Park
285b1840272SSeongJae ParkIn each region directory, you will find two files (``start`` and ``end``).  You
286b1840272SSeongJae Parkcan set and get the start and end addresses of the initial monitoring target
287b1840272SSeongJae Parkregion by writing to and reading from the files, respectively.
288b1840272SSeongJae Park
289bd414929SSeongJae ParkEach region should not overlap with others.  ``end`` of directory ``N`` should
290bd414929SSeongJae Parkbe equal or smaller than ``start`` of directory ``N+1``.
291bd414929SSeongJae Park
2929c8c315dSSeongJae Park.. _sysfs_schemes:
2939c8c315dSSeongJae Park
294b1840272SSeongJae Parkcontexts/<N>/schemes/
295b1840272SSeongJae Park---------------------
296b1840272SSeongJae Park
29701e08737SSeongJae ParkThe directory for DAMON-based Operation Schemes (:ref:`DAMOS
29801e08737SSeongJae Park<damon_design_damos>`).  Users can get and set the schemes by reading from and
29901e08737SSeongJae Parkwriting to files under this directory.
300b1840272SSeongJae Park
301b1840272SSeongJae ParkIn the beginning, this directory has only one file, ``nr_schemes``.  Writing a
302b1840272SSeongJae Parknumber (``N``) to the file creates the number of child directories named ``0``
303b1840272SSeongJae Parkto ``N-1``.  Each directory represents each DAMON-based operation scheme.
304b1840272SSeongJae Park
3059c8c315dSSeongJae Park.. _sysfs_scheme:
3069c8c315dSSeongJae Park
307b1840272SSeongJae Parkschemes/<N>/
308b1840272SSeongJae Park------------
309b1840272SSeongJae Park
310*114b4808SSeongJae ParkIn each scheme directory, seven directories (``access_pattern``, ``quotas``,
311*114b4808SSeongJae Park``watermarks``, ``core_filters``, ``ops_filters``, ``filters``, ``stats``, and
312*114b4808SSeongJae Park``tried_regions``) and three files (``action``, ``target_nid`` and
313*114b4808SSeongJae Park``apply_interval``) exist.
314b1840272SSeongJae Park
31501e08737SSeongJae ParkThe ``action`` file is for setting and getting the scheme's :ref:`action
31601e08737SSeongJae Park<damon_design_damos_action>`.  The keywords that can be written to and read
3175b7708e6SSeongJae Parkfrom the file and their meaning are same to those of the list on
3185b7708e6SSeongJae Park:ref:`design doc <damon_design_damos_action>`.
319b1840272SSeongJae Park
32083d0d46aSHonggyu KimThe ``target_nid`` file is for setting the migration target node, which is
32183d0d46aSHonggyu Kimonly meaningful when the ``action`` is either ``migrate_hot`` or
32283d0d46aSHonggyu Kim``migrate_cold``.
32383d0d46aSHonggyu Kim
324033343d5SSeongJae ParkThe ``apply_interval_us`` file is for setting and getting the scheme's
325033343d5SSeongJae Park:ref:`apply_interval <damon_design_damos>` in microseconds.
326033343d5SSeongJae Park
3279c8c315dSSeongJae Park.. _sysfs_access_pattern:
3289c8c315dSSeongJae Park
329b1840272SSeongJae Parkschemes/<N>/access_pattern/
330b1840272SSeongJae Park---------------------------
331b1840272SSeongJae Park
33201e08737SSeongJae ParkThe directory for the target access :ref:`pattern
33301e08737SSeongJae Park<damon_design_damos_access_pattern>` of the given DAMON-based operation scheme.
334b1840272SSeongJae Park
335b1840272SSeongJae ParkUnder the ``access_pattern`` directory, three directories (``sz``,
336b1840272SSeongJae Park``nr_accesses``, and ``age``) each having two files (``min`` and ``max``)
337b1840272SSeongJae Parkexist.  You can set and get the access pattern for the given scheme by writing
338b1840272SSeongJae Parkto and reading from the ``min`` and ``max`` files under ``sz``,
33967c34f6cSSeongJae Park``nr_accesses``, and ``age`` directories, respectively.  Note that the ``min``
34067c34f6cSSeongJae Parkand the ``max`` form a closed interval.
341b1840272SSeongJae Park
3429c8c315dSSeongJae Park.. _sysfs_quotas:
3439c8c315dSSeongJae Park
344b1840272SSeongJae Parkschemes/<N>/quotas/
345b1840272SSeongJae Park-------------------
346b1840272SSeongJae Park
34701e08737SSeongJae ParkThe directory for the :ref:`quotas <damon_design_damos_quotas>` of the given
34801e08737SSeongJae ParkDAMON-based operation scheme.
349b1840272SSeongJae Park
350a6068d6dSSeongJae ParkUnder ``quotas`` directory, four files (``ms``, ``bytes``,
351a6068d6dSSeongJae Park``reset_interval_ms``, ``effective_bytes``) and two directores (``weights`` and
352a6068d6dSSeongJae Park``goals``) exist.
353b1840272SSeongJae Park
354b1840272SSeongJae ParkYou can set the ``time quota`` in milliseconds, ``size quota`` in bytes, and
355b1840272SSeongJae Park``reset interval`` in milliseconds by writing the values to the three files,
35667c34f6cSSeongJae Parkrespectively.  Then, DAMON tries to use only up to ``time quota`` milliseconds
35767c34f6cSSeongJae Parkfor applying the ``action`` to memory regions of the ``access_pattern``, and to
35867c34f6cSSeongJae Parkapply the action to only up to ``bytes`` bytes of memory regions within the
35967c34f6cSSeongJae Park``reset_interval_ms``.  Setting both ``ms`` and ``bytes`` zero disables the
3607d8cebb9SSeongJae Parkquota limits unless at least one :ref:`goal <sysfs_schemes_quota_goals>` is
3617d8cebb9SSeongJae Parkset.
36267c34f6cSSeongJae Park
363a6068d6dSSeongJae ParkThe time quota is internally transformed to a size quota.  Between the
364a6068d6dSSeongJae Parktransformed size quota and user-specified size quota, smaller one is applied.
365a6068d6dSSeongJae ParkBased on the user-specified :ref:`goal <sysfs_schemes_quota_goals>`, the
366a6068d6dSSeongJae Parkeffective size quota is further adjusted.  Reading ``effective_bytes`` returns
367a6068d6dSSeongJae Parkthe current effective size quota.  The file is not updated in real time, so
368a6068d6dSSeongJae Parkusers should ask DAMON sysfs interface to update the content of the file for
36914e70e46SSeongJae Parkthe stats by writing a special keyword, ``update_schemes_effective_quotas`` to
370a6068d6dSSeongJae Parkthe relevant ``kdamonds/<N>/state`` file.
371a6068d6dSSeongJae Park
3726140edeeSSeongJae ParkUnder ``weights`` directory, three files (``sz_permil``,
3736140edeeSSeongJae Park``nr_accesses_permil``, and ``age_permil``) exist.
3746140edeeSSeongJae ParkYou can set the :ref:`prioritization weights
37501e08737SSeongJae Park<damon_design_damos_quotas_prioritization>` for size, access frequency, and age
37601e08737SSeongJae Parkin per-thousand unit by writing the values to the three files under the
37701e08737SSeongJae Park``weights`` directory.
378b1840272SSeongJae Park
3796140edeeSSeongJae Park.. _sysfs_schemes_quota_goals:
3806140edeeSSeongJae Park
3816140edeeSSeongJae Parkschemes/<N>/quotas/goals/
3826140edeeSSeongJae Park-------------------------
3836140edeeSSeongJae Park
3846140edeeSSeongJae ParkThe directory for the :ref:`automatic quota tuning goals
3856140edeeSSeongJae Park<damon_design_damos_quotas_auto_tuning>` of the given DAMON-based operation
3866140edeeSSeongJae Parkscheme.
3876140edeeSSeongJae Park
3886140edeeSSeongJae ParkIn the beginning, this directory has only one file, ``nr_goals``.  Writing a
3896140edeeSSeongJae Parknumber (``N``) to the file creates the number of child directories named ``0``
3906140edeeSSeongJae Parkto ``N-1``.  Each directory represents each goal and current achievement.
3916140edeeSSeongJae ParkAmong the multiple feedback, the best one is used.
3926140edeeSSeongJae Park
39357e88e86SSeongJae ParkEach goal directory contains three files, namely ``target_metric``,
39457e88e86SSeongJae Park``target_value`` and ``current_value``.  Users can set and get the three
39557e88e86SSeongJae Parkparameters for the quota auto-tuning goals that specified on the :ref:`design
39657e88e86SSeongJae Parkdoc <damon_design_damos_quotas_auto_tuning>` by writing to and reading from each
39757e88e86SSeongJae Parkof the files.  Note that users should further write
3986140edeeSSeongJae Park``commit_schemes_quota_goals`` to the ``state`` file of the :ref:`kdamond
3996140edeeSSeongJae Parkdirectory <sysfs_kdamond>` to pass the feedback to DAMON.
4006140edeeSSeongJae Park
4019c8c315dSSeongJae Park.. _sysfs_watermarks:
4029c8c315dSSeongJae Park
403b1840272SSeongJae Parkschemes/<N>/watermarks/
404b1840272SSeongJae Park-----------------------
405b1840272SSeongJae Park
40601e08737SSeongJae ParkThe directory for the :ref:`watermarks <damon_design_damos_watermarks>` of the
40701e08737SSeongJae Parkgiven DAMON-based operation scheme.
408b1840272SSeongJae Park
409b1840272SSeongJae ParkUnder the watermarks directory, five files (``metric``, ``interval_us``,
41001e08737SSeongJae Park``high``, ``mid``, and ``low``) for setting the metric, the time interval
41101e08737SSeongJae Parkbetween check of the metric, and the three watermarks exist.  You can set and
412b1840272SSeongJae Parkget the five values by writing to the files, respectively.
413b1840272SSeongJae Park
414b1840272SSeongJae ParkKeywords and meanings of those that can be written to the ``metric`` file are
415b1840272SSeongJae Parkas below.
416b1840272SSeongJae Park
417b1840272SSeongJae Park - none: Ignore the watermarks
418b1840272SSeongJae Park - free_mem_rate: System's free memory rate (per thousand)
419b1840272SSeongJae Park
420b1840272SSeongJae ParkThe ``interval`` should written in microseconds unit.
421b1840272SSeongJae Park
4229c8c315dSSeongJae Park.. _sysfs_filters:
4239c8c315dSSeongJae Park
424*114b4808SSeongJae Parkschemes/<N>/{core\_,ops\_,}filters/
425*114b4808SSeongJae Park-----------------------------------
4269b7f9322SSeongJae Park
427*114b4808SSeongJae ParkDirectories for :ref:`filters <damon_design_damos_filters>` of the given
42801e08737SSeongJae ParkDAMON-based operation scheme.
4299b7f9322SSeongJae Park
430*114b4808SSeongJae Park``core_filters`` and ``ops_filters`` directories are for the filters handled by
431*114b4808SSeongJae Parkthe DAMON core layer and operations set layer, respectively.  ``filters``
432*114b4808SSeongJae Parkdirectory can be used for installing filters regardless of their handled
433*114b4808SSeongJae Parklayers.  Filters that requested by ``core_filters`` and ``ops_filters`` will be
434*114b4808SSeongJae Parkinstalled before those of ``filters``.  All three directories have same files.
435*114b4808SSeongJae Park
436*114b4808SSeongJae ParkUse of ``filters`` directory can make expecting evaluation orders of given
437*114b4808SSeongJae Parkfilters with the files under directory bit confusing.  Users are hence
438*114b4808SSeongJae Parkrecommended to use ``core_filters`` and ``ops_filters`` directories.  The
439*114b4808SSeongJae Park``filters`` directory could be deprecated in future.
440*114b4808SSeongJae Park
441*114b4808SSeongJae ParkIn the beginning, the directory has only one file, ``nr_filters``.  Writing a
4429b7f9322SSeongJae Parknumber (``N``) to the file creates the number of child directories named ``0``
4439b7f9322SSeongJae Parkto ``N-1``.  Each directory represents each filter.  The filters are evaluated
4449b7f9322SSeongJae Parkin the numeric order.
4459b7f9322SSeongJae Park
4464ddb2092SUsama ArifEach filter directory contains nine files, namely ``type``, ``matching``,
4474ddb2092SUsama Arif``allow``, ``memcg_path``, ``addr_start``, ``addr_end``, ``min``, ``max``
4480f28583bSSeongJae Parkand ``target_idx``.  To ``type`` file, you can write the type of the filter.
4490f28583bSSeongJae ParkRefer to :ref:`the design doc <damon_design_damos_filters>` for available type
450*114b4808SSeongJae Parknames, their meaning and on what layer those are handled.
4515bce4947SSeongJae Park
4520f28583bSSeongJae ParkFor ``memcg`` type, you can specify the memory cgroup of the interest by
4530f28583bSSeongJae Parkwriting the path of the memory cgroup from the cgroups mount point to
4540f28583bSSeongJae Park``memcg_path`` file.  For ``addr`` type, you can specify the start and end
4550f28583bSSeongJae Parkaddress of the range (open-ended interval) to ``addr_start`` and ``addr_end``
4560f28583bSSeongJae Parkfiles, respectively.  For ``hugepage_size`` type, you can specify the minimum
4570f28583bSSeongJae Parkand maximum size of the range (closed interval) to ``min`` and ``max`` files,
4580f28583bSSeongJae Parkrespectively.  For ``target`` type, you can specify the index of the target
4590f28583bSSeongJae Parkbetween the list of the DAMON context's monitoring targets list to
4600f28583bSSeongJae Park``target_idx`` file.
4615bce4947SSeongJae Park
462bc6f663aSSeongJae ParkYou can write ``Y`` or ``N`` to ``matching`` file to specify whether the filter
463bc6f663aSSeongJae Parkis for memory that matches the ``type``.  You can write ``Y`` or ``N`` to
464bc6f663aSSeongJae Park``allow`` file to specify if applying the action to the memory that satisfies
465bc6f663aSSeongJae Parkthe ``type`` and ``matching`` should be allowed or not.
4669b7f9322SSeongJae Park
4679b7f9322SSeongJae ParkFor example, below restricts a DAMOS action to be applied to only non-anonymous
4689b7f9322SSeongJae Parkpages of all memory cgroups except ``/having_care_already``.::
4699b7f9322SSeongJae Park
470*114b4808SSeongJae Park    # cd ops_filters/0/
4719b7f9322SSeongJae Park    # echo 2 > nr_filters
472bc6f663aSSeongJae Park    # # disallow anonymous pages
4739b7f9322SSeongJae Park    echo anon > 0/type
4749b7f9322SSeongJae Park    echo Y > 0/matching
475bc6f663aSSeongJae Park    echo N > 0/allow
4769b7f9322SSeongJae Park    # # further filter out all cgroups except one at '/having_care_already'
4779b7f9322SSeongJae Park    echo memcg > 1/type
4789b7f9322SSeongJae Park    echo /having_care_already > 1/memcg_path
479da2a0618SSeongJae Park    echo Y > 1/matching
480bc6f663aSSeongJae Park    echo N > 1/allow
4819b7f9322SSeongJae Park
4825bce4947SSeongJae ParkRefer to the :ref:`DAMOS filters design documentation
483bc6f663aSSeongJae Park<damon_design_damos_filters>` for more details including how multiple filters
484bc6f663aSSeongJae Parkof different ``allow`` works, when each of the filters are supported, and
485bc6f663aSSeongJae Parkdifferences on stats.
4869b7f9322SSeongJae Park
487b1840272SSeongJae Park.. _sysfs_schemes_stats:
488b1840272SSeongJae Park
489b1840272SSeongJae Parkschemes/<N>/stats/
490b1840272SSeongJae Park------------------
491b1840272SSeongJae Park
4926bbdb28dSSeongJae ParkDAMON counts statistics for each scheme.  This statistics can be used for
4936bbdb28dSSeongJae Parkonline analysis or tuning of the schemes.  Refer to :ref:`design doc
4946bbdb28dSSeongJae Park<damon_design_damos_stat>` for more details about the stats.
495b1840272SSeongJae Park
496b1840272SSeongJae ParkThe statistics can be retrieved by reading the files under ``stats`` directory
4976bbdb28dSSeongJae Park(``nr_tried``, ``sz_tried``, ``nr_applied``, ``sz_applied``,
4986bbdb28dSSeongJae Park``sz_ops_filter_passed``, and ``qt_exceeds``), respectively.  The files are not
4996bbdb28dSSeongJae Parkupdated in real time, so you should ask DAMON sysfs interface to update the
5006bbdb28dSSeongJae Parkcontent of the files for the stats by writing a special keyword,
5016bbdb28dSSeongJae Park``update_schemes_stats`` to the relevant ``kdamonds/<N>/state`` file.
502b1840272SSeongJae Park
5037f0a86f3SSeongJae Park.. _sysfs_schemes_tried_regions:
5047f0a86f3SSeongJae Park
5057f0a86f3SSeongJae Parkschemes/<N>/tried_regions/
5067f0a86f3SSeongJae Park--------------------------
5077f0a86f3SSeongJae Park
508ea7f03a4SSeongJae ParkThis directory initially has one file, ``total_bytes``.
509ea7f03a4SSeongJae Park
5107f0a86f3SSeongJae ParkWhen a special keyword, ``update_schemes_tried_regions``, is written to the
511ea7f03a4SSeongJae Parkrelevant ``kdamonds/<N>/state`` file, DAMON updates the ``total_bytes`` file so
512ea7f03a4SSeongJae Parkthat reading it returns the total size of the scheme tried regions, and creates
513ea7f03a4SSeongJae Parkdirectories named integer starting from ``0`` under this directory.  Each
514ea7f03a4SSeongJae Parkdirectory contains files exposing detailed information about each of the memory
515ea7f03a4SSeongJae Parkregion that the corresponding scheme's ``action`` has tried to be applied under
516bc17ea26SSeongJae Parkthis directory, during next :ref:`apply interval <damon_design_damos>` of the
517bc17ea26SSeongJae Parkcorresponding scheme.  The information includes address range, ``nr_accesses``,
518bc17ea26SSeongJae Parkand ``age`` of the region.
519ea7f03a4SSeongJae Park
520ea7f03a4SSeongJae ParkWriting ``update_schemes_tried_bytes`` to the relevant ``kdamonds/<N>/state``
521ea7f03a4SSeongJae Parkfile will only update the ``total_bytes`` file, and will not create the
522ea7f03a4SSeongJae Parksubdirectories.
5237f0a86f3SSeongJae Park
5247f0a86f3SSeongJae ParkThe directories will be removed when another special keyword,
5257f0a86f3SSeongJae Park``clear_schemes_tried_regions``, is written to the relevant
5267f0a86f3SSeongJae Park``kdamonds/<N>/state`` file.
5277f0a86f3SSeongJae Park
528ff71f26fSSeongJae ParkThe expected usage of this directory is investigations of schemes' behaviors,
529ff71f26fSSeongJae Parkand query-like efficient data access monitoring results retrievals.  For the
530ff71f26fSSeongJae Parklatter use case, in particular, users can set the ``action`` as ``stat`` and
531ff71f26fSSeongJae Parkset the ``access pattern`` as their interested pattern that they want to query.
532ff71f26fSSeongJae Park
5339c8c315dSSeongJae Park.. _sysfs_schemes_tried_region:
5349c8c315dSSeongJae Park
5357f0a86f3SSeongJae Parktried_regions/<N>/
5367f0a86f3SSeongJae Park------------------
5377f0a86f3SSeongJae Park
538f423944bSSeongJae ParkIn each region directory, you will find five files (``start``, ``end``,
539f423944bSSeongJae Park``nr_accesses``, ``age``, and ``sz_filter_passed``).  Reading the files will
540f423944bSSeongJae Parkshow the properties of the region that corresponding DAMON-based operation
541f423944bSSeongJae Parkscheme ``action`` has tried to be applied.
5427f0a86f3SSeongJae Park
543b1840272SSeongJae ParkExample
544b1840272SSeongJae Park~~~~~~~
545b1840272SSeongJae Park
546b1840272SSeongJae ParkBelow commands applies a scheme saying "If a memory region of size in [4KiB,
547b1840272SSeongJae Park8KiB] is showing accesses per aggregate interval in [0, 5] for aggregate
548b1840272SSeongJae Parkinterval in [10, 20], page out the region.  For the paging out, use only up to
549b1840272SSeongJae Park10ms per second, and also don't page out more than 1GiB per second.  Under the
550b1840272SSeongJae Parklimitation, page out memory regions having longer age first.  Also, check the
551b1840272SSeongJae Parkfree memory rate of the system every 5 seconds, start the monitoring and paging
552b1840272SSeongJae Parkout when the free memory rate becomes lower than 50%, but stop it if the free
553b1840272SSeongJae Parkmemory rate becomes larger than 60%, or lower than 30%". ::
554b1840272SSeongJae Park
555b1840272SSeongJae Park    # cd <sysfs>/kernel/mm/damon/admin
556b1840272SSeongJae Park    # # populate directories
557b1840272SSeongJae Park    # echo 1 > kdamonds/nr_kdamonds; echo 1 > kdamonds/0/contexts/nr_contexts;
558b1840272SSeongJae Park    # echo 1 > kdamonds/0/contexts/0/schemes/nr_schemes
559b1840272SSeongJae Park    # cd kdamonds/0/contexts/0/schemes/0
560b1840272SSeongJae Park    # # set the basic access pattern and the action
561465d0eb0SKairui Song    # echo 4096 > access_pattern/sz/min
562465d0eb0SKairui Song    # echo 8192 > access_pattern/sz/max
563465d0eb0SKairui Song    # echo 0 > access_pattern/nr_accesses/min
564465d0eb0SKairui Song    # echo 5 > access_pattern/nr_accesses/max
565465d0eb0SKairui Song    # echo 10 > access_pattern/age/min
566465d0eb0SKairui Song    # echo 20 > access_pattern/age/max
567b1840272SSeongJae Park    # echo pageout > action
568b1840272SSeongJae Park    # # set quotas
569b1840272SSeongJae Park    # echo 10 > quotas/ms
570b1840272SSeongJae Park    # echo $((1024*1024*1024)) > quotas/bytes
571b1840272SSeongJae Park    # echo 1000 > quotas/reset_interval_ms
572b1840272SSeongJae Park    # # set watermark
573b1840272SSeongJae Park    # echo free_mem_rate > watermarks/metric
574b1840272SSeongJae Park    # echo 5000000 > watermarks/interval_us
575b1840272SSeongJae Park    # echo 600 > watermarks/high
576b1840272SSeongJae Park    # echo 500 > watermarks/mid
577b1840272SSeongJae Park    # echo 300 > watermarks/low
578b1840272SSeongJae Park
579b1840272SSeongJae ParkPlease note that it's highly recommended to use user space tools like `damo
58023a425aaSSeongJae Park<https://github.com/damonitor/damo>`_ rather than manually reading and writing
581b1840272SSeongJae Parkthe files as above.  Above is only for an example.
58235b43d40SSeongJae Park
58375999724SSeongJae Park.. _tracepoint:
58475999724SSeongJae Park
5851b2b7a17SSeongJae ParkTracepoints for Monitoring Results
5861b2b7a17SSeongJae Park==================================
58775999724SSeongJae Park
58875999724SSeongJae ParkUsers can get the monitoring results via the :ref:`tried_regions
5891b2b7a17SSeongJae Park<sysfs_schemes_tried_regions>`.  The interface is useful for getting a
5901b2b7a17SSeongJae Parksnapshot, but it could be inefficient for fully recording all the monitoring
5911b2b7a17SSeongJae Parkresults.  For the purpose, two trace points, namely ``damon:damon_aggregated``
5921b2b7a17SSeongJae Parkand ``damon:damos_before_apply``, are provided.  ``damon:damon_aggregated``
5931b2b7a17SSeongJae Parkprovides the whole monitoring results, while ``damon:damos_before_apply``
5941b2b7a17SSeongJae Parkprovides the monitoring results for regions that each DAMON-based Operation
5951b2b7a17SSeongJae ParkScheme (:ref:`DAMOS <damon_design_damos>`) is gonna be applied.  Hence,
5961b2b7a17SSeongJae Park``damon:damos_before_apply`` is more useful for recording internal behavior of
5971b2b7a17SSeongJae ParkDAMOS, or DAMOS target access
5981b2b7a17SSeongJae Park:ref:`pattern <damon_design_damos_access_pattern>` based query-like efficient
5991b2b7a17SSeongJae Parkmonitoring results recording.
6001b2b7a17SSeongJae Park
6011b2b7a17SSeongJae ParkWhile the monitoring is turned on, you could record the tracepoint events and
6021b2b7a17SSeongJae Parkshow results using tracepoint supporting tools like ``perf``.  For example::
60375999724SSeongJae Park
6045af28560SSeongJae Park    # echo on > kdamonds/0/state
60575999724SSeongJae Park    # perf record -e damon:damon_aggregated &
60675999724SSeongJae Park    # sleep 5
60775999724SSeongJae Park    # kill 9 $(pidof perf)
6085af28560SSeongJae Park    # echo off > kdamonds/0/state
60975999724SSeongJae Park    # perf script
6104f554ca1SSeongJae Park    kdamond.0 46568 [027] 79357.842179: damon:damon_aggregated: target_id=0 nr_regions=11 122509119488-135708762112: 0 864
6114f554ca1SSeongJae Park    [...]
6124f554ca1SSeongJae Park
6134f554ca1SSeongJae ParkEach line of the perf script output represents each monitoring region.  The
6144f554ca1SSeongJae Parkfirst five fields are as usual other tracepoint outputs.  The sixth field
6154f554ca1SSeongJae Park(``target_id=X``) shows the ide of the monitoring target of the region.  The
6164f554ca1SSeongJae Parkseventh field (``nr_regions=X``) shows the total number of monitoring regions
6174f554ca1SSeongJae Parkfor the target.  The eighth field (``X-Y:``) shows the start (``X``) and end
6184f554ca1SSeongJae Park(``Y``) addresses of the region in bytes.  The ninth field (``X``) shows the
6194f554ca1SSeongJae Park``nr_accesses`` of the region (refer to
6204f554ca1SSeongJae Park:ref:`design <damon_design_region_based_sampling>` for more details of the
6214f554ca1SSeongJae Parkcounter).  Finally the tenth field (``X``) shows the ``age`` of the region
6224f554ca1SSeongJae Park(refer to :ref:`design <damon_design_age_tracking>` for more details of the
6234f554ca1SSeongJae Parkcounter).
62475999724SSeongJae Park
6251b2b7a17SSeongJae ParkIf the event was ``damon:damos_beofre_apply``, the ``perf script`` output would
6261b2b7a17SSeongJae Parkbe somewhat like below::
6271b2b7a17SSeongJae Park
6281b2b7a17SSeongJae Park    kdamond.0 47293 [000] 80801.060214: damon:damos_before_apply: ctx_idx=0 scheme_idx=0 target_idx=0 nr_regions=11 121932607488-135128711168: 0 136
6291b2b7a17SSeongJae Park    [...]
6301b2b7a17SSeongJae Park
6311b2b7a17SSeongJae ParkEach line of the output represents each monitoring region that each DAMON-based
6321b2b7a17SSeongJae ParkOperation Scheme was about to be applied at the traced time.  The first five
6331b2b7a17SSeongJae Parkfields are as usual.  It shows the index of the DAMON context (``ctx_idx=X``)
6341b2b7a17SSeongJae Parkof the scheme in the list of the contexts of the context's kdamond, the index
6351b2b7a17SSeongJae Parkof the scheme (``scheme_idx=X``) in the list of the schemes of the context, in
6361b2b7a17SSeongJae Parkaddition to the output of ``damon_aggregated`` tracepoint.
637