Lines Matching +full:directory +full:- +full:based
1 .. SPDX-License-Identifier: GPL-2.0
9 - *DAMON user space tool.*
11 system administrators who want a just-working human-friendly interface.
12 Using this, users can use the DAMON’s major features in a human-friendly way.
16 - *sysfs interface.*
23 - *debugfs interface. (DEPRECATED!)*
28 linux-mm@kvack.org.
29 - *Kernel Space Programming Interface.*
42 creates multiple directories and files under its sysfs directory,
44 from the files under the directory.
57 ---------------
60 figure, parents-children relations are represented with indentations, each
61 directory is having ``/`` suffix, and files in each directory are separated by
98 ----
101 has one directory named ``admin``. The directory contains the files for
103 having the root permission could use this directory.
106 ---------
108 The monitoring-related information including request specifications and results
112 Under the ``admin`` directory, one directory, ``kdamonds``, which has files for
113 controlling the kdamonds exist. In the beginning, this directory has only one
115 of child directories named ``0`` to ``N-1``. Each directory represents each
119 -------------
121 In each kdamond directory, two files (``state`` and ``pid``) and one directory
129 for each DAMON-based operation scheme of the kdamond. For details of the
133 DAMON-based operation scheme action tried regions directory for each
134 DAMON-based operation scheme of the kdamond. Writing
137 ``clear_schemes_tried_regions`` to ``state`` file clears the DAMON-based
138 operating scheme action tried regions directory for each DAMON-based operation
139 scheme of the kdamond. For details of the DAMON-based operation scheme action
140 tried regions directory, please refer to :ref:`tried_regions section
145 ``contexts`` directory contains files for controlling the monitoring contexts
149 ----------------------
151 In the beginning, this directory has only one file, ``nr_contexts``. Writing a
153 ``0`` to ``N-1``. Each directory represents each monitoring context. At the
160 -------------
162 In each context directory, two files (``avail_operations`` and ``operations``)
169 ``avail_operations`` file. Based on the kernel configuration, the file will
172 - vaddr: Monitor virtual address spaces of specific processes
173 - fvaddr: Monitor fixed virtual address ranges
174 - paddr: Monitor the physical address space of the system
176 Please refer to :ref:`regions sysfs directory <sysfs_regions>` for detailed
187 ------------------------------
190 and efficiency of the monitoring are in ``monitoring_attrs`` directory.
192 directory.
194 Under ``intervals`` directory, three files for DAMON's sampling interval
196 (``update_us``) exist. You can set and get the values in micro-seconds by
199 Under ``nr_regions`` directory, two files for the lower-bound and upper-bound
208 ---------------------
210 In the beginning, this directory has only one file, ``nr_targets``. Writing a
212 to ``N-1``. Each directory represents each monitoring target.
215 ------------
217 In each target directory, one file (``pid_target``) and one directory
227 -------------------
242 as they want, by writing proper values to the files under this directory.
244 In the beginning, this directory has only one file, ``nr_regions``. Writing a
246 to ``N-1``. Each directory represents each initial monitoring target region.
249 ------------
251 In each region directory, you will find two files (``start`` and ``end``). You
255 Each region should not overlap with others. ``end`` of directory ``N`` should
256 be equal or smaller than ``start`` of directory ``N+1``.
259 ---------------------
261 The directory for DAMON-based Operation Schemes (:ref:`DAMOS
263 writing to files under this directory.
265 In the beginning, this directory has only one file, ``nr_schemes``. Writing a
267 to ``N-1``. Each directory represents each DAMON-based operation scheme.
270 ------------
272 In each scheme directory, five directories (``access_pattern``, ``quotas``,
283 - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``.
285 - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``.
287 - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT``.
289 - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``.
291 - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``.
293 - ``lru_prio``: Prioritize the region on its LRU lists.
295 - ``lru_deprio``: Deprioritize the region on its LRU lists.
297 - ``stat``: Do nothing but count the statistics.
301 ---------------------------
303 The directory for the target access :ref:`pattern
304 <damon_design_damos_access_pattern>` of the given DAMON-based operation scheme.
306 Under the ``access_pattern`` directory, three directories (``sz``,
314 -------------------
316 The directory for the :ref:`quotas <damon_design_damos_quotas>` of the given
317 DAMON-based operation scheme.
319 Under ``quotas`` directory, three files (``ms``, ``bytes``,
320 ``reset_interval_ms``) and one directory (``weights``) having three files
333 in per-thousand unit by writing the values to the three files under the
334 ``weights`` directory.
337 -----------------------
339 The directory for the :ref:`watermarks <damon_design_damos_watermarks>` of the
340 given DAMON-based operation scheme.
342 Under the watermarks directory, five files (``metric``, ``interval_us``,
350 - none: Ignore the watermarks
351 - free_mem_rate: System's free memory rate (per thousand)
356 --------------------
358 The directory for the :ref:`filters <damon_design_damos_filters>` of the given
359 DAMON-based operation scheme.
361 In the beginning, this directory has only one file, ``nr_filters``. Writing a
363 to ``N-1``. Each directory represents each filter. The filters are evaluated
366 Each filter directory contains six files, namely ``type``, ``matcing``,
370 open-ended interval), or ``target`` for specific DAMON monitoring target
382 For example, below restricts a DAMOS action to be applied to only non-anonymous
406 ------------------
413 The statistics can be retrieved by reading the files under ``stats`` directory
423 --------------------------
425 This directory initially has one file, ``total_bytes``.
430 directories named integer starting from ``0`` under this directory. Each
431 directory contains files exposing detailed information about each of the memory
433 this directory, during next :ref:`aggregation interval
445 The expected usage of this directory is investigations of schemes' behaviors,
446 and query-like efficient data access monitoring results retrievals. For the
451 ------------------
453 In each region directory, you will find four files (``start``, ``end``,
456 DAMON-based operation scheme ``action`` has tried to be applied.
510 linux-mm@kvack.org.
514 ``rm_contexts`` under its debugfs directory, ``<debugfs>/damon/``.
518 ----------
534 ----------
564 ---------------------------------
570 file-mapped area. Or, some users can know the initial access pattern of their
587 example, below commands will set a couple of address ranges, ``1-100`` and
588 ``100-200`` as the initial monitoring target region of pid 42, which is the
590 ranges, ``20-40`` and ``50-100`` as that of pid 4242, which is the second one
609 -------
611 Users can get and set the DAMON-based operation :ref:`schemes
627 min-size max-size min-acc max-acc min-age max-age
629 Specifically, bytes for the size of regions (``min-size`` and ``max-size``),
631 (``min-acc`` and ``max-acc``), number of aggregate intervals for the age of
632 regions (``min-age`` and ``max-age``) are specified. Note that the ranges are
642 - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED``. Ignored if
644 - 1: Call ``madvise()`` for the region with ``MADV_COLD``. Ignored if
646 - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT``.
647 - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. Ignored if
649 - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. Ignored if
651 - 5: Do nothing but count the statistics
684 - 0: Ignore the watermarks
685 - 1: System's free memory rate (per thousand)
728 --------------
744 Please note that you cannot write to the above-mentioned debugfs files while
746 an error code such as ``-EBUSY`` will be returned.
750 ---------------------
767 ---------------------------------
774 directory of the name on the DAMON debugfs directory. The directory will have
779 # ls: cannot access 'foo': No such file or directory
785 directory by putting the name of the context to the ``rm_contexts`` file. ::
789 # ls: cannot access 'foo': No such file or directory
792 root directory only.
802 While the tried regions directory is useful for getting a snapshot, the
808 # perf record -e damon:damon_aggregated &