sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget0/translations/zh_CN/admin-guide/mm/damon/reclaimmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/zh_TW/admin-guide/mm/damon/reclaimmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/it_IT/admin-guide/mm/damon/reclaimmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ja_JP/admin-guide/mm/damon/reclaimmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ko_KR/admin-guide/mm/damon/reclaimmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/pt_BR/admin-guide/mm/damon/reclaimmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/sp_SP/admin-guide/mm/damon/reclaimmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhJ/var/lib/git/docbuild/linux/Documentation/admin-guide/mm/damon/reclaim.rsthKubhsection)}(hhh](htitle)}(hDAMON-based Reclamationh]hDAMON-based Reclamation}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hX=DAMON-based Reclamation (DAMON_RECLAIM) is a static kernel module that aimed to be used for proactive and lightweight reclamation under light memory pressure. It doesn't aim to replace the LRU-list based page_granularity reclamation, but to be selectively used for different level of memory pressure and requirements.h]hX?DAMON-based Reclamation (DAMON_RECLAIM) is a static kernel module that aimed to be used for proactive and lightweight reclamation under light memory pressure. It doesn’t aim to replace the LRU-list based page_granularity reclamation, but to be selectively used for different level of memory pressure and requirements.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h(Where Proactive Reclamation is Required?h]h(Where Proactive Reclamation is Required?}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(hX On general memory over-committed systems, proactively reclaiming cold pages helps saving memory and reducing latency spikes that incurred by the direct reclaim of the process or CPU consumption of kswapd, while incurring only minimal performance degradation [1]_ [2]_ .h](hXOn general memory over-committed systems, proactively reclaiming cold pages helps saving memory and reducing latency spikes that incurred by the direct reclaim of the process or CPU consumption of kswapd, while incurring only minimal performance degradation }(hhhhhNhNubhfootnote_reference)}(h[1]_h]h1}(hjhhhNhNubah}(h]id1ah ]h"]h$]h&]refidid4docnameadmin-guide/mm/damon/reclaimuh1jhhresolvedKubh }(hhhhhNhNubj)}(h[2]_h]h2}(hj hhhNhNubah}(h]id2ah ]h"]h$]h&]jid5jjuh1jhhjKubh .}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXFree Pages Reporting [3]_ based memory over-commit virtualization systems are good example of the cases. In such systems, the guest VMs reports their free memory to host, and the host reallocates the reported memory to other guests. As a result, the memory of the systems are fully utilized. However, the guests could be not so memory-frugal, mainly because some kernel subsystems and user-space applications are designed to use as much memory as available. Then, guests could report only small amount of memory as free to host, results in memory utilization drop of the systems. Running the proactive reclamation in guests could mitigate this problem.h](hFree Pages Reporting }(hj:hhhNhNubj)}(h[3]_h]h3}(hjBhhhNhNubah}(h]id3ah ]h"]h$]h&]jid6jjuh1jhj:jKubhXw based memory over-commit virtualization systems are good example of the cases. In such systems, the guest VMs reports their free memory to host, and the host reallocates the reported memory to other guests. As a result, the memory of the systems are fully utilized. However, the guests could be not so memory-frugal, mainly because some kernel subsystems and user-space applications are designed to use as much memory as available. Then, guests could report only small amount of memory as free to host, results in memory utilization drop of the systems. Running the proactive reclamation in guests could mitigate this problem.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]'where-proactive-reclamation-is-requiredah ]h"](where proactive reclamation is required?ah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h How It Works?h]h How It Works?}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhhhhhKubh)}(hXDAMON_RECLAIM finds memory regions that didn't accessed for specific time duration and page out. To avoid it consuming too much CPU for the paging out operation, a speed limit can be configured. Under the speed limit, it pages out memory regions that didn't accessed longer time first. System administrators can also configure under what situation this scheme should automatically activated and deactivated with three memory pressure watermarks.h]hXDAMON_RECLAIM finds memory regions that didn’t accessed for specific time duration and page out. To avoid it consuming too much CPU for the paging out operation, a speed limit can be configured. Under the speed limit, it pages out memory regions that didn’t accessed longer time first. System administrators can also configure under what situation this scheme should automatically activated and deactivated with three memory pressure watermarks.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjdhhubeh}(h] how-it-worksah ]h"] how it works?ah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hInterface: Module Parametersh]hInterface: Module Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK)ubh)}(h~To use this feature, you should first ensure your system is running on a kernel that is built with ``CONFIG_DAMON_RECLAIM=y``.h](hcTo use this feature, you should first ensure your system is running on a kernel that is built with }(hjhhhNhNubhliteral)}(h``CONFIG_DAMON_RECLAIM=y``h]hCONFIG_DAMON_RECLAIM=y}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK+hjhhubh)}(hX To let sysadmins enable or disable it and tune for the given system, DAMON_RECLAIM utilizes module parameters. That is, you can put ``damon_reclaim.=`` on the kernel boot command line or write proper values to ``/sys/module/damon_reclaim/parameters/`` files.h](hTo let sysadmins enable or disable it and tune for the given system, DAMON_RECLAIM utilizes module parameters. That is, you can put }(hjhhhNhNubj)}(h%``damon_reclaim.=``h]h!damon_reclaim.=}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh; on the kernel boot command line or write proper values to }(hjhhhNhNubj)}(h4``/sys/module/damon_reclaim/parameters/``h]h0/sys/module/damon_reclaim/parameters/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh files.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK.hjhhubh)}(h,Below are the description of each parameter.h]h,Below are the description of each parameter.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjhhubh)}(hhh](h)}(henabledh]henabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK6ubh)}(h Enable or disable DAMON_RECLAIM.h]h Enable or disable DAMON_RECLAIM.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjhhubh)}(hX3You can enable DAMON_RCLAIM by setting the value of this parameter as ``Y``. Setting it as ``N`` disables DAMON_RECLAIM. Note that DAMON_RECLAIM could do no real monitoring and reclamation due to the watermarks-based activation condition. Refer to below descriptions for the watermarks parameter for this.h](hFYou can enable DAMON_RCLAIM by setting the value of this parameter as }(hjhhhNhNubj)}(h``Y``h]hY}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. Setting it as }(hjhhhNhNubj)}(h``N``h]hN}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh disables DAMON_RECLAIM. Note that DAMON_RECLAIM could do no real monitoring and reclamation due to the watermarks-based activation condition. Refer to below descriptions for the watermarks parameter for this.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubeh}(h]enabledah ]h"]enabledah$]h&]uh1hhjhhhhhK6ubh)}(hhh](h)}(h commit_inputsh]h commit_inputs}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhhhhhK@ubh)}(hHMake DAMON_RECLAIM reads the input parameters again, except ``enabled``.h](h` section of the design document for the rationale behind this lower bound.h](h8Note that this must be 3 or higher. Please refer to the }(hjhhhNhNubh)}(h+:ref:`Monitoring `h]j)}(hjh]h Monitoring}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjdamon_design_monitoringuh1hhhhKhjubhJ section of the design document for the rationale behind this lower bound.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj\hhubeh}(h]min-nr-regionsah ]h"]min_nr_regionsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hmax_nr_regionsh]hmax_nr_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h%Maximum number of monitoring regions.h]h%Maximum number of monitoring regions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX!The maximum number of monitoring regions of DAMON for the cold memory monitoring. This can be used to set upper-bound of the monitoring overhead. However, setting this too low could result in bad monitoring quality. Please refer to the DAMON documentation (:doc:`usage`) for more detail.h](hXThe maximum number of monitoring regions of DAMON for the cold memory monitoring. This can be used to set upper-bound of the monitoring overhead. However, setting this too low could result in bad monitoring quality. Please refer to the DAMON documentation (}(hjhhhNhNubh)}(h :doc:`usage`h]j)}(hjh]husage}(hjhhhNhNubah}(h]h ](jstdstd-doceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypedoc refexplicitrefwarnjusageuh1hhhhKhjubh) for more detail.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]max-nr-regionsah ]h"]max_nr_regionsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hmonitor_region_starth]hmonitor_region_start}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhKubh)}(h2Start of target memory region in physical address.h]h2Start of target memory region in physical address.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj@hhubh)}(hThe start physical address of memory region that DAMON_RECLAIM will do work against. That is, DAMON_RECLAIM will find cold memory regions in this region and reclaims. By default, biggest System RAM is used as the region.h]hThe start physical address of memory region that DAMON_RECLAIM will do work against. That is, DAMON_RECLAIM will find cold memory regions in this region and reclaims. By default, biggest System RAM is used as the region.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj@hhubeh}(h]monitor-region-startah ]h"]monitor_region_startah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hmonitor_region_endh]hmonitor_region_end}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhhhhhKubh)}(h0End of target memory region in physical address.h]h0End of target memory region in physical address.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuhhubh)}(hThe end physical address of memory region that DAMON_RECLAIM will do work against. That is, DAMON_RECLAIM will find cold memory regions in this region and reclaims. By default, biggest System RAM is used as the region.h]hThe end physical address of memory region that DAMON_RECLAIM will do work against. That is, DAMON_RECLAIM will find cold memory regions in this region and reclaims. By default, biggest System RAM is used as the region.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuhhubeh}(h]monitor-region-endah ]h"]monitor_region_endah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h addr_unith]h addr_unit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h.A scale factor for memory addresses and bytes.h]h.A scale factor for memory addresses and bytes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThis parameter is for setting and getting the :ref:`address unit ` parameter of the DAMON instance for DAMON_RECLAIM.h](h.This parameter is for setting and getting the }(hjhhhNhNubh)}(h,:ref:`address unit `h]j)}(hjh]h address unit}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjdamon_design_addr_unituh1hhhhKhjubh3 parameter of the DAMON instance for DAMON_RECLAIM.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXu``monitor_region_start`` and ``monitor_region_end`` should be provided in this unit. For example, let's suppose ``addr_unit``, ``monitor_region_start`` and ``monitor_region_end`` are set as ``1024``, ``0`` and ``10``, respectively. Then DAMON_RECLAIM will work for 10 KiB length of physical address range that starts from address zero (``[0 * 1024, 10 * 1024)`` in bytes).h](j)}(h``monitor_region_start``h]hmonitor_region_start}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``monitor_region_end``h]hmonitor_region_end}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh@ should be provided in this unit. For example, let’s suppose }(hjhhhNhNubj)}(h ``addr_unit``h]h addr_unit}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``monitor_region_start``h]hmonitor_region_start}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``monitor_region_end``h]hmonitor_region_end}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh are set as }(hjhhhNhNubj)}(h``1024``h]h1024}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``0``h]h0}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }hjsbj)}(h``10``h]h10}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhx, respectively. Then DAMON_RECLAIM will work for 10 KiB length of physical address range that starts from address zero (}(hjhhhNhNubj)}(h``[0 * 1024, 10 * 1024)``h]h[0 * 1024, 10 * 1024)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh in bytes).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXj``bytes_reclaim_tried_regions`` and ``bytes_reclaimed_regions`` are also in this unit. For example, let's suppose values of ``addr_unit``, ``bytes_reclaim_tried_regions`` and ``bytes_reclaimed_regions`` are ``1024``, ``42``, and ``32``, respectively. Then it means DAMON_RECLAIM tried to reclaim 42 KiB memory and successfully reclaimed 32 KiB memory in total.h](j)}(h``bytes_reclaim_tried_regions``h]hbytes_reclaim_tried_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``bytes_reclaimed_regions``h]hbytes_reclaimed_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh@ are also in this unit. For example, let’s suppose values of }(hjhhhNhNubj)}(h ``addr_unit``h]h addr_unit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``bytes_reclaim_tried_regions``h]hbytes_reclaim_tried_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }hjsbj)}(h``bytes_reclaimed_regions``h]hbytes_reclaimed_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh are }(hjhhhNhNubj)}(h``1024``h]h1024}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``42``h]h42}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, and }(hjhhhNhNubj)}(h``32``h]h32}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh~, respectively. Then it means DAMON_RECLAIM tried to reclaim 42 KiB memory and successfully reclaimed 32 KiB memory in total.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hDIf unsure, use only the default value (``1``) and forget about this.h](h'If unsure, use only the default value (}(hjA hhhNhNubj)}(h``1``h]h1}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA ubh) and forget about this.}(hjA hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] addr-unitah ]h"] addr_unitah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h skip_anonh]h skip_anon}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji hhhhhM ubh)}(h!Skip anonymous pages reclamation.h]h!Skip anonymous pages reclamation.}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hji hhubh)}(hfIf this parameter is set as ``Y``, DAMON_RECLAIM does not reclaim anonymous pages. By default, ``N``.h](hIf this parameter is set as }(hj hhhNhNubj)}(h``Y``h]hY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh?, DAMON_RECLAIM does not reclaim anonymous pages. By default, }(hj hhhNhNubj)}(h``N``h]hN}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhji hhubeh}(h] skip-anonah ]h"] skip_anonah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h kdamond_pidh]h kdamond_pid}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hPID of the DAMON thread.h]hPID of the DAMON thread.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hRIf DAMON_RECLAIM is enabled, this becomes the PID of the worker thread. Else, -1.h]hRIf DAMON_RECLAIM is enabled, this becomes the PID of the worker thread. Else, -1.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h] kdamond-pidah ]h"] kdamond_pidah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hnr_reclaim_tried_regionsh]hnr_reclaim_tried_regions}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hENumber of memory regions that tried to be reclaimed by DAMON_RECLAIM.h]hENumber of memory regions that tried to be reclaimed by DAMON_RECLAIM.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]nr-reclaim-tried-regionsah ]h"]nr_reclaim_tried_regionsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hbytes_reclaim_tried_regionsh]hbytes_reclaim_tried_regions}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM ubh)}(hJTotal bytes of memory regions that tried to be reclaimed by DAMON_RECLAIM.h]hJTotal bytes of memory regions that tried to be reclaimed by DAMON_RECLAIM.}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj hhubeh}(h]bytes-reclaim-tried-regionsah ]h"]bytes_reclaim_tried_regionsah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(hnr_reclaimed_regionsh]hnr_reclaimed_regions}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE hhhhhM%ubh)}(hINumber of memory regions that successfully be reclaimed by DAMON_RECLAIM.h]hINumber of memory regions that successfully be reclaimed by DAMON_RECLAIM.}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjE hhubeh}(h]nr-reclaimed-regionsah ]h"]nr_reclaimed_regionsah$]h&]uh1hhjhhhhhM%ubh)}(hhh](h)}(hbytes_reclaimed_regionsh]hbytes_reclaimed_regions}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl hhhhhM*ubh)}(hNTotal bytes of memory regions that successfully be reclaimed by DAMON_RECLAIM.h]hNTotal bytes of memory regions that successfully be reclaimed by DAMON_RECLAIM.}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjl hhubeh}(h]bytes-reclaimed-regionsah ]h"]bytes_reclaimed_regionsah$]h&]uh1hhjhhhhhM*ubh)}(hhh](h)}(hnr_quota_exceedsh]hnr_quota_exceeds}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM/ubh)}(h?Number of times that the time/space quota limits have exceeded.h]h?Number of times that the time/space quota limits have exceeded.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj hhubeh}(h]nr-quota-exceedsah ]h"]nr_quota_exceedsah$]h&]uh1hhjhhhhhM/ubeh}(h]interface-module-parametersah ]h"]interface: module parametersah$]h&]uh1hhhhhhhhK)ubh)}(hhh](h)}(hExampleh]hExample}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM4ubh)}(hXBelow runtime example commands make DAMON_RECLAIM to find memory regions that not accessed for 30 seconds or more and pages out. The reclamation is limited to be done only up to 1 GiB per second to avoid DAMON_RECLAIM consuming too much CPU time for the paging out operation. It also asks DAMON_RECLAIM to do nothing if the system's free memory rate is more than 50%, but start the real works if it becomes lower than 40%. If DAMON_RECLAIM doesn't make progress and therefore the free memory rate becomes lower than 20%, it asks DAMON_RECLAIM to do nothing again, so that we can fall back to the LRU-list based page granularity reclamation. ::h]hXBelow runtime example commands make DAMON_RECLAIM to find memory regions that not accessed for 30 seconds or more and pages out. The reclamation is limited to be done only up to 1 GiB per second to avoid DAMON_RECLAIM consuming too much CPU time for the paging out operation. It also asks DAMON_RECLAIM to do nothing if the system’s free memory rate is more than 50%, but start the real works if it becomes lower than 40%. If DAMON_RECLAIM doesn’t make progress and therefore the free memory rate becomes lower than 20%, it asks DAMON_RECLAIM to do nothing again, so that we can fall back to the LRU-list based page granularity reclamation.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj hhubh literal_block)}(h# cd /sys/module/damon_reclaim/parameters # echo 30000000 > min_age # echo $((1 * 1024 * 1024 * 1024)) > quota_sz # echo 1000 > quota_reset_interval_ms # echo 500 > wmarks_high # echo 400 > wmarks_mid # echo 200 > wmarks_low # echo Y > enabledh]h# cd /sys/module/damon_reclaim/parameters # echo 30000000 > min_age # echo $((1 * 1024 * 1024 * 1024)) > quota_sz # echo 1000 > quota_reset_interval_ms # echo 500 > wmarks_high # echo 400 > wmarks_mid # echo 200 > wmarks_low # echo Y > enabled}hj sbah}(h]h ]h"]h$]h&]hhuh1j hhhM@hj hhubh)}(hNote that this module (damon_reclaim) cannot run simultaneously with other DAMON-based special-purpose modules. Refer to :ref:`DAMON design special purpose modules exclusivity ` for more details.h](hzNote that this module (damon_reclaim) cannot run simultaneously with other DAMON-based special-purpose modules. Refer to }(hj hhhNhNubh)}(hj:ref:`DAMON design special purpose modules exclusivity `h]j)}(hj h]h0DAMON design special purpose modules exclusivity}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj0damon_design_special_purpose_modules_exclusivityuh1hhhhMIhj ubh for more details.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMIhj hhubhfootnote)}(h&https://research.google/pubs/pub48551/h](hlabel)}(h1h]h1}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1j) hj% ubh)}(hj' h]h reference)}(hj' h]h&https://research.google/pubs/pub48551/}(hj> hhhNhNubah}(h]h ]h"]h$]h&]refurij' uh1j< hj9 ubah}(h]h ]h"]h$]h&]uh1hhhhMNhj% ubeh}(h]jah ]h"]1ah$]h&]jajjuh1j# hhhMNhj hhjKubj$ )}(h https://lwn.net/Articles/787611/h](j* )}(h2h]h2}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1j) hjY ubh)}(hj[ h]j= )}(hj[ h]h https://lwn.net/Articles/787611/}(hjn hhhNhNubah}(h]h ]h"]h$]h&]refurij[ uh1j< hjk ubah}(h]h ]h"]h$]h&]uh1hhhhMOhjY ubeh}(h]j/ah ]h"]2ah$]h&]j*ajjuh1j# hhhMOhj hhjKubj$ )}(hBhttps://www.kernel.org/doc/html/latest/mm/free_page_reporting.htmlh](j* )}(h3h]h3}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j) hj ubh)}(hj h]j= )}(hj h]hBhttps://www.kernel.org/doc/html/latest/mm/free_page_reporting.html}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurij uh1j< hj ubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubeh}(h]jQah ]h"]3ah$]h&]jLajjuh1j# hhhMPhj hhjKubeh}(h]exampleah ]h"]exampleah$]h&]uh1hhhhhhhhM4ubeh}(h]damon-based-reclamationah ]h"]damon-based reclamationah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(1]ja2]j a3]jBaurefids}nameids}(j j jaj^jjj j jTjQjjjXjUjjjjj!jjjjjjjj9j6jnjkjjjjjYjVjjj=j:jrjojjjf jc j j j j j j jB j? ji jf j j j j j j jV jj j/j jQu nametypes}(j jajj jTjjXjjj!jjjj9jnjjjYjj=jrjjf j j j jB ji j j j jV j j uh}(j hj^hjjj*j jLjBjjdj jjQjjjWjUjjj[jjjjjj$jjjjj6jjkj<jjqjjjVjjj\j:jjoj@jjujc jj ji j j j j j? j jf jE j jl j j j j jj% j/jY jQj u footnote_refs}(j, ]jaj. ]j aj0 ]jBau citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes](j% jY j e citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j KsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.