Lines Matching +full:allow +full:- +full:set +full:- +full:time

1 .. SPDX-License-Identifier: GPL-2.0
13 The monitoring-related information including the monitoring request
14 specification and DAMON-based operation schemes are stored in a data structure
19 To know how user-space can do the configurations and start/stop DAMON, refer to
28 - :ref:`Operations Set <damon_operations_set>`: Implements fundamental
30 address-space and available set of software/hardware primitives,
31 - :ref:`Core <damon_core_logic>`: Implements core logics including monitoring
32 overhead/accuracy control and access-aware system operations on top of the
33 operations set layer, and
34 - :ref:`Modules <damon_modules>`: Implements kernel modules for various
41 Operations Set Layer
46 For data access monitoring and additional low level work, DAMON needs a set of
49 monitoring are address-space dependent.
55 Set, and defines the interface between it and the upper layer. The upper layer
61 operations set. If there is no available operations set for a given purpose, a
62 new operations set can be implemented following the interface between the
73 - vaddr: Monitor virtual address spaces of specific processes
74 - fvaddr: Monitor fixed virtual address ranges
75 - paddr: Monitor the physical address space of the system
77 To know how user-space can do the configuration via :ref:`DAMON sysfs interface
84 VMA-based Target Address Range Construction
85 -------------------------------------------
87 A mechanism of ``vaddr`` DAMON operations set that automatically initializes
91 This mechanism is only for the ``vaddr`` operations set. In cases of
92 ``fvaddr`` and ``paddr`` operation sets, users are asked to manually set the
95 Only small parts in the super-huge virtual address space of the processes are
101 be removed to not take the time for the adaptive mechanism.
107 heap and the uppermost mmap()-ed region, and the gap between the lowermost
108 mmap()-ed region and the stack in most of the cases. Because these gaps are
110 to make a reasonable trade-off. Below shows this in detail::
114 <uppermost mmap()-ed region>
115 (small mmap()-ed regions and munmap()-ed regions)
116 <lowermost mmap()-ed region>
121 PTE Accessed-bit Based Access Check
122 -----------------------------------
125 Accessed-bit for basic access checks. Only one difference is the way of
131 bit(s) set again after one sampling period. This could disturb other kernel
147 ----------
154 To know how user-space can set the attributes via :ref:`DAMON sysfs interface
169 clears the results. This can be described in below simple pseudo-code::
175 if time() % aggregation_interval == 0:
199 controllable by setting the number of regions. DAMON allows users to set the
200 minimum and the maximum number of regions for the trade-off.
223 threshold until the upper-limit of the number of regions is met, or the
227 three regions if the total number of regions will not exceed the user-specified
230 In this way, DAMON provides its best-effort quality and minimal overhead while
231 keeping the bounds users set for their trade-off.
255 be hot-plugged.
259 and applies it to monitoring operations-related data structures such as the
260 abstracted monitoring target memory area only for each of a user-specified time
263 User-space can get the monitoring results via DAMON sysfs interface and/or
274 In short, set ``aggregation interval`` to capture meaningful amount of accesses
278 cases. Set ``sampling interval`` proportional to ``aggregation interval``. By
281 ``Aggregation interval`` should be set as the time interval that the workload
285 For many purposes, that would be useless. If it is too long, however, the time
288 time scale of the given purpose. This could happen if the workload is actually
305 ``Sampling interval`` defines the resolution of each aggregation. If it is set
313 lowered. It is recommended to be set proportional to ``aggregation interval``.
314 By default, the ratio is set as ``1/20``, and it is still recommended.
327 -----------------
329 One common purpose of data access monitoring is access-aware system efficiency
339 One straightforward approach for such schemes would be profile-guided
355 To allow users to reduce such redundancy and inefficiencies by offloading the
356 works, DAMON provides a feature called Data Access Monitoring-based Operation
359 the access pattern of interest, and applies the user-desired operation actions
360 to the regions, for every user-specified time interval called
363 To know how user-space can set ``apply_interval`` via :ref:`DAMON sysfs
379 each action is in the DAMON operations set layer because the implementation
384 specific DAMOS action depends on what operations set is selected to be used
390 - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``.
391 Supported by ``vaddr`` and ``fvaddr`` operations set.
392 - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``.
393 Supported by ``vaddr`` and ``fvaddr`` operations set.
394 - ``pageout``: Reclaim the region.
395 Supported by ``vaddr``, ``fvaddr`` and ``paddr`` operations set.
396 - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``.
397 Supported by ``vaddr`` and ``fvaddr`` operations set.
398 - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``.
399 Supported by ``vaddr`` and ``fvaddr`` operations set.
400 - ``lru_prio``: Prioritize the region on its LRU lists.
401 Supported by ``paddr`` operations set.
402 - ``lru_deprio``: Deprioritize the region on its LRU lists.
403 Supported by ``paddr`` operations set.
404 - ``migrate_hot``: Migrate the regions prioritizing warmer regions.
405 Supported by ``paddr`` operations set.
406 - ``migrate_cold``: Migrate the regions prioritizing colder regions.
407 Supported by ``paddr`` operations set.
408 - ``stat``: Do nothing but count the statistics.
415 To know how user-space can set the action via :ref:`DAMON sysfs interface
432 To know how user-space can set the access pattern via :ref:`DAMON sysfs
442 DAMOS upper-bound overhead control feature. DAMOS could incur high overhead if
450 To mitigate that situation, DAMOS provides an upper-bound overhead control
451 feature called quotas. It lets users specify an upper limit of time that DAMOS
453 the action can be applied within a user-specified time duration.
455 To know how user-space can set the basic quotas via :ref:`DAMON sysfs interface
471 rarely accessed (colder) memory regions would be prioritized for page-out
474 action are implemented in each DAMON operations set, together with the actions.
476 Though the implementation is up to the DAMON operations set, it would be common
486 To know how user-space can set the prioritization weights via :ref:`DAMON sysfs
493 Aim-oriented Feedback-driven Auto-tuning
496 Automatic feedback-driven quota tuning. Instead of setting the absolute quota
504 ``target_value``, and ``current_value``. The auto-tuning mechanism tries to
508 - ``user_input``: User-provided value. Users could use any metric that they
511 time (PSI) could be examples. Note that users should explicitly set
514 - ``some_mem_psi_us``: System-wide ``some`` memory pressure stall information
517 set by users at the initial time. In other words, DAMOS does self-feedback.
519 To know how user-space can set the tuning goal metric, the target value, and/or
545 To know how user-space can set the watermarks via :ref:`DAMON sysfs interface
555 Non-access pattern-based target memory regions filtering. If users run
556 self-written programs or have good profiling tools, they could know something
560 have a list of latency-critical processes.
563 a feature called DAMOS filters. The feature allows users to set an arbitrary
566 - a type of memory (``type``),
567 - whether it is for the memory of the type or all except the type
569 - whether it is to allow (include) or reject (exclude) applying
570 the scheme's action to the memory (``allow``).
582 young or not, since it matches with the first allow-filter. If the page is
584 second reject-filter blocks it. If the page is neither anonymous nor young,
589 filter-allowed or filters evaluation stage passed. It means that installing
590 allow-filters at the end of the list makes no practical change but only
591 filters-checking overhead.
594 core layer, while others are handled by operations set. In the latter case,
595 hence, support of the filter types depends on the DAMON operations set. In
596 case of the core layer-handled filters, the memory regions that excluded by the
598 a memory regions is filtered by an operations set layer-handled filter, it is
603 - anonymous page
604 - Applied to pages that containing data that not stored in files.
605 - Handled by operations set layer. Supported by only ``paddr`` set.
606 - memory cgroup
607 - Applied to pages that belonging to a given cgroup.
608 - Handled by operations set layer. Supported by only ``paddr`` set.
609 - young page
610 - Applied to pages that are accessed after the last access check from the
612 - Handled by operations set layer. Supported by only ``paddr`` set.
613 - address range
614 - Applied to pages that belonging to a given address range.
615 - Handled by the core logic.
616 - DAMON monitoring target
617 - Applied to pages that belonging to a given DAMON monitoring target.
618 - Handled by the core logic.
620 To know how user-space can set the watermarks via :ref:`DAMON sysfs interface
635 - ``nr_tried``: Total number of regions that the scheme is tried to be applied.
636 - ``sz_trtied``: Total size of regions that the scheme is tried to be applied.
637 - ``sz_ops_filter_passed``: Total bytes that passed operations set
638 layer-handled DAMOS filters.
639 - ``nr_applied``: Total number of regions that the scheme is applied.
640 - ``sz_applied``: Total size of regions that the scheme is applied.
641 - ``qt_exceeds``: Total number of times the quota of the scheme has exceeded.
650 The core logic will only ask the underlying :ref:`operation set
654 "A scheme is applied to a region" means the :ref:`operation set
657 operation set, and the types of the :ref:`action <damon_design_damos_action>`
658 and the pages of the region can affect this. For example, if a filter is set
663 To know how user-space can read the stats via :ref:`DAMON sysfs interface
680 ---------------------------------
682 The programming interface for kernel space data access-aware applications.
685 access-aware applications using DAMON's core features. For this, DAMON exposes
700 for general purpose DAMON control and special purpose data access-aware system
702 user space. The user space can build their efficient data access-aware
707 --------------------------------------
713 'sysfs', allow users to specify their requests to and get the answers from
716 requested via the DAMON API, and return the results to the user-space.
720 user space tools. One such Python-written user space tool is available at
723 (https://packages.fedoraproject.org/pkgs/python-damo/damo/).
730 Special-Purpose Access-aware Kernel Modules
731 -------------------------------------------
736 runtime. For each special-purpose system-wide data access-aware system
739 extended for boot-time and even compile time control. Default values of DAMON
747 (:doc:`/admin-guide/mm/damon/reclaim` and
748 :doc:`/admin-guide/mm/damon/lru_sort`).