Lines Matching +full:two +full:- +full:user

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
34 - :ref:`Modules <damon_modules>`: Implements kernel modules for various
35 purposes that provides interfaces for the user space, on top of the core
48 the given target address space. For example, below two operations for access
49 monitoring are address-space dependent.
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 -------------------------------------------
95 Only small parts in the super-huge virtual address space of the processes are
104 distinct regions that cover every mapped area of the address space. The two
105 gaps between the three regions are the two biggest unmapped areas in the given
106 address space. The two biggest unmapped areas would be the gap between the
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
141 ------------
145 too large to be handled with the type. ARM (32-bit) with large physical
146 address extension is an example. For such cases, a per-operations set
161 ----------
168 To know how user-space can set the attributes via :ref:`DAMON sysfs interface
183 clears the results. This can be described in below simple pseudo-code::
214 minimum and the maximum number of regions for the trade-off.
233 sum of the two regions' sizes is smaller than the size of total regions divided
234 by the ``minimum number of regions``, DAMON merges the two regions. If the
237 threshold until the upper-limit of the number of regions is met, or the
240 aggregated access frequency of each region, it splits each region into two or
241 three regions if the total number of regions will not exceed the user-specified
244 In this way, DAMON provides its best-effort quality and minimal overhead while
245 keeping the bounds users set for their trade-off.
269 be hot-plugged.
273 and applies it to monitoring operations-related data structures such as the
274 abstracted monitoring target memory area only for each of a user-specified time
277 User-space can get the monitoring results via DAMON sysfs interface and/or
303 making only rare accesses but the user thinks the amount of accesses for the
312 intensiveness of the workload. The user should tune the interval based on the
330 Based on the manual tuning guide, DAMON provides more intuitive knob-based
344 Monitoring Intervals Auto-tuning
351 given time interval. The target can be specified by the user as a ratio of
352 DAMON-observed access events to the theoretical maximum amount of the events
356 The DAMON-observed access events are calculated in byte granularity based on
370 The user can further set the minimum and maximum ``sampling interval`` that can
371 be set by the tuning mechanism using two parameters (``min_sample_us`` and
377 The tuning is turned off by default, and need to be set explicitly by the user.
380 That is, assumes 4% (20% of 20%) DAMON-observed access events ratio (source)
383 To know how user-space can use this feature via :ref:`DAMON sysfs interface
391 -----------------
393 One common purpose of data access monitoring is access-aware system efficiency
396 paging out memory regions that are not accessed for more than two minutes
403 One straightforward approach for such schemes would be profile-guided
416 including monitoring results and operation advice between kernel and user
420 works, DAMON provides a feature called Data Access Monitoring-based Operation
423 the access pattern of interest, and applies the user-desired operation actions
424 to the regions, for every user-specified time interval called
427 To know how user-space can set ``apply_interval`` via :ref:`DAMON sysfs
454 - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``.
456 - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``.
458 - ``pageout``: Reclaim the region.
460 - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``.
462 - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``.
464 - ``lru_prio``: Prioritize the region on its LRU lists.
466 - ``lru_deprio``: Deprioritize the region on its LRU lists.
468 - ``migrate_hot``: Migrate the regions prioritizing warmer regions.
470 - ``migrate_cold``: Migrate the regions prioritizing colder regions.
472 - ``stat``: Do nothing but count the statistics.
479 To know how user-space can set the action via :ref:`DAMON sysfs interface
496 To know how user-space can set the access pattern via :ref:`DAMON sysfs
506 DAMOS upper-bound overhead control feature. DAMOS could incur high overhead if
514 To mitigate that situation, DAMOS provides an upper-bound overhead control
517 the action can be applied within a user-specified time duration.
519 To know how user-space can set the basic quotas via :ref:`DAMON sysfs interface
535 rarely accessed (colder) memory regions would be prioritized for page-out
550 To know how user-space can set the prioritization weights via :ref:`DAMON sysfs
557 Aim-oriented Feedback-driven Auto-tuning
560 Automatic feedback-driven quota tuning. Instead of setting the absolute quota
568 ``target_value``, ``current_value`` and ``nid``. The auto-tuning mechanism
572 - ``user_input``: User-provided value. Users could use any metric that they
578 - ``some_mem_psi_us``: System-wide ``some`` memory pressure stall information
581 set by users at the initial time. In other words, DAMOS does self-feedback.
582 - ``node_mem_used_bp``: Specific NUMA node's used memory ratio in bp (1/10,000).
583 - ``node_mem_free_bp``: Specific NUMA node's free memory ratio in bp (1/10,000).
588 To know how user-space can set the tuning goal metric, the target value, and/or
601 consume unnecessary system resources. To avoid such consumption, the user would
614 To know how user-space can set the watermarks via :ref:`DAMON sysfs interface
624 Non-access pattern-based target memory regions filtering. If users run
625 self-written programs or have good profiling tools, they could know something
629 have a list of latency-critical processes.
635 - a type of memory (``type``),
636 - whether it is for the memory of the type or all except the type
638 - whether it is to allow (include) or reject (exclude) applying
644 case of the core layer-handled filters, the memory regions that excluded by the
646 a memory regions is filtered by an operations set layer-handled filter, it is
662 young or not, since it matches with the first allow-filter. If the page is
664 second reject-filter blocks it. If the page is neither anonymous nor young,
670 - Core layer handled
671 - addr
672 - Applied to pages that belonging to a given address range.
673 - target
674 - Applied to pages that belonging to a given DAMON monitoring target.
675 - Operations layer handled, supported by only ``paddr`` operations set.
676 - anon
677 - Applied to pages that containing data that not stored in files.
678 - active
679 - Applied to active pages.
680 - memcg
681 - Applied to pages that belonging to a given cgroup.
682 - young
683 - Applied to pages that are accessed after the last access check from the
685 - hugepage_size
686 - Applied to pages that managed in a given size range.
687 - unmapped
688 - Applied to pages that unmapped.
690 To know how user-space can set the filters via :ref:`DAMON sysfs interface
705 - ``nr_tried``: Total number of regions that the scheme is tried to be applied.
706 - ``sz_tried``: Total size of regions that the scheme is tried to be applied.
707 - ``sz_ops_filter_passed``: Total bytes that passed operations set
708 layer-handled DAMOS filters.
709 - ``nr_applied``: Total number of regions that the scheme is applied.
710 - ``sz_applied``: Total size of regions that the scheme is applied.
711 - ``qt_exceeds``: Total number of times the quota of the scheme has exceeded.
733 To know how user-space can read the stats via :ref:`DAMON sysfs interface
750 ---------------------------------
752 The programming interface for kernel space data access-aware applications.
755 access-aware applications using DAMON's core features. For this, DAMON exposes
767 provide any direct interface for the user space. Such interfaces should be
768 implemented by each DAMON API user kernel components, instead. DAMON subsystem
769 itself implements such DAMON API user modules, which are supposed to be used
770 for general purpose DAMON control and special purpose data access-aware system
772 user space. The user space can build their efficient data access-aware
776 General Purpose User Interface Modules
777 --------------------------------------
779 DAMON modules that provide user space ABIs for general purpose DAMON usage in
785 DAMON user interface modules control DAMON and retrieve the results as user
786 requested via the DAMON API, and return the results to the user-space.
788 The ABIs are designed to be used for user space applications development,
790 user space tools. One such Python-written user space tool is available at
793 (https://packages.fedoraproject.org/pkgs/python-damo/damo/).
800 Special-Purpose Access-aware Kernel Modules
801 -------------------------------------------
803 DAMON modules that provide user space ABI for specific purpose DAMON usage.
805 DAMON user interface modules are for full control of all DAMON features in
806 runtime. For each special-purpose system-wide data access-aware system
809 extended for boot-time and even compile time control. Default values of DAMON
813 To support such cases, yet more DAMON API user kernel modules that provide more
814 simple and optimized user space interfaces are available. Currently, two
817 (:doc:`/admin-guide/mm/damon/reclaim` and
818 :doc:`/admin-guide/mm/damon/lru_sort`).