4sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget./translations/zh_CN/admin-guide/mm/damon/usagemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/zh_TW/admin-guide/mm/damon/usagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/it_IT/admin-guide/mm/damon/usagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ja_JP/admin-guide/mm/damon/usagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ko_KR/admin-guide/mm/damon/usagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/pt_BR/admin-guide/mm/damon/usagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/sp_SP/admin-guide/mm/damon/usagemodnameN 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:spacepreserveuh1hhhhhhH/var/lib/git/docbuild/linux/Documentation/admin-guide/mm/damon/usage.rsthKubhsection)}(hhh](htitle)}(hDetailed Usagesh]hDetailed Usages}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(h4DAMON provides below interfaces for different users.h]h4DAMON provides below interfaces for different users.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh bullet_list)}(hhh](h list_item)}(hX2*Special-purpose DAMON modules.* :ref:`This ` is for people who are building, distributing, and/or administrating the kernel with special-purpose DAMON usages. Using this, users can use DAMON's major features for the given purposes in build, boot, or runtime in simple ways.h]h)}(hX2*Special-purpose DAMON modules.* :ref:`This ` is for people who are building, distributing, and/or administrating the kernel with special-purpose DAMON usages. Using this, users can use DAMON's major features for the given purposes in build, boot, or runtime in simple ways.h](hemphasis)}(h *Special-purpose DAMON modules.*h]hSpecial-purpose DAMON modules.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh }(hhhhhNhNubh)}(h+:ref:`This `h]hinline)}(hjh]hThis}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocadmin-guide/mm/damon/usage refdomainj!reftyperef refexplicitrefwarn reftargetdamon_modules_special_purposeuh1hhhhK hhubh is for people who are building, distributing, and/or administrating the kernel with special-purpose DAMON usages. Using this, users can use DAMON’s major features for the given purposes in build, boot, or runtime in simple ways.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hX*DAMON user space tool.* `This `_ is for privileged people such as system administrators who want a just-working human-friendly interface. Using this, users can use the DAMON’s major features in a human-friendly way. It may not be highly tuned for special cases, though. For more detail, please refer to its `usage document `_.h]h)}(hX*DAMON user space tool.* `This `_ is for privileged people such as system administrators who want a just-working human-friendly interface. Using this, users can use the DAMON’s major features in a human-friendly way. It may not be highly tuned for special cases, though. For more detail, please refer to its `usage document `_.h](h)}(h*DAMON user space tool.*h]hDAMON user space tool.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIubh }(hjIhhhNhNubh reference)}(h+`This `_h]hThis}(hjahhhNhNubah}(h]h ]h"]h$]h&]nameThisrefuri!https://github.com/damonitor/damouh1j_hjIubhtarget)}(h$ h]h}(h]thisah ]h"]thisah$]h&]refurijruh1js referencedKhjIubhX is for privileged people such as system administrators who want a just-working human-friendly interface. Using this, users can use the DAMON’s major features in a human-friendly way. It may not be highly tuned for special cases, though. For more detail, please refer to its }(hjIhhhNhNubj`)}(hH`usage document `_h]husage document}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameusage documentjq4https://github.com/damonitor/damo/blob/next/USAGE.mduh1j_hjIubjt)}(h7 h]h}(h]usage-documentah ]h"]usage documentah$]h&]refurijuh1jsjKhjIubh.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjEubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hX*sysfs interface.* :ref:`This ` is for privileged user space programmers who want more optimized use of DAMON. Using this, users can use DAMON’s major features by reading from and writing to special sysfs files. Therefore, you can write and use your personalized DAMON sysfs wrapper programs that reads/writes the sysfs files instead of you. The `DAMON user space tool `_ is one example of such programs.h]h)}(hX*sysfs interface.* :ref:`This ` is for privileged user space programmers who want more optimized use of DAMON. Using this, users can use DAMON’s major features by reading from and writing to special sysfs files. Therefore, you can write and use your personalized DAMON sysfs wrapper programs that reads/writes the sysfs files instead of you. The `DAMON user space tool `_ is one example of such programs.h](h)}(h*sysfs interface.*h]hsysfs interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh }(hjhhhNhNubh)}(h:ref:`This `h]j)}(hjh]hThis}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3sysfs_interfaceuh1hhhhKhjubhX@ is for privileged user space programmers who want more optimized use of DAMON. Using this, users can use DAMON’s major features by reading from and writing to special sysfs files. Therefore, you can write and use your personalized DAMON sysfs wrapper programs that reads/writes the sysfs files instead of you. The }(hjhhhNhNubj`)}(h<`DAMON user space tool `_h]hDAMON user space tool}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameDAMON user space tooljq!https://github.com/damonitor/damouh1j_hjubjt)}(h$ h]h}(h]damon-user-space-toolah ]h"]damon user space toolah$]h&]refurijuh1jsjKhjubh! is one example of such programs.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hXv*Kernel Space Programming Interface.* :doc:`This ` is for kernel space programmers. Using this, users can utilize every feature of DAMON most flexibly and efficiently by writing kernel space DAMON application programs for you. You can even extend DAMON for various address spaces. For detail, please refer to the interface :doc:`document `. h]h)}(hXu*Kernel Space Programming Interface.* :doc:`This ` is for kernel space programmers. Using this, users can utilize every feature of DAMON most flexibly and efficiently by writing kernel space DAMON application programs for you. You can even extend DAMON for various address spaces. For detail, please refer to the interface :doc:`document `.h](h)}(h%*Kernel Space Programming Interface.*h]h#Kernel Space Programming Interface.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%ubh }(hj%hhhNhNubh)}(h:doc:`This `h]j)}(hj=h]hThis}(hj?hhhNhNubah}(h]h ](j stdstd-doceh"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]refdocj- refdomainjIreftypedoc refexplicitrefwarnj3 /mm/damon/apiuh1hhhhKhj%ubhX is for kernel space programmers. Using this, users can utilize every feature of DAMON most flexibly and efficiently by writing kernel space DAMON application programs for you. You can even extend DAMON for various address spaces. For detail, please refer to the interface }(hj%hhhNhNubh)}(h:doc:`document `h]j)}(hjah]hdocument}(hjchhhNhNubah}(h]h ](j stdstd-doceh"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]refdocj- refdomainjmreftypedoc refexplicitrefwarnj3 /mm/damon/apiuh1hhhhKhj%ubh.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj!ubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhK hhhhubjt)}(h.. _sysfs_interface:h]h}(h]h ]h"]h$]h&]refidsysfs-interfaceuh1jshK#hhhhhhubh)}(hhh](h)}(hsysfs Interfaceh]hsysfs Interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK&ubh)}(hDAMON sysfs interface is built when ``CONFIG_DAMON_SYSFS`` is defined. It creates multiple directories and files under its sysfs directory, ``/kernel/mm/damon/``. You can control DAMON by writing to and reading from the files under the directory.h](h$DAMON sysfs interface is built when }(hjhhhNhNubhliteral)}(h``CONFIG_DAMON_SYSFS``h]hCONFIG_DAMON_SYSFS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhS is defined. It creates multiple directories and files under its sysfs directory, }(hjhhhNhNubj)}(h``/kernel/mm/damon/``h]h/kernel/mm/damon/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhV. You can control DAMON by writing to and reading from the files under the directory.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK(hjhhubh)}(haFor a short example, users can monitor the virtual address space of a given workload as below. ::h]h^For a short example, users can monitor the virtual address space of a given workload as below.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjhhubh literal_block)}(hX5# cd /sys/kernel/mm/damon/admin/ # echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts # echo vaddr > kdamonds/0/contexts/0/operations # echo 1 > kdamonds/0/contexts/0/targets/nr_targets # echo $(pidof ) > kdamonds/0/contexts/0/targets/0/pid_target # echo on > kdamonds/0/stateh]hX5# cd /sys/kernel/mm/damon/admin/ # echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts # echo vaddr > kdamonds/0/contexts/0/operations # echo 1 > kdamonds/0/contexts/0/targets/nr_targets # echo $(pidof ) > kdamonds/0/contexts/0/targets/0/pid_target # echo on > kdamonds/0/state}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhK0hjhhubh)}(hhh](h)}(hFiles Hierarchyh]hFiles Hierarchy}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK8ubh)}(hThe files hierarchy of DAMON sysfs interface is shown below. In the below figure, parents-children relations are represented with indentations, each directory is having ``/`` suffix, and files in each directory are separated by comma (",").h](hThe files hierarchy of DAMON sysfs interface is shown below. In the below figure, parents-children relations are represented with indentations, each directory is having }(hjhhhNhNubj)}(h``/``h]h/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhF suffix, and files in each directory are separated by comma (“,”).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubj)}(hX :ref:`/sys/kernel/mm/damon `/admin │ :ref:`kdamonds `/nr_kdamonds │ │ :ref:`0 `/state,pid,refresh_ms │ │ │ :ref:`contexts `/nr_contexts │ │ │ │ :ref:`0 `/avail_operations,operations,addr_unit, │ │ │ │ pause │ │ │ │ │ :ref:`monitoring_attrs `/ │ │ │ │ │ │ intervals/sample_us,aggr_us,update_us │ │ │ │ │ │ │ intervals_goal/access_bp,aggrs,min_sample_us,max_sample_us │ │ │ │ │ │ nr_regions/min,max │ │ │ │ │ │ :ref:`probes `/nr_probes │ │ │ │ │ │ │ 0/filters/nr_filters │ │ │ │ │ │ │ │ 0/type,matching,allow,path │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ │ ... │ │ │ │ │ :ref:`targets `/nr_targets │ │ │ │ │ │ :ref:`0 `/pid_target,obsolete_target │ │ │ │ │ │ │ :ref:`regions `/nr_regions │ │ │ │ │ │ │ │ :ref:`0 `/start,end │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ ... │ │ │ │ │ :ref:`schemes `/nr_schemes │ │ │ │ │ │ :ref:`0 `/action,target_nid,apply_interval_us │ │ │ │ │ │ │ :ref:`access_pattern `/ │ │ │ │ │ │ │ │ sz/min,max │ │ │ │ │ │ │ │ nr_accesses/min,max │ │ │ │ │ │ │ │ age/min,max │ │ │ │ │ │ │ :ref:`quotas `/ms,bytes,reset_interval_ms, │ │ │ │ │ │ │ effective_bytes,goal_tuner, │ │ │ │ │ │ │ fail_charge_num,fail_charge_denom │ │ │ │ │ │ │ │ weights/sz_permil,nr_accesses_permil,age_permil │ │ │ │ │ │ │ │ :ref:`goals `/nr_goals │ │ │ │ │ │ │ │ │ 0/target_metric,target_value,current_value,nid,path │ │ │ │ │ │ │ :ref:`watermarks `/metric,interval_us,high,mid,low │ │ │ │ │ │ │ :ref:`{core_,ops_,}filters `/nr_filters │ │ │ │ │ │ │ │ 0/type,matching,allow,memcg_path,addr_start,addr_end,damon_target_idx,min,max │ │ │ │ │ │ │ :ref:`dests `/nr_dests │ │ │ │ │ │ │ │ 0/id,weight │ │ │ │ │ │ │ :ref:`stats `/nr_tried,sz_tried,nr_applied,sz_applied,sz_ops_filter_passed,qt_exceeds,nr_snapshots,max_nr_snapshots │ │ │ │ │ │ │ :ref:`tried_regions `/total_bytes │ │ │ │ │ │ │ │ 0/start,end,nr_accesses,age,sz_filter_passed │ │ │ │ │ │ │ │ │ probes │ │ │ │ │ │ │ │ │ │ 0/hits │ │ │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ ... │ │ │ │ ... │ │ ...h](h)}(h(:ref:`/sys/kernel/mm/damon `h]j)}(hj=h]h/sys/kernel/mm/damon}(hj?hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]refdocj- refdomainjIreftyperef refexplicitrefwarnj3 sysfs_rootuh1hhhhK?hj7ubh /admin │ }hj7sbh)}(h :ref:`kdamonds `h]j)}(hjah]hkdamonds}(hjchhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]refdocj- refdomainjmreftyperef refexplicitrefwarnj3sysfs_kdamondsuh1hhhhK?hj7ubh/nr_kdamonds │ │ }hj7sbh)}(h:ref:`0 `h]j)}(hjh]h0}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_kdamonduh1hhhhK?hj7ubh"/state,pid,refresh_ms │ │ │ }hj7sbh)}(h :ref:`contexts `h]j)}(hjh]hcontexts}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3sysfs_contextsuh1hhhhK?hj7ubh/nr_contexts │ │ │ │ }hj7sbh)}(h:ref:`0 `h]j)}(hjh]h0}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_contextuh1hhhhK?hj7ubhT/avail_operations,operations,addr_unit, │ │ │ │ pause │ │ │ │ │ }hj7sbh)}(h0:ref:`monitoring_attrs `h]j)}(hjh]hmonitoring_attrs}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3sysfs_monitoring_attrsuh1hhhhK?hj7ubh/ │ │ │ │ │ │ intervals/sample_us,aggr_us,update_us │ │ │ │ │ │ │ intervals_goal/access_bp,aggrs,min_sample_us,max_sample_us │ │ │ │ │ │ nr_regions/min,max │ │ │ │ │ │ }hj7sbh)}(h(:ref:`probes `h]j)}(hjh]hprobes}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainj!reftyperef refexplicitrefwarnj3damon_usage_sysfs_probesuh1hhhhK?hj7ubh/nr_probes │ │ │ │ │ │ │ 0/filters/nr_filters │ │ │ │ │ │ │ │ 0/type,matching,allow,path │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ │ ... │ │ │ │ │ }hj7sbh)}(h:ref:`targets `h]j)}(hj9h]htargets}(hj;hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]refdocj- refdomainjEreftyperef refexplicitrefwarnj3 sysfs_targetsuh1hhhhK?hj7ubh$/nr_targets │ │ │ │ │ │ }hj7sbh)}(h:ref:`0 `h]j)}(hj]h]h0}(hj_hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]refdocj- refdomainjireftyperef refexplicitrefwarnj3 sysfs_targetuh1hhhhK?hj7ubh8/pid_target,obsolete_target │ │ │ │ │ │ │ }hj7sbh)}(h:ref:`regions `h]j)}(hjh]hregions}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_regionsuh1hhhhK?hj7ubh,/nr_regions │ │ │ │ │ │ │ │ }hj7sbh)}(h:ref:`0 `h]j)}(hjh]h0}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_regionuh1hhhhK?hj7ubh_/start,end │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ ... │ │ │ │ │ }hj7sbh)}(h:ref:`schemes `h]j)}(hjh]hschemes}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_schemesuh1hhhhK?hj7ubh$/nr_schemes │ │ │ │ │ │ }hj7sbh)}(h:ref:`0 `h]j)}(hjh]h0}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_schemeuh1hhhhK?hj7ubhA/action,target_nid,apply_interval_us │ │ │ │ │ │ │ }hj7sbh)}(h,:ref:`access_pattern `h]j)}(hjh]haccess_pattern}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3sysfs_access_patternuh1hhhhK?hj7ubh/ │ │ │ │ │ │ │ │ sz/min,max │ │ │ │ │ │ │ │ nr_accesses/min,max │ │ │ │ │ │ │ │ age/min,max │ │ │ │ │ │ │ }hj7sbh)}(h:ref:`quotas `h]j)}(hj5h]hquotas}(hj7hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]refdocj- refdomainjAreftyperef refexplicitrefwarnj3 sysfs_quotasuh1hhhhK?hj7ubhX /ms,bytes,reset_interval_ms, │ │ │ │ │ │ │ effective_bytes,goal_tuner, │ │ │ │ │ │ │ fail_charge_num,fail_charge_denom │ │ │ │ │ │ │ │ weights/sz_permil,nr_accesses_permil,age_permil │ │ │ │ │ │ │ │ }hj7sbh)}(h(:ref:`goals `h]j)}(hjYh]hgoals}(hj[hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]refdocj- refdomainjereftyperef refexplicitrefwarnj3sysfs_schemes_quota_goalsuh1hhhhK?hj7ubh~/nr_goals │ │ │ │ │ │ │ │ │ 0/target_metric,target_value,current_value,nid,path │ │ │ │ │ │ │ }hj7sbh)}(h$:ref:`watermarks `h]j)}(hj}h]h watermarks}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3sysfs_watermarksuh1hhhhK?hj7ubh=/metric,interval_us,high,mid,low │ │ │ │ │ │ │ }hj7sbh)}(h+:ref:`{core_,ops_,}filters `h]j)}(hjh]h{core_,ops_,}filters}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_filtersuh1hhhhK?hj7ubh/nr_filters │ │ │ │ │ │ │ │ 0/type,matching,allow,memcg_path,addr_start,addr_end,damon_target_idx,min,max │ │ │ │ │ │ │ }hj7sbh)}(h :ref:`dests `h]j)}(hjh]hdests}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3damon_sysfs_destsuh1hhhhK?hj7ubhR/nr_dests │ │ │ │ │ │ │ │ 0/id,weight │ │ │ │ │ │ │ }hj7sbh)}(h":ref:`stats `h]j)}(hjh]hstats}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3sysfs_schemes_statsuh1hhhhK?hj7ubh/nr_tried,sz_tried,nr_applied,sz_applied,sz_ops_filter_passed,qt_exceeds,nr_snapshots,max_nr_snapshots │ │ │ │ │ │ │ }hj7sbh)}(h2:ref:`tried_regions `h]j)}(hj h]h tried_regions}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3sysfs_schemes_tried_regionsuh1hhhhK?hj7ubhX?/total_bytes │ │ │ │ │ │ │ │ 0/start,end,nr_accesses,age,sz_filter_passed │ │ │ │ │ │ │ │ │ probes │ │ │ │ │ │ │ │ │ │ 0/hits │ │ │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ ... │ │ │ │ ... │ │ ...}hj7sbeh}(h]h ]h"]h$]h&]hhuh1jhKAhjhhhhubjt)}(h.. _sysfs_root:h]h}(h]h ]h"]h$]h&]j sysfs-rootuh1jshKrhjhhhhubeh}(h]files-hierarchyah ]h"]files hierarchyah$]h&]uh1hhjhhhhhK8ubh)}(hhh](h)}(hRooth]hRoot}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhKuubh)}(hXThe root of the DAMON sysfs interface is ``/kernel/mm/damon/``, and it has one directory named ``admin``. The directory contains the files for privileged user space programs' control of DAMON. User space tools or daemons having the root permission could use this directory.h](h)The root of the DAMON sysfs interface is }(hjYhhhNhNubj)}(h``/kernel/mm/damon/``h]h/kernel/mm/damon/}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh!, and it has one directory named }(hjYhhhNhNubj)}(h ``admin``h]hadmin}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh. The directory contains the files for privileged user space programs’ control of DAMON. User space tools or daemons having the root permission could use this directory.}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKwhjHhhubjt)}(h.. _sysfs_kdamonds:h]h}(h]h ]h"]h$]h&]jsysfs-kdamondsuh1jshK|hjHhhhhubeh}(h](rootj?eh ]h"](root sysfs_rooteh$]h&]uh1hhjhhhhhKuexpect_referenced_by_name}jj5sexpect_referenced_by_id}j?j5subh)}(hhh](h)}(h kdamonds/h]h kdamonds/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXUnder the ``admin`` directory, one directory, ``kdamonds``, which has files for controlling the kdamonds (refer to :ref:`design ` for more details) exists. In the beginning, this directory has only one file, ``nr_kdamonds``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each kdamond.h](h Under the }(hjhhhNhNubj)}(h ``admin``h]hadmin}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh directory, one directory, }(hjhhhNhNubj)}(h ``kdamonds``h]hkdamonds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh9, which has files for controlling the kdamonds (refer to }(hjhhhNhNubh)}(h@:ref:`design `h]j)}(hjh]hdesign}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj30damon_design_execution_model_and_data_structuresuh1hhhhKhjubhP for more details) exists. In the beginning, this directory has only one file, }(hjhhhNhNubj)}(h``nr_kdamonds``h]h nr_kdamonds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. Writing a number (}(hjhhhNhNubj)}(h``N``h]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh<) to the file creates the number of child directories named }(hjhhhNhNubj)}(h``0``h]h0}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h``N-1``h]hN-1}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh*. Each directory represents each kdamond.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjt)}(h.. _sysfs_kdamond:h]h}(h]h ]h"]h$]h&]j sysfs-kdamonduh1jshKhjhhhhubeh}(h](kdamondsjeh ]h"]( kdamonds/sysfs_kdamondseh$]h&]uh1hhjhhhhhKj}jcjsj}jjsubh)}(hhh](h)}(h kdamonds//h]h kdamonds//}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhhKubh)}(hvIn each kdamond directory, three files (``state``, ``pid`` and ``refresh_ms``) and one directory (``contexts``) exist.h](h(In each kdamond directory, three files (}(hjyhhhNhNubj)}(h ``state``h]hstate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubh, }(hjyhhhNhNubj)}(h``pid``h]hpid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubh and }(hjyhhhNhNubj)}(h``refresh_ms``h]h refresh_ms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubh) and one directory (}(hjyhhhNhNubj)}(h ``contexts``h]hcontexts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubh) exist.}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhhubh)}(hfReading ``state`` returns ``on`` if the kdamond is currently running, or ``off`` if it is not running.h](hReading }(hjhhhNhNubj)}(h ``state``h]hstate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh returns }(hjhhhNhNubj)}(h``on``h]hon}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) if the kdamond is currently running, or }(hjhhhNhNubj)}(h``off``h]hoff}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh if it is not running.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhhubh)}(hEUsers can write below commands for the kdamond to the ``state`` file.h](h6Users can write below commands for the kdamond to the }(hjhhhNhNubj)}(h ``state``h]hstate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhhubh)}(hhh](h)}(h``on``: Start running.h]h)}(hj8h](j)}(h``on``h]hon}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh: Start running.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj6ubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubh)}(h``off``: Stop running.h]h)}(hj]h](j)}(h``off``h]hoff}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubh: Stop running.}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj[ubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubh)}(h``commit``: Read the user inputs in the sysfs files except ``state`` file again. Monitoring :ref:`target region ` inputs are also be ignored if no target region is specified.h]h)}(h``commit``: Read the user inputs in the sysfs files except ``state`` file again. Monitoring :ref:`target region ` inputs are also be ignored if no target region is specified.h](j)}(h ``commit``h]hcommit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh1: Read the user inputs in the sysfs files except }(hjhhhNhNubj)}(h ``state``h]hstate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file again. Monitoring }(hjhhhNhNubh)}(h$:ref:`target region `h]j)}(hjh]h target region}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_regionsuh1hhhhKhjubh= inputs are also be ignored if no target region is specified.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubh)}(hX3``update_tuned_intervals``: Update the contents of ``sample_us`` and ``aggr_us`` files of the kdamond with the auto-tuning applied ``sampling interval`` and ``aggregation interval`` for the files. Please refer to :ref:`intervals_goal section ` for more details.h]h)}(hX3``update_tuned_intervals``: Update the contents of ``sample_us`` and ``aggr_us`` files of the kdamond with the auto-tuning applied ``sampling interval`` and ``aggregation interval`` for the files. Please refer to :ref:`intervals_goal section ` for more details.h](j)}(h``update_tuned_intervals``h]hupdate_tuned_intervals}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: Update the contents of }(hjhhhNhNubj)}(h ``sample_us``h]h sample_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h ``aggr_us``h]haggr_us}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh3 files of the kdamond with the auto-tuning applied }(hjhhhNhNubj)}(h``sampling interval``h]hsampling interval}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``aggregation interval``h]haggregation interval}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh! for the files. Please refer to }(hjhhhNhNubh)}(hK:ref:`intervals_goal section `h]j)}(hj@ h]hintervals_goal section}(hjB hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj> ubah}(h]h ]h"]h$]h&]refdocj- refdomainjL reftyperef refexplicitrefwarnj3+damon_usage_sysfs_monitoring_intervals_goaluh1hhhhKhjubh for more details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubh)}(hw``commit_schemes_quota_goals``: Read the DAMON-based operation schemes' :ref:`quota goals `.h]h)}(hw``commit_schemes_quota_goals``: Read the DAMON-based operation schemes' :ref:`quota goals `.h](j)}(h``commit_schemes_quota_goals``h]hcommit_schemes_quota_goals}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr ubh,: Read the DAMON-based operation schemes’ }(hjr hhhNhNubh)}(h.:ref:`quota goals `h]j)}(hj h]h quota goals}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj- refdomainj reftyperef refexplicitrefwarnj3sysfs_schemes_quota_goalsuh1hhhhKhjr ubh.}(hjr hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjn ubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubh)}(h``update_schemes_stats``: Update the contents of stats files for each DAMON-based operation scheme of the kdamond. For details of the stats, please refer to :ref:`stats section `.h]h)}(h``update_schemes_stats``: Update the contents of stats files for each DAMON-based operation scheme of the kdamond. For details of the stats, please refer to :ref:`stats section `.h](j)}(h``update_schemes_stats``h]hupdate_schemes_stats}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh: Update the contents of stats files for each DAMON-based operation scheme of the kdamond. For details of the stats, please refer to }(hj hhhNhNubh)}(h*:ref:`stats section `h]j)}(hj h]h stats section}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj- refdomainj reftyperef refexplicitrefwarnj3sysfs_schemes_statsuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubh)}(hX;``update_schemes_tried_regions``: Update the DAMON-based operation scheme action tried regions directory for each DAMON-based operation scheme of the kdamond. For details of the DAMON-based operation scheme action tried regions directory, please refer to :ref:`tried_regions section `.h]h)}(hX;``update_schemes_tried_regions``: Update the DAMON-based operation scheme action tried regions directory for each DAMON-based operation scheme of the kdamond. For details of the DAMON-based operation scheme action tried regions directory, please refer to :ref:`tried_regions section `.h](j)}(h ``update_schemes_tried_regions``h]hupdate_schemes_tried_regions}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh: Update the DAMON-based operation scheme action tried regions directory for each DAMON-based operation scheme of the kdamond. For details of the DAMON-based operation scheme action tried regions directory, please refer to }(hj hhhNhNubh)}(h::ref:`tried_regions section `h]j)}(hj h]htried_regions section}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj- refdomainj* reftyperef refexplicitrefwarnj3sysfs_schemes_tried_regionsuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubh)}(hT``update_schemes_tried_bytes``: Update only ``.../tried_regions/total_bytes`` files.h]h)}(hT``update_schemes_tried_bytes``: Update only ``.../tried_regions/total_bytes`` files.h](j)}(h``update_schemes_tried_bytes``h]hupdate_schemes_tried_bytes}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP ubh: Update only }(hjP hhhNhNubj)}(h!``.../tried_regions/total_bytes``h]h.../tried_regions/total_bytes}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP ubh files.}(hjP hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjL ubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubh)}(h``clear_schemes_tried_regions``: Clear the DAMON-based operating scheme action tried regions directory for each DAMON-based operation scheme of the kdamond.h]h)}(h``clear_schemes_tried_regions``: Clear the DAMON-based operating scheme action tried regions directory for each DAMON-based operation scheme of the kdamond.h](j)}(h``clear_schemes_tried_regions``h]hclear_schemes_tried_regions}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh}: Clear the DAMON-based operating scheme action tried regions directory for each DAMON-based operation scheme of the kdamond.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubh)}(h``update_schemes_effective_quotas``: Update the contents of ``effective_bytes`` files for each DAMON-based operation scheme of the kdamond. For more details, refer to :ref:`quotas directory `. h]h)}(h``update_schemes_effective_quotas``: Update the contents of ``effective_bytes`` files for each DAMON-based operation scheme of the kdamond. For more details, refer to :ref:`quotas directory `.h](j)}(h#``update_schemes_effective_quotas``h]hupdate_schemes_effective_quotas}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh: Update the contents of }(hj hhhNhNubj)}(h``effective_bytes``h]heffective_bytes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhY files for each DAMON-based operation scheme of the kdamond. For more details, refer to }(hj hhhNhNubh)}(h&:ref:`quotas directory `h]j)}(hj h]hquotas directory}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj- refdomainj reftyperef refexplicitrefwarnj3 sysfs_quotasuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhKhjhhhubh)}(hLIf the state is ``on``, reading ``pid`` shows the pid of the kdamond thread.h](hIf the state is }(hj hhhNhNubj)}(h``on``h]hon}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh , reading }(hj hhhNhNubj)}(h``pid``h]hpid}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh% shows the pid of the kdamond thread.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhhubh)}(hXUsers can ask the kernel to periodically update files showing auto-tuned parameters and DAMOS stats instead of manually writing ``update_tuned_intervals`` like keywords to ``state`` file. For this, users should write the desired update time interval in milliseconds to ``refresh_ms`` file. If the interval is zero, the periodic update is disabled. Reading the file shows currently set time interval.h](hUsers can ask the kernel to periodically update files showing auto-tuned parameters and DAMOS stats instead of manually writing }(hj> hhhNhNubj)}(h``update_tuned_intervals``h]hupdate_tuned_intervals}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj> ubh like keywords to }(hj> hhhNhNubj)}(h ``state``h]hstate}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj> ubhY file. For this, users should write the desired update time interval in milliseconds to }(hj> hhhNhNubj)}(h``refresh_ms``h]h refresh_ms}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj> ubhv file. If the interval is zero, the periodic update is disabled. Reading the file shows currently set time interval.}(hj> hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhhubh)}(hm``contexts`` directory contains files for controlling the monitoring contexts that this kdamond will execute.h](j)}(h ``contexts``h]hcontexts}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubha directory contains files for controlling the monitoring contexts that this kdamond will execute.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhhubjt)}(h.. _sysfs_contexts:h]h}(h]h ]h"]h$]h&]jsysfs-contextsuh1jshKhjhhhhhubeh}(h]( kdamonds-nj\eh ]h"]( kdamonds// sysfs_kdamondeh$]h&]uh1hhjhhhhhKj}j jRsj}j\jRsubh)}(hhh](h)}(hkdamonds//contexts/h]hkdamonds//contexts/}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hXIn the beginning, this directory has only one file, ``nr_contexts``. Writing a number (``N``) to the file creates the number of child directories named as ``0`` to ``N-1``. Each directory represents each monitoring context (refer to :ref:`design ` for more details). At the moment, only one context per kdamond is supported, so only ``0`` or ``1`` can be written to the file.h](h4In the beginning, this directory has only one file, }(hj hhhNhNubj)}(h``nr_contexts``h]h nr_contexts}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh. Writing a number (}(hj hhhNhNubj)}(h``N``h]hN}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh?) to the file creates the number of child directories named as }(hj hhhNhNubj)}(h``0``h]h0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh to }(hj hhhNhNubj)}(h``N-1``h]hN-1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh?. Each directory represents each monitoring context (refer to }(hj hhhNhNubh)}(h@:ref:`design `h]j)}(hj h]hdesign}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj- refdomainj# reftyperef refexplicitrefwarnj30damon_design_execution_model_and_data_structuresuh1hhhhKhj ubhW for more details). At the moment, only one context per kdamond is supported, so only }(hj hhhNhNubj)}(h``0``h]h0}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh or }(hj hhhNhNubj)}(h``1``h]h1}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh can be written to the file.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjt)}(h.. _sysfs_context:h]h}(h]h ]h"]h$]h&]j sysfs-contextuh1jshKhj hhhhubeh}(h](kdamonds-n-contextsj eh ]h"](kdamonds//contexts/sysfs_contextseh$]h&]uh1hhjhhhhhKj}jt j sj}j j subh)}(hhh](h)}(h contexts//h]h contexts//}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy hhhhhKubh)}(hIn each context directory, four files (``avail_operations``, ``operations``, ``addr_unit`` and ``pause``) and three directories (``monitoring_attrs``, ``targets``, and ``schemes``) exist.h](h'In each context directory, four files (}(hj hhhNhNubj)}(h``avail_operations``h]havail_operations}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(hj hhhNhNubj)}(h``operations``h]h operations}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(hj hhhNhNubj)}(h ``addr_unit``h]h addr_unit}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh and }(hj hhhNhNubj)}(h ``pause``h]hpause}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh) and three directories (}(hj hhhNhNubj)}(h``monitoring_attrs``h]hmonitoring_attrs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }hj sbj)}(h ``targets``h]htargets}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, and }(hj hhhNhNubj)}(h ``schemes``h]hschemes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh) exist.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjy hhubh)}(hXDAMON supports multiple types of :ref:`monitoring operations `, including those for virtual address space and the physical address space. You can get the list of available monitoring operations set on the currently running kernel by reading ``avail_operations`` file. Based on the kernel configuration, the file will list different available operation sets. Please refer to the :ref:`design ` for the list of all available operation sets and their brief explanations.h](h!DAMON supports multiple types of }(hj hhhNhNubh)}(hG:ref:`monitoring operations `h]j)}(hj h]hmonitoring operations}(hj" hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj- refdomainj, reftyperef refexplicitrefwarnj3(damon_design_configurable_operations_setuh1hhhhKhj ubh, including those for virtual address space and the physical address space. You can get the list of available monitoring operations set on the currently running kernel by reading }(hj hhhNhNubj)}(h``avail_operations``h]havail_operations}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhw file. Based on the kernel configuration, the file will list different available operation sets. Please refer to the }(hj hhhNhNubh)}(h$:ref:`design `h]j)}(hjV h]hdesign}(hjX hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjT ubah}(h]h ]h"]h$]h&]refdocj- refdomainjb reftyperef refexplicitrefwarnj3damon_operations_setuh1hhhhKhj ubhK for the list of all available operation sets and their brief explanations.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjy hhubh)}(hYou can set and get what type of monitoring operations DAMON will use for the context by writing one of the keywords listed in ``avail_operations`` file and reading from the ``operations`` file.h](hYou can set and get what type of monitoring operations DAMON will use for the context by writing one of the keywords listed in }(hj~ hhhNhNubj)}(h``avail_operations``h]havail_operations}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ ubh file and reading from the }(hj~ hhhNhNubj)}(h``operations``h]h operations}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ ubh file.}(hj~ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjy hhubh)}(h``addr_unit`` file is for setting and getting the :ref:`address unit ` parameter of the operations set.h](j)}(h ``addr_unit``h]h addr_unit}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh% file is for setting and getting the }(hj hhhNhNubh)}(h,:ref:`address unit `h]j)}(hj h]h address unit}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj- refdomainj reftyperef refexplicitrefwarnj3damon_design_addr_unituh1hhhhKhj ubh! parameter of the operations set.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjy hhubh)}(h``pause`` file is for setting and getting the :ref:`pause request ` parameter of the context.h](j)}(h ``pause``h]hpause}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh% file is for setting and getting the }(hj hhhNhNubh)}(hG:ref:`pause request `h]j)}(hjh]h pause request}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj30damon_design_execution_model_and_data_structuresuh1hhhhKhj ubh parameter of the context.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjy hhubjt)}(h.. _sysfs_monitoring_attrs:h]h}(h]h ]h"]h$]h&]jsysfs-monitoring-attrsuh1jshKhjy hhhhubeh}(h]( contexts-njm eh ]h"]( contexts// sysfs_contexteh$]h&]uh1hhjhhhhhKj}jAjc sj}jm jc subh)}(hhh](h)}(hcontexts//monitoring_attrs/h]hcontexts//monitoring_attrs/}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhKubh)}(hFiles for specifying attributes of the monitoring including required quality and efficiency of the monitoring are in ``monitoring_attrs`` directory. Specifically, three directories, ``intervals``, ``nr_regions`` and ``probes`` exist in this directory.h](huFiles for specifying attributes of the monitoring including required quality and efficiency of the monitoring are in }(hjWhhhNhNubj)}(h``monitoring_attrs``h]hmonitoring_attrs}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh- directory. Specifically, three directories, }(hjWhhhNhNubj)}(h ``intervals``h]h intervals}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh, }(hjWhhhNhNubj)}(h``nr_regions``h]h nr_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh and }(hjWhhhNhNubj)}(h ``probes``h]hprobes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh exist in this directory.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjFhhubh)}(hXUnder ``intervals`` directory, three files for DAMON's sampling interval (``sample_us``), aggregation interval (``aggr_us``), and update interval (``update_us``) exist. You can set and get the values in micro-seconds by writing to and reading from the files.h](hUnder }(hjhhhNhNubj)}(h ``intervals``h]h intervals}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh9 directory, three files for DAMON’s sampling interval (}(hjhhhNhNubj)}(h ``sample_us``h]h sample_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh), aggregation interval (}(hjhhhNhNubj)}(h ``aggr_us``h]haggr_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh), and update interval (}(hjhhhNhNubj)}(h ``update_us``h]h update_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhc) exist. You can set and get the values in micro-seconds by writing to and reading from the files.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjFhhubh)}(hXUnder ``nr_regions`` directory, two files for the lower-bound and upper-bound of DAMON's monitoring regions (``min`` and ``max``, respectively), which controls the monitoring overhead, exist. You can set and get the values by writing to and rading from the files.h](hUnder }(hjhhhNhNubj)}(h``nr_regions``h]h nr_regions}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh[ directory, two files for the lower-bound and upper-bound of DAMON’s monitoring regions (}(hjhhhNhNubj)}(h``min``h]hmin}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``max``h]hmax}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, respectively), which controls the monitoring overhead, exist. You can set and get the values by writing to and rading from the files.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjFhhubh)}(hFor more details about the intervals and monitoring regions range, please refer to the Design document (:doc:`/mm/damon/design`).h](hhFor more details about the intervals and monitoring regions range, please refer to the Design document (}(hjGhhhNhNubh)}(h:doc:`/mm/damon/design`h]j)}(hjQh]h/mm/damon/design}(hjShhhNhNubah}(h]h ](j stdstd-doceh"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]refdocj- refdomainj]reftypedoc refexplicitrefwarnj3/mm/damon/designuh1hhhhKhjGubh).}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjFhhubjt)}(h0.. _damon_usage_sysfs_monitoring_intervals_goal:h]h}(h]h ]h"]h$]h&]j+damon-usage-sysfs-monitoring-intervals-goaluh1jshKhjFhhhhubeh}(h](contexts-n-monitoring-attrsj:eh ]h"](contexts//monitoring_attrs/sysfs_monitoring_attrseh$]h&]uh1hhjhhhhhKj}jj0sj}j:j0subh)}(hhh](h)}(h7contexts//monitoring_attrs/intervals/intervals_goal/h]h7contexts//monitoring_attrs/intervals/intervals_goal/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hXUnder the ``intervals`` directory, one directory for automated tuning of ``sample_us`` and ``aggr_us``, namely ``intervals_goal`` directory also exists. Under the directory, four files for the auto-tuning control, namely ``access_bp``, ``aggrs``, ``min_sample_us`` and ``max_sample_us`` exist. Please refer to the :ref:`design document of the feature ` for the internal of the tuning mechanism. Reading and writing the four files under ``intervals_goal`` directory shows and updates the tuning parameters that described in the :ref:design doc ` with the same names. The tuning starts with the user-set ``sample_us`` and ``aggr_us``. The tuning-applied current values of the two intervals can be read from the ``sample_us`` and ``aggr_us`` files after writing ``update_tuned_intervals`` to the ``state`` file.h](h Under the }(hjhhhNhNubj)}(h ``intervals``h]h intervals}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh2 directory, one directory for automated tuning of }(hjhhhNhNubj)}(h ``sample_us``h]h sample_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h ``aggr_us``h]haggr_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh , namely }(hjhhhNhNubj)}(h``intervals_goal``h]hintervals_goal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh\ directory also exists. Under the directory, four files for the auto-tuning control, namely }(hjhhhNhNubj)}(h ``access_bp``h]h access_bp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h ``aggrs``h]haggrs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``min_sample_us``h]h min_sample_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }hjsbj)}(h``max_sample_us``h]h max_sample_us}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh exist. Please refer to the }(hjhhhNhNubh)}(hT:ref:`design document of the feature `h]j)}(hj:h]hdesign document of the feature}(hj<hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]refdocj- refdomainjFreftyperef refexplicitrefwarnj3,damon_design_monitoring_intervals_autotuninguh1hhhhMhjubhU for the internal of the tuning mechanism. Reading and writing the four files under }(hjhhhNhNubj)}(h``intervals_goal``h]hintervals_goal}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh directory shows and updates the tuning parameters that described in the :ref:design doc ` with the same names. The tuning starts with the user-set }(hjhhhNhNubj)}(h ``sample_us``h]h sample_us}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }hjsbj)}(h ``aggr_us``h]haggr_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhO. The tuning-applied current values of the two intervals can be read from the }(hjhhhNhNubj)}(h ``sample_us``h]h sample_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }hjsbj)}(h ``aggr_us``h]haggr_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh files after writing }(hjhhhNhNubj)}(h``update_tuned_intervals``h]hupdate_tuned_intervals}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to the }(hjhhhNhNubj)}(h ``state``h]hstate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjt)}(h.. _damon_usage_sysfs_probes:h]h}(h]h ]h"]h$]h&]jdamon-usage-sysfs-probesuh1jshMhjhhhhubeh}(h](4contexts-n-monitoring-attrs-intervals-intervals-goaljeh ]h"](7contexts//monitoring_attrs/intervals/intervals_goal/+damon_usage_sysfs_monitoring_intervals_goaleh$]h&]uh1hhjhhhhhMj}jjysj}jjysubh)}(hhh](h)}(h%contexts//monitoring_attrs/probes/h]h%contexts//monitoring_attrs/probes/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hjA directory for registering :ref:`data attributes monitoring ` probes.h](hA directory for registering }(hjhhhNhNubh)}(hF:ref:`data attributes monitoring `h]j)}(hjh]hdata attributes monitoring}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3"damon_design_data_attrs_monitoringuh1hhhhMhjubh probes.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hIn the beginning, this directory has only one file, ``nr_probes``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each monitoring probe.h](h4In the beginning, this directory has only one file, }(hj9hhhNhNubj)}(h ``nr_probes``h]h nr_probes}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh. Writing a number (}(hj9hhhNhNubj)}(h``N``h]hN}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh<) to the file creates the number of child directories named }(hj9hhhNhNubj)}(h``0``h]h0}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh to }(hj9hhhNhNubj)}(h``N-1``h]hN-1}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh3. Each directory represents each monitoring probe.8}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hIn each probe directory, one directory, ``filters`` exists. The directory contains files for installing filters for the probe, that is used to determine the data attribute for the probe.h](h(In each probe directory, one directory, }(hjhhhNhNubj)}(h ``filters``h]hfilters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh exists. The directory contains files for installing filters for the probe, that is used to determine the data attribute for the probe.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXIn the beginning, ``filters`` directory has only one file, ``nr_filters``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each filter and works in a way similar to that for :ref:`DAMOS filter `. When the filter ``type`` is ``memcg``, ``path`` file acts as ``memcg_path`` for :ref:`DAMOS filter `.h](hIn the beginning, }(hjhhhNhNubj)}(h ``filters``h]hfilters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh directory has only one file, }(hjhhhNhNubj)}(h``nr_filters``h]h nr_filters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. Writing a number (}(hjhhhNhNubj)}(h``N``h]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh<) to the file creates the number of child directories named }(hjhhhNhNubj)}(h``0``h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h``N-1``h]hN-1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhP. Each directory represents each filter and works in a way similar to that for }(hjhhhNhNubh)}(h#:ref:`DAMOS filter `h]j)}(hjh]h DAMOS filter}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_filtersuh1hhhhM!hjubh. When the filter }(hjhhhNhNubj)}(h``type``h]htype}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is }(hjhhhNhNubj)}(h ``memcg``h]hmemcg}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``path``h]hpath}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file acts as }(hjhhhNhNubj)}(h``memcg_path``h]h memcg_path}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh for }(hjhhhNhNubh)}(h#:ref:`DAMOS filter `h]j)}(hjh]h DAMOS filter}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_filtersuh1hhhhM!hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubjt)}(h.. _sysfs_targets:h]h}(h]h ]h"]h$]h&]j sysfs-targetsuh1jshM(hjhhhhubeh}(h]("contexts-n-monitoring-attrs-probesjeh ]h"](%contexts//monitoring_attrs/probes/damon_usage_sysfs_probeseh$]h&]uh1hhjhhhhhMj}jjsj}jjsubh)}(hhh](h)}(hcontexts//targets/h]hcontexts//targets/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM+ubh)}(hIn the beginning, this directory has only one file, ``nr_targets``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each monitoring target.h](h4In the beginning, this directory has only one file, }(hjhhhNhNubj)}(h``nr_targets``h]h nr_targets}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. Writing a number (}(hjhhhNhNubj)}(h``N``h]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh<) to the file creates the number of child directories named }(hjhhhNhNubj)}(h``0``h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h``N-1``h]hN-1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh4. Each directory represents each monitoring target.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM-hjhhubjt)}(h.. _sysfs_target:h]h}(h]h ]h"]h$]h&]j sysfs-targetuh1jshM1hjhhhhubeh}(h](contexts-n-targetsjeh ]h"](contexts//targets/ sysfs_targetseh$]h&]uh1hhjhhhhhM+j}j5jsj}jjsubh)}(hhh](h)}(h targets//h]h targets//}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hhhhhM4ubh)}(hsIn each target directory, two files (``pid_target`` and ``obsolete_target``) and one directory (``regions``) exist.h](h%In each target directory, two files (}(hjKhhhNhNubj)}(h``pid_target``h]h pid_target}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh and }(hjKhhhNhNubj)}(h``obsolete_target``h]hobsolete_target}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh) and one directory (}(hjKhhhNhNubj)}(h ``regions``h]hregions}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh) exist.}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM6hj:hhubh)}(hIf you wrote ``vaddr`` to the ``contexts//operations``, each target should be a process. You can specify the process to DAMON by writing the pid of the process to the ``pid_target`` file.h](h If you wrote }(hjhhhNhNubj)}(h ``vaddr``h]hvaddr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to the }(hjhhhNhNubj)}(h``contexts//operations``h]hcontexts//operations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhr, each target should be a process. You can specify the process to DAMON by writing the pid of the process to the }(hjhhhNhNubj)}(h``pid_target``h]h pid_target}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM9hj:hhubh)}(hXUsers can selectively remove targets in the middle of the targets array by writing non-zero value to ``obsolete_target`` file and committing it (writing ``commit`` to ``state`` file). DAMON will remove the matching targets from its internal targets array. Users are responsible to construct target directories again, so that those correctly represent the changed internal targets array.h](heUsers can selectively remove targets in the middle of the targets array by writing non-zero value to }(hjhhhNhNubj)}(h``obsolete_target``h]hobsolete_target}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh! file and committing it (writing }(hjhhhNhNubj)}(h ``commit``h]hcommit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h ``state``h]hstate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file). DAMON will remove the matching targets from its internal targets array. Users are responsible to construct target directories again, so that those correctly represent the changed internal targets array.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM=hj:hhubjt)}(h.. _sysfs_regions:h]h}(h]h ]h"]h$]h&]j sysfs-regionsuh1jshMDhj:hhhhubeh}(h]( targets-nj.eh ]h"]( targets// sysfs_targeteh$]h&]uh1hhjhhhhhM4j}j(j$sj}j.j$subh)}(hhh](h)}(htargets//regionsh]htargets//regions}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hhhhhMGubh)}(hXvIn case of ``fvaddr`` or ``paddr`` monitoring operations sets, users are required to set the monitoring target address ranges. In case of ``vaddr`` operations set, it is not mandatory, but users can optionally set the initial monitoring region to specific address ranges. Please refer to the :ref:`design ` for more details.h](h In case of }(hj>hhhNhNubj)}(h ``fvaddr``h]hfvaddr}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh or }(hj>hhhNhNubj)}(h ``paddr``h]hpaddr}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubhi monitoring operations sets, users are required to set the monitoring target address ranges. In case of }(hj>hhhNhNubj)}(h ``vaddr``h]hvaddr}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh operations set, it is not mandatory, but users can optionally set the initial monitoring region to specific address ranges. Please refer to the }(hj>hhhNhNubh)}(h>:ref:`design `h]j)}(hj~h]hdesign}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3.damon_design_vaddr_target_regions_constructionuh1hhhhMIhj>ubh for more details.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMIhj-hhubh)}(hFor such cases, users can explicitly set the initial monitoring target regions as they want, by writing proper values to the files under this directory.h]hFor such cases, users can explicitly set the initial monitoring target regions as they want, by writing proper values to the files under this directory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj-hhubh)}(hIn the beginning, this directory has only one file, ``nr_regions``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each initial monitoring target region.h](h4In the beginning, this directory has only one file, }(hjhhhNhNubj)}(h``nr_regions``h]h nr_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. Writing a number (}(hjhhhNhNubj)}(h``N``h]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh<) to the file creates the number of child directories named }(hjhhhNhNubj)}(h``0``h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h``N-1``h]hN-1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhC. Each directory represents each initial monitoring target region.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMRhj-hhubh)}(hX If ``nr_regions`` is zero when committing new DAMON parameters online (writing ``commit`` to ``state`` file of :ref:`kdamond `), the commit logic ignores the target regions. In other words, the current monitoring results for the target are preserved.h](hIf }(hj hhhNhNubj)}(h``nr_regions``h]h nr_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh> is zero when committing new DAMON parameters online (writing }(hj hhhNhNubj)}(h ``commit``h]hcommit}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh to }(hj hhhNhNubj)}(h ``state``h]hstate}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh file of }(hj hhhNhNubh)}(h:ref:`kdamond `h]j)}(hjJh]hkdamond}(hjLhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj- refdomainjVreftyperef refexplicitrefwarnj3 sysfs_kdamonduh1hhhhMVhj ubh}), the commit logic ignores the target regions. In other words, the current monitoring results for the target are preserved.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMVhj-hhubjt)}(h.. _sysfs_region:h]h}(h]h ]h"]h$]h&]j sysfs-regionuh1jshM[hj-hhhhubeh}(h](targets-n-regionsj!eh ]h"](targets//regions sysfs_regionseh$]h&]uh1hhjhhhhhMGj}jjsj}j!jsubh)}(hhh](h)}(h regions//h]h regions//}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM^ubh)}(hIn each region directory, you will find two files (``start`` and ``end``). You can set and get the start and end addresses of the initial monitoring target region by writing to and reading from the files, respectively.h](h3In each region directory, you will find two files (}(hjhhhNhNubj)}(h ``start``h]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``end``h]hend}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh). You can set and get the start and end addresses of the initial monitoring target region by writing to and reading from the files, respectively.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM`hjhhubh)}(hEach region should not overlap with others. ``end`` of directory ``N`` should be equal or smaller than ``start`` of directory ``N+1``.h](h-Each region should not overlap with others. }(hjhhhNhNubj)}(h``end``h]hend}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh of directory }(hjhhhNhNubj)}(h``N``h]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh! should be equal or smaller than }(hjhhhNhNubj)}(h ``start``h]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh of directory }hjsbj)}(h``N+1``h]hN+1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMdhjhhubjt)}(h.. _sysfs_schemes:h]h}(h]h ]h"]h$]h&]j sysfs-schemesuh1jshMghjhhhhubeh}(h]( regions-nj|eh ]h"]( regions// sysfs_regioneh$]h&]uh1hhjhhhhhM^j}j2jrsj}j|jrsubh)}(hhh](h)}(hcontexts//schemes/h]hcontexts//schemes/}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hhhhhMjubh)}(hThe directory for DAMON-based Operation Schemes (:ref:`DAMOS `). Users can get and set the schemes by reading from and writing to files under this directory.h](h1The directory for DAMON-based Operation Schemes (}(hjHhhhNhNubh)}(h!:ref:`DAMOS `h]j)}(hjRh]hDAMOS}(hjThhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]refdocj- refdomainj^reftyperef refexplicitrefwarnj3damon_design_damosuh1hhhhMlhjHubh`). Users can get and set the schemes by reading from and writing to files under this directory.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMlhj7hhubh)}(hIn the beginning, this directory has only one file, ``nr_schemes``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each DAMON-based operation scheme.h](h4In the beginning, this directory has only one file, }(hjzhhhNhNubj)}(h``nr_schemes``h]h nr_schemes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh. Writing a number (}(hjzhhhNhNubj)}(h``N``h]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh<) to the file creates the number of child directories named }(hjzhhhNhNubj)}(h``0``h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh to }(hjzhhhNhNubj)}(h``N-1``h]hN-1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh?. Each directory represents each DAMON-based operation scheme.}(hjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMphj7hhubjt)}(h.. _sysfs_scheme:h]h}(h]h ]h"]h$]h&]j sysfs-schemeuh1jshMthj7hhhhubeh}(h](contexts-n-schemesj+eh ]h"](contexts//schemes/ sysfs_schemeseh$]h&]uh1hhjhhhhhMjj}jj!sj}j+j!subh)}(hhh](h)}(h schemes//h]h schemes//}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMwubh)}(hXIn each scheme directory, nine directories (``access_pattern``, ``quotas``, ``watermarks``, ``core_filters``, ``ops_filters``, ``filters``, ``dests``, ``stats``, and ``tried_regions``) and three files (``action``, ``target_nid`` and ``apply_interval``) exist.h](h,In each scheme directory, nine directories (}(hjhhhNhNubj)}(h``access_pattern``h]haccess_pattern}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h ``quotas``h]hquotas}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``watermarks``h]h watermarks}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``core_filters``h]h core_filters}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``ops_filters``h]h ops_filters}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h ``filters``h]hfilters}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h ``dests``h]hdests}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h ``stats``h]hstats}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, and }(hjhhhNhNubj)}(h``tried_regions``h]h tried_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) and three files (}(hjhhhNhNubj)}(h ``action``h]haction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``target_nid``h]h target_nid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``apply_interval``h]happly_interval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) exist.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMyhjhhubh)}(hXThe ``action`` file is for setting and getting the scheme's :ref:`action `. The keywords that can be written to and read from the file and their meaning are same to those of the list on :ref:`design doc `.h](hThe }(hjhhhNhNubj)}(h ``action``h]haction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh0 file is for setting and getting the scheme’s }(hjhhhNhNubh)}(h):ref:`action `h]j)}(hjh]haction}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3damon_design_damos_actionuh1hhhhM~hjubhq. The keywords that can be written to and read from the file and their meaning are same to those of the list on }(hjhhhNhNubh)}(h-:ref:`design doc `h]j)}(hjh]h design doc}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainj)reftyperef refexplicitrefwarnj3damon_design_damos_actionuh1hhhhM~hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM~hjhhubh)}(hThe ``target_nid`` file is for setting the migration target node, which is only meaningful when the ``action`` is either ``migrate_hot`` or ``migrate_cold``.h](hThe }(hjEhhhNhNubj)}(h``target_nid``h]h target_nid}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubhR file is for setting the migration target node, which is only meaningful when the }(hjEhhhNhNubj)}(h ``action``h]haction}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh is either }(hjEhhhNhNubj)}(h``migrate_hot``h]h migrate_hot}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh or }(hjEhhhNhNubj)}(h``migrate_cold``h]h migrate_cold}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe ``apply_interval_us`` file is for setting and getting the scheme's :ref:`apply_interval ` in microseconds.h](hThe }(hjhhhNhNubj)}(h``apply_interval_us``h]happly_interval_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh0 file is for setting and getting the scheme’s }(hjhhhNhNubh)}(h*:ref:`apply_interval `h]j)}(hjh]happly_interval}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3damon_design_damosuh1hhhhMhjubh in microseconds.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjt)}(h.. _sysfs_access_pattern:h]h}(h]h ]h"]h$]h&]jsysfs-access-patternuh1jshMhjhhhhubeh}(h]( schemes-njeh ]h"]( schemes// sysfs_schemeeh$]h&]uh1hhjhhhhhMwj}jjsj}jjsubh)}(hhh](h)}(hschemes//access_pattern/h]hschemes//access_pattern/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hThe directory for the target access :ref:`pattern ` of the given DAMON-based operation scheme.h](h$The directory for the target access }(hjhhhNhNubh)}(h2:ref:`pattern `h]j)}(hjh]hpattern}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3!damon_design_damos_access_patternuh1hhhhMhjubh+ of the given DAMON-based operation scheme.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXUnder the ``access_pattern`` directory, three directories (``sz``, ``nr_accesses``, and ``age``) each having two files (``min`` and ``max``) exist. You can set and get the access pattern for the given scheme by writing to and reading from the ``min`` and ``max`` files under ``sz``, ``nr_accesses``, and ``age`` directories, respectively. Note that the ``min`` and the ``max`` form a closed interval.h](h Under the }(hj8hhhNhNubj)}(h``access_pattern``h]haccess_pattern}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh directory, three directories (}(hj8hhhNhNubj)}(h``sz``h]hsz}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh, }(hj8hhhNhNubj)}(h``nr_accesses``h]h nr_accesses}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh, and }(hj8hhhNhNubj)}(h``age``h]hage}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh) each having two files (}(hj8hhhNhNubj)}(h``min``h]hmin}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh and }(hj8hhhNhNubj)}(h``max``h]hmax}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubhi) exist. You can set and get the access pattern for the given scheme by writing to and reading from the }(hj8hhhNhNubj)}(h``min``h]hmin}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh and }hj8sbj)}(h``max``h]hmax}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh files under }(hj8hhhNhNubj)}(h``sz``h]hsz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh, }hj8sbj)}(h``nr_accesses``h]h nr_accesses}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh, and }hj8sbj)}(h``age``h]hage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh+ directories, respectively. Note that the }(hj8hhhNhNubj)}(h``min``h]hmin}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh and the }(hj8hhhNhNubj)}(h``max``h]hmax}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh form a closed interval.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjt)}(h.. _sysfs_quotas:h]h}(h]h ]h"]h$]h&]j sysfs-quotasuh1jshMhjhhhhubeh}(h](schemes-n-access-patternjeh ]h"](schemes//access_pattern/sysfs_access_patterneh$]h&]uh1hhjhhhhhMj}jAjsj}jjsubh)}(hhh](h)}(hschemes//quotas/h]hschemes//quotas/}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhMubh)}(hjThe directory for the :ref:`quotas ` of the given DAMON-based operation scheme.h](hThe directory for the }(hjWhhhNhNubh)}(h):ref:`quotas `h]j)}(hjah]hquotas}(hjchhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]refdocj- refdomainjmreftyperef refexplicitrefwarnj3damon_design_damos_quotasuh1hhhhMhjWubh+ of the given DAMON-based operation scheme.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubh)}(hUnder ``quotas`` directory, seven files (``ms``, ``bytes``, ``reset_interval_ms``, ``effective_bytes``, ``goal_tuner``, ``fail_charge_num`` and ``fail_charge_denom``) and two directories (``weights`` and ``goals``) exist.h](hUnder }(hjhhhNhNubj)}(h ``quotas``h]hquotas}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh directory, seven files (}(hjhhhNhNubj)}(h``ms``h]hms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h ``bytes``h]hbytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``reset_interval_ms``h]hreset_interval_ms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``effective_bytes``h]heffective_bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``goal_tuner``h]h goal_tuner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``fail_charge_num``h]hfail_charge_num}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``fail_charge_denom``h]hfail_charge_denom}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) and two directories (}(hjhhhNhNubj)}(h ``weights``h]hweights}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h ``goals``h]hgoals}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) exist.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubh)}(hX!You can set the ``time quota`` in milliseconds, ``size quota`` in bytes, and ``reset interval`` in milliseconds by writing the values to the three files, respectively. Then, DAMON tries to use only up to ``time quota`` milliseconds for applying the ``action`` to memory regions of the ``access_pattern``, and to apply the action to only up to ``bytes`` bytes of memory regions within the ``reset_interval_ms``. Setting both ``ms`` and ``bytes`` zero disables the quota limits unless at least one :ref:`goal ` is set.h](hYou can set the }(hjKhhhNhNubj)}(h``time quota``h]h time quota}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh in milliseconds, }(hjKhhhNhNubj)}(h``size quota``h]h size quota}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh in bytes, and }(hjKhhhNhNubj)}(h``reset interval``h]hreset interval}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubhn in milliseconds by writing the values to the three files, respectively. Then, DAMON tries to use only up to }(hjKhhhNhNubj)}(h``time quota``h]h time quota}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh milliseconds for applying the }(hjKhhhNhNubj)}(h ``action``h]haction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh to memory regions of the }(hjKhhhNhNubj)}(h``access_pattern``h]haccess_pattern}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh(, and to apply the action to only up to }(hjKhhhNhNubj)}(h ``bytes``h]hbytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh$ bytes of memory regions within the }(hjKhhhNhNubj)}(h``reset_interval_ms``h]hreset_interval_ms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh. Setting both }(hjKhhhNhNubj)}(h``ms``h]hms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh and }(hjKhhhNhNubj)}(h ``bytes``h]hbytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubh4 zero disables the quota limits unless at least one }(hjKhhhNhNubh)}(h':ref:`goal `h]j)}(hj h]hgoal}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3sysfs_schemes_quota_goalsuh1hhhhMhjKubh is set.}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubh)}(hXYou can set the goal-based effective quota auto-tuning algorithm to use, by writing the algorithm name to ``goal_tuner`` file. Reading the file returns the currently selected tuner algorithm. Refer to the design documentation of :ref:`automatic quota tuning goals ` for the background design of the feature and the name of the selectable algorithms. Refer to :ref:`goals directory ` for the goals setup.h](hjYou can set the goal-based effective quota auto-tuning algorithm to use, by writing the algorithm name to }(hj1hhhNhNubj)}(h``goal_tuner``h]h goal_tuner}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubho file. Reading the file returns the currently selected tuner algorithm. Refer to the design documentation of }(hj1hhhNhNubh)}(hK:ref:`automatic quota tuning goals `h]j)}(hjMh]hautomatic quota tuning goals}(hjOhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]refdocj- refdomainjYreftyperef refexplicitrefwarnj3%damon_design_damos_quotas_auto_tuninguh1hhhhMhj1ubh^ for the background design of the feature and the name of the selectable algorithms. Refer to }(hj1hhhNhNubh)}(h2:ref:`goals directory `h]j)}(hjqh]hgoals directory}(hjshhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]refdocj- refdomainj}reftyperef refexplicitrefwarnj3sysfs_schemes_quota_goalsuh1hhhhMhj1ubh for the goals setup.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubh)}(hXkYou can set the action-failed memory quota charging ratio by writing the numerator and the denominator for the ratio to ``fail_charge_num`` and ``fail_charge_denom`` files, respectively. Reading those files will return the current set values. Refer to :ref:`design ` for more details of the ratio feature.h](hxYou can set the action-failed memory quota charging ratio by writing the numerator and the denominator for the ratio to }(hjhhhNhNubj)}(h``fail_charge_num``h]hfail_charge_num}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``fail_charge_denom``h]hfail_charge_denom}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhY files, respectively. Reading those files will return the current set values. Refer to }(hjhhhNhNubh)}(hF:ref:`design `h]j)}(hjh]hdesign}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj36damon_design_damos_quotas_failed_memory_charging_ratiouh1hhhhMhjubh' for more details of the ratio feature.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubh)}(hX>The time quota is internally transformed to a size quota. Between the transformed size quota and user-specified size quota, smaller one is applied. Based on the user-specified :ref:`goal `, the effective size quota is further adjusted. Reading ``effective_bytes`` returns the current effective size quota. The file is not updated in real time, so users should ask DAMON sysfs interface to update the content of the file for the stats by writing a special keyword, ``update_schemes_effective_quotas`` to the relevant ``kdamonds//state`` file.h](hThe time quota is internally transformed to a size quota. Between the transformed size quota and user-specified size quota, smaller one is applied. Based on the user-specified }(hjhhhNhNubh)}(h':ref:`goal `h]j)}(hjh]hgoal}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3sysfs_schemes_quota_goalsuh1hhhhMhjubh9, the effective size quota is further adjusted. Reading }(hjhhhNhNubj)}(h``effective_bytes``h]heffective_bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh returns the current effective size quota. The file is not updated in real time, so users should ask DAMON sysfs interface to update the content of the file for the stats by writing a special keyword, }(hjhhhNhNubj)}(h#``update_schemes_effective_quotas``h]hupdate_schemes_effective_quotas}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to the relevant }(hjhhhNhNubj)}(h``kdamonds//state``h]hkdamonds//state}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubh)}(hXGUnder ``weights`` directory, three files (``sz_permil``, ``nr_accesses_permil``, and ``age_permil``) exist. You can set the :ref:`prioritization weights ` for size, access frequency, and age in per-thousand unit by writing the values to the three files under the ``weights`` directory.h](hUnder }(hjWhhhNhNubj)}(h ``weights``h]hweights}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh directory, three files (}(hjWhhhNhNubj)}(h ``sz_permil``h]h sz_permil}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh, }(hjWhhhNhNubj)}(h``nr_accesses_permil``h]hnr_accesses_permil}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh, and }(hjWhhhNhNubj)}(h``age_permil``h]h age_permil}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh) exist. You can set the }(hjWhhhNhNubh)}(hH:ref:`prioritization weights `h]j)}(hjh]hprioritization weights}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3(damon_design_damos_quotas_prioritizationuh1hhhhMhjWubhm for size, access frequency, and age in per-thousand unit by writing the values to the three files under the }(hjWhhhNhNubj)}(h ``weights``h]hweights}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh directory.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubjt)}(h.. _sysfs_schemes_quota_goals:h]h}(h]h ]h"]h$]h&]jsysfs-schemes-quota-goalsuh1jshMhjFhhhhubeh}(h](schemes-n-quotasj:eh ]h"](schemes//quotas/ sysfs_quotaseh$]h&]uh1hhjhhhhhMj}jj0sj}j:j0subh)}(hhh](h)}(hschemes//quotas/goals/h]hschemes//quotas/goals/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hThe directory for the :ref:`automatic quota tuning goals ` of the given DAMON-based operation scheme.h](hThe directory for the }(hj hhhNhNubh)}(hK:ref:`automatic quota tuning goals `h]j)}(hjh]hautomatic quota tuning goals}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainj reftyperef refexplicitrefwarnj3%damon_design_damos_quotas_auto_tuninguh1hhhhMhj ubh+ of the given DAMON-based operation scheme.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXIn the beginning, this directory has only one file, ``nr_goals``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each goal and current achievement. Among the multiple feedback, the best one is used.h](h4In the beginning, this directory has only one file, }(hj<hhhNhNubj)}(h ``nr_goals``h]hnr_goals}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh. Writing a number (}(hj<hhhNhNubj)}(h``N``h]hN}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh<) to the file creates the number of child directories named }(hj<hhhNhNubj)}(h``0``h]h0}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh to }(hj<hhhNhNubj)}(h``N-1``h]hN-1}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubhr. Each directory represents each goal and current achievement. Among the multiple feedback, the best one is used.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXrEach goal directory contains five files, namely ``target_metric``, ``target_value``, ``current_value``, ``nid``, and ``path``. Users can set and get the five parameters for the quota auto-tuning goals that specified on the :ref:`design doc ` by writing to and reading from each of the files. Because the kernel does not update ``current_value``, reading it only makes sense when ``target_metric`` is ``user_input``. Note that users should further write ``commit_schemes_quota_goals`` to the ``state`` file of the :ref:`kdamond directory ` to pass the feedback to DAMON.h](h0Each goal directory contains five files, namely }(hjhhhNhNubj)}(h``target_metric``h]h target_metric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``target_value``h]h target_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``current_value``h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``nid``h]hnid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, and }(hjhhhNhNubj)}(h``path``h]hpath}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhc. Users can set and get the five parameters for the quota auto-tuning goals that specified on the }(hjhhhNhNubh)}(h9:ref:`design doc `h]j)}(hjh]h design doc}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3%damon_design_damos_quotas_auto_tuninguh1hhhhMhjubhW by writing to and reading from each of the files. Because the kernel does not update }(hjhhhNhNubj)}(h``current_value``h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh#, reading it only makes sense when }(hjhhhNhNubj)}(h``target_metric``h]h target_metric}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is }(hjhhhNhNubj)}(h``user_input``h]h user_input}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh(. Note that users should further write }(hjhhhNhNubj)}(h``commit_schemes_quota_goals``h]hcommit_schemes_quota_goals}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to the }(hjhhhNhNubj)}(h ``state``h]hstate}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file of the }(hjhhhNhNubh)}(h(:ref:`kdamond directory `h]j)}(hjth]hkdamond directory}(hjvhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3 sysfs_kdamonduh1hhhhMhjubh to pass the feedback to DAMON.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjt)}(h.. _sysfs_watermarks:h]h}(h]h ]h"]h$]h&]jsysfs-watermarksuh1jshMhjhhhhubeh}(h](schemes-n-quotas-goalsjeh ]h"](schemes//quotas/goals/sysfs_schemes_quota_goalseh$]h&]uh1hhjhhhhhMj}jjsj}jjsubh)}(hhh](h)}(hschemes//watermarks/h]hschemes//watermarks/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hrThe directory for the :ref:`watermarks ` of the given DAMON-based operation scheme.h](hThe directory for the }(hjhhhNhNubh)}(h1:ref:`watermarks `h]j)}(hjh]h watermarks}(hjhhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj- refdomainjreftyperef refexplicitrefwarnj3damon_design_damos_watermarksuh1hhhhMhjubh+ of the given DAMON-based operation scheme.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX,Under the watermarks directory, five files (``metric``, ``interval_us``, ``high``, ``mid``, and ``low``) for setting the metric, the time interval between check of the metric, and the three watermarks exist. You can set and get the five values by writing to and reading from the files, respectively.h](h,Under the watermarks directory, five files (}(hjhhhNhNubj)}(h ``metric``h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``interval_us``h]h interval_us}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``high``h]hhigh}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``mid``h]hmid}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, and }(hjhhhNhNubj)}(h``low``h]hlow}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) for setting the metric, the time interval between check of the metric, and the three watermarks exist. You can set and get the five values by writing to and reading from the files, respectively.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hWKeywords and meanings of those that can be written to the ``metric`` file are as below.h](h:Keywords and meanings of those that can be written to the }(hj] hhhNhNubj)}(h ``metric``h]hmetric}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj] ubh file are as below.}(hj] hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh block_quote)}(hX- none: Ignore the watermarks - free_mem_rate: System's free memory rate (per thousand) h]h)}(hhh](h)}(hnone: Ignore the watermarksh]h)}(hj h]hnone: Ignore the watermarks}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h8free_mem_rate: System's free memory rate (per thousand) h]h)}(h7free_mem_rate: System's free memory rate (per thousand)h]h9free_mem_rate: System’s free memory rate (per thousand)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j} hhhMhjhhubh)}(h;The ``interval_us`` should be written in microseconds unit.h](hThe }(hj hhhNhNubj)}(h``interval_us``h]h interval_us}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh( should be written in microseconds unit.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjt)}(h.. _sysfs_filters:h]h}(h]h ]h"]h$]h&]j sysfs-filtersuh1jshMhjhhhhubeh}(h](schemes-n-watermarksjeh ]h"](schemes//watermarks/sysfs_watermarkseh$]h&]uh1hhjhhhhhMj}j jsj}jjsubh)}(hhh](h)}(h#schemes//{core\_,ops\_,}filters/h]h#schemes//{core_,ops_,}filters/}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hfDirectories for :ref:`filters ` of the given DAMON-based operation scheme.h](hDirectories for }(hj!hhhNhNubh)}(h+:ref:`filters `h]j)}(hj!h]hfilters}(hj!hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]refdocj- refdomainj!reftyperef refexplicitrefwarnj3damon_design_damos_filtersuh1hhhhMhj!ubh+ of the given DAMON-based operation scheme.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hX``core_filters`` and ``ops_filters`` directories are for the filters handled by the DAMON core layer and operations set layer, respectively. ``filters`` directory can be used for installing filters regardless of their handled layers. Filters that requested by ``core_filters`` and ``ops_filters`` will be installed before those of ``filters``. All three directories have same files.h](j)}(h``core_filters``h]h core_filters}(hj>!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:!ubh and }(hj:!hhhNhNubj)}(h``ops_filters``h]h ops_filters}(hjP!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:!ubhj directories are for the filters handled by the DAMON core layer and operations set layer, respectively. }(hj:!hhhNhNubj)}(h ``filters``h]hfilters}(hjb!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:!ubhm directory can be used for installing filters regardless of their handled layers. Filters that requested by }(hj:!hhhNhNubj)}(h``core_filters``h]h core_filters}(hjt!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:!ubh and }hj:!sbj)}(h``ops_filters``h]h ops_filters}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:!ubh# will be installed before those of }(hj:!hhhNhNubj)}(h ``filters``h]hfilters}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:!ubh). All three directories have same files.}(hj:!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hX"Use of ``filters`` directory can make filters evaluation orders confusing to expect. For this reason, ``filters`` directory is deprecated. It is still functioning, but is scheduled for removal in the near future. Users should use ``core_filters`` and ``ops_filters`` directories instead.h](hUse of }(hj!hhhNhNubj)}(h ``filters``h]hfilters}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubhU directory can make filters evaluation orders confusing to expect. For this reason, }(hj!hhhNhNubj)}(h ``filters``h]hfilters}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubhw directory is deprecated. It is still functioning, but is scheduled for removal in the near future. Users should use }(hj!hhhNhNubj)}(h``core_filters``h]h core_filters}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh and }(hj!hhhNhNubj)}(h``ops_filters``h]h ops_filters}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh directories instead.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj hhubh)}(hXIn the beginning, the directory has only one file, ``nr_filters``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each filter. The filters are evaluated in the numeric order.h](h3In the beginning, the directory has only one file, }(hj"hhhNhNubj)}(h``nr_filters``h]h nr_filters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh. Writing a number (}(hj"hhhNhNubj)}(h``N``h]hN}(hj "hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh<) to the file creates the number of child directories named }(hj"hhhNhNubj)}(h``0``h]h0}(hj2"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh to }(hj"hhhNhNubj)}(h``N-1``h]hN-1}(hjD"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubhZ. Each directory represents each filter. The filters are evaluated in the numeric order.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXpEach filter directory contains nine files, namely ``type``, ``matching``, ``allow``, ``memcg_path``, ``addr_start``, ``addr_end``, ``min``, ``max`` and ``damon_target_idx``. To ``type`` file, you can write the type of the filter. Refer to :ref:`the design doc ` for available type names, their meaning and on what layer those are handled.h](h2Each filter directory contains nine files, namely }(hj\"hhhNhNubj)}(h``type``h]htype}(hjd"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh, }(hj\"hhhNhNubj)}(h ``matching``h]hmatching}(hjv"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh, }(hj\"hhhNhNubj)}(h ``allow``h]hallow}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh, }hj\"sbj)}(h``memcg_path``h]h memcg_path}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh, }hj\"sbj)}(h``addr_start``h]h addr_start}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh, }hj\"sbj)}(h ``addr_end``h]haddr_end}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh, }hj\"sbj)}(h``min``h]hmin}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh, }hj\"sbj)}(h``max``h]hmax}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh and }(hj\"hhhNhNubj)}(h``damon_target_idx``h]hdamon_target_idx}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh. To }(hj\"hhhNhNubj)}(h``type``h]htype}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\"ubh7 file, you can write the type of the filter. Refer to }(hj\"hhhNhNubh)}(h2:ref:`the design doc `h]j)}(hj#h]hthe design doc}(hj#hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]refdocj- refdomainj&#reftyperef refexplicitrefwarnj3damon_design_damos_filtersuh1hhhhMhj\"ubhM for available type names, their meaning and on what layer those are handled.}(hj\"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXmFor ``memcg`` type, you can specify the memory cgroup of the interest by writing the path of the memory cgroup from the cgroups mount point to ``memcg_path`` file. For ``addr`` type, you can specify the start and end address of the range (open-ended interval) to ``addr_start`` and ``addr_end`` files, respectively. For ``hugepage_size`` type, you can specify the minimum and maximum size of the range (closed interval) to ``min`` and ``max`` files, respectively. For ``target`` type, you can specify the index of the target between the list of the DAMON context's monitoring targets list to ``damon_target_idx`` file.h](hFor }(hjB#hhhNhNubj)}(h ``memcg``h]hmemcg}(hjJ#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubh type, you can specify the memory cgroup of the interest by writing the path of the memory cgroup from the cgroups mount point to }(hjB#hhhNhNubj)}(h``memcg_path``h]h memcg_path}(hj\#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubh file. For }(hjB#hhhNhNubj)}(h``addr``h]haddr}(hjn#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubhW type, you can specify the start and end address of the range (open-ended interval) to }(hjB#hhhNhNubj)}(h``addr_start``h]h addr_start}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubh and }(hjB#hhhNhNubj)}(h ``addr_end``h]haddr_end}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubh files, respectively. For }(hjB#hhhNhNubj)}(h``hugepage_size``h]h hugepage_size}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubhV type, you can specify the minimum and maximum size of the range (closed interval) to }(hjB#hhhNhNubj)}(h``min``h]hmin}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubh and }hjB#sbj)}(h``max``h]hmax}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubh files, respectively. For }(hjB#hhhNhNubj)}(h ``target``h]htarget}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubht type, you can specify the index of the target between the list of the DAMON context’s monitoring targets list to }(hjB#hhhNhNubj)}(h``damon_target_idx``h]hdamon_target_idx}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB#ubh file.}(hjB#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXYou can write ``Y`` or ``N`` to ``matching`` file to specify whether the filter is for memory that matches the ``type``. You can write ``Y`` or ``N`` to ``allow`` file to specify if applying the action to the memory that satisfies the ``type`` and ``matching`` should be allowed or not.h](hYou can write }(hj$hhhNhNubj)}(h``Y``h]hY}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh or }(hj$hhhNhNubj)}(h``N``h]hN}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh to }(hj$hhhNhNubj)}(h ``matching``h]hmatching}(hj0$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubhC file to specify whether the filter is for memory that matches the }(hj$hhhNhNubj)}(h``type``h]htype}(hjB$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh. You can write }(hj$hhhNhNubj)}(h``Y``h]hY}(hjT$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh or }hj$sbj)}(h``N``h]hN}(hjf$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh to }(hj$hhhNhNubj)}(h ``allow``h]hallow}(hjx$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubhI file to specify if applying the action to the memory that satisfies the }(hj$hhhNhNubj)}(h``type``h]htype}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh and }(hj$hhhNhNubj)}(h ``matching``h]hmatching}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh should be allowed or not.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM#hj hhubh)}(hFor example, below restricts a DAMOS action to be applied to only non-anonymous pages of all memory cgroups except ``/having_care_already``.::h](hsFor example, below restricts a DAMOS action to be applied to only non-anonymous pages of all memory cgroups except }(hj$hhhNhNubj)}(h``/having_care_already``h]h/having_care_already}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh.:}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM(hj hhubj)}(hX(# cd ops_filters/0/ # echo 2 > nr_filters # # disallow anonymous pages echo anon > 0/type echo Y > 0/matching echo N > 0/allow # # further filter out all cgroups except one at '/having_care_already' echo memcg > 1/type echo /having_care_already > 1/memcg_path echo Y > 1/matching echo N > 1/allowh]hX(# cd ops_filters/0/ # echo 2 > nr_filters # # disallow anonymous pages echo anon > 0/type echo Y > 0/matching echo N > 0/allow # # further filter out all cgroups except one at '/having_care_already' echo memcg > 1/type echo /having_care_already > 1/memcg_path echo Y > 1/matching echo N > 1/allow}hj$sbah}(h]h ]h"]h$]h&]hhuh1jhhhM+hj hhubh)}(hRefer to the :ref:`DAMOS filters design documentation ` for more details including how multiple filters of different ``allow`` works, when each of the filters are supported, and differences on stats.h](h Refer to the }(hj$hhhNhNubh)}(hF:ref:`DAMOS filters design documentation `h]j)}(hj$h]h"DAMOS filters design documentation}(hj$hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]refdocj- refdomainj$reftyperef refexplicitrefwarnj3damon_design_damos_filtersuh1hhhhM7hj$ubh> for more details including how multiple filters of different }(hj$hhhNhNubj)}(h ``allow``h]hallow}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubhI works, when each of the filters are supported, and differences on stats.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM7hj hhubjt)}(h.. _damon_sysfs_dests:h]h}(h]h ]h"]h$]h&]jdamon-sysfs-destsuh1jshM<hj hhhhubeh}(h](schemes-n-core-ops-filtersj eh ]h"](!schemes//{core_,ops_,}filters/ sysfs_filterseh$]h&]uh1hhjhhhhhMj}j7%j sj}j j subh)}(hhh](h)}(hschemes//dests/h]hschemes//dests/}(hj?%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<%hhhhhM?ubh)}(hXDirectory for specifying the destinations of given DAMON-based operation scheme's action. This directory is ignored if the action of the given scheme is not supporting multiple destinations. Only ``DAMOS_MIGRATE_{HOT,COLD}`` actions are supporting multiple destinations.h](hDirectory for specifying the destinations of given DAMON-based operation scheme’s action. This directory is ignored if the action of the given scheme is not supporting multiple destinations. Only }(hjM%hhhNhNubj)}(h``DAMOS_MIGRATE_{HOT,COLD}``h]hDAMOS_MIGRATE_{HOT,COLD}}(hjU%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM%ubh. actions are supporting multiple destinations.}(hjM%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMAhj<%hhubh)}(hIn the beginning, the directory has only one file, ``nr_dests``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each action destination.h](h3In the beginning, the directory has only one file, }(hjm%hhhNhNubj)}(h ``nr_dests``h]hnr_dests}(hju%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm%ubh. Writing a number (}(hjm%hhhNhNubj)}(h``N``h]hN}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm%ubh<) to the file creates the number of child directories named }(hjm%hhhNhNubj)}(h``0``h]h0}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm%ubh to }(hjm%hhhNhNubj)}(h``N-1``h]hN-1}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm%ubh5. Each directory represents each action destination.}(hjm%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMFhj<%hhubh)}(hXBEach destination directory contains two files, namely ``id`` and ``weight``. Users can write and read the identifier of the destination to ``id`` file. For ``DAMOS_MIGRATE_{HOT,COLD}`` actions, the migrate destination node's node id should be written to ``id`` file. Users can write and read the weight of the destination among the given destinations to the ``weight`` file. The weight can be an arbitrary integer. When DAMOS apply the action to each entity of the memory region, it will select the destination of the action based on the relative weights of the destinations.h](h6Each destination directory contains two files, namely }(hj%hhhNhNubj)}(h``id``h]hid}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh and }(hj%hhhNhNubj)}(h ``weight``h]hweight}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh@. Users can write and read the identifier of the destination to }(hj%hhhNhNubj)}(h``id``h]hid}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh file. For }(hj%hhhNhNubj)}(h``DAMOS_MIGRATE_{HOT,COLD}``h]hDAMOS_MIGRATE_{HOT,COLD}}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubhH actions, the migrate destination node’s node id should be written to }(hj%hhhNhNubj)}(h``id``h]hid}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubhc file. Users can write and read the weight of the destination among the given destinations to the }(hj%hhhNhNubj)}(h ``weight``h]hweight}(hj%&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh file. The weight can be an arbitrary integer. When DAMOS apply the action to each entity of the memory region, it will select the destination of the action based on the relative weights of the destinations.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMJhj<%hhubjt)}(h.. _sysfs_schemes_stats:h]h}(h]h ]h"]h$]h&]jsysfs-schemes-statsuh1jshMShj<%hhhhubeh}(h](schemes-n-destsj0%eh ]h"](schemes//dests/damon_sysfs_destseh$]h&]uh1hhjhhhhhM?j}jN&j&%sj}j0%j&%subh)}(hhh](h)}(hschemes//stats/h]hschemes//stats/}(hjV&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjS&hhhhhMVubh)}(hDAMON counts statistics for each scheme. This statistics can be used for online analysis or tuning of the schemes. Refer to :ref:`design doc ` for more details about the stats.h](h~DAMON counts statistics for each scheme. This statistics can be used for online analysis or tuning of the schemes. Refer to }(hjd&hhhNhNubh)}(h+:ref:`design doc `h]j)}(hjn&h]h design doc}(hjp&hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjl&ubah}(h]h ]h"]h$]h&]refdocj- refdomainjz&reftyperef refexplicitrefwarnj3damon_design_damos_statuh1hhhhMXhjd&ubh" for more details about the stats.}(hjd&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMXhjS&hhubh)}(hThe statistics can be retrieved by reading the files under ``stats`` directory (``nr_tried``, ``sz_tried``, ``nr_applied``, ``sz_applied``, ``sz_ops_filter_passed``, ``qt_exceeds``, ``nr_snapshots`` and ``max_nr_snapshots``), respectively.h](h;The statistics can be retrieved by reading the files under }(hj&hhhNhNubj)}(h ``stats``h]hstats}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh directory (}(hj&hhhNhNubj)}(h ``nr_tried``h]hnr_tried}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh, }(hj&hhhNhNubj)}(h ``sz_tried``h]hsz_tried}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh, }hj&sbj)}(h``nr_applied``h]h nr_applied}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh, }hj&sbj)}(h``sz_applied``h]h sz_applied}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh, }(hj&hhhNhNubj)}(h``sz_ops_filter_passed``h]hsz_ops_filter_passed}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh, }hj&sbj)}(h``qt_exceeds``h]h qt_exceeds}(hj 'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh, }hj&sbj)}(h``nr_snapshots``h]h nr_snapshots}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh and }(hj&hhhNhNubj)}(h``max_nr_snapshots``h]hmax_nr_snapshots}(hj.'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh), respectively.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM\hjS&hhubh)}(hXNThe files are not updated in real time by default. Users should ask DAMON sysfs interface to periodically update those using ``refresh_ms``, or do a one time update by writing a special keyword, ``update_schemes_stats`` to the relevant ``kdamonds//state`` file. Refer to :ref:`kdamond directory ` for more details.h](h~The files are not updated in real time by default. Users should ask DAMON sysfs interface to periodically update those using }(hjF'hhhNhNubj)}(h``refresh_ms``h]h refresh_ms}(hjN'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF'ubh8, or do a one time update by writing a special keyword, }(hjF'hhhNhNubj)}(h``update_schemes_stats``h]hupdate_schemes_stats}(hj`'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF'ubh to the relevant }(hjF'hhhNhNubj)}(h``kdamonds//state``h]hkdamonds//state}(hjr'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF'ubh file. Refer to }(hjF'hhhNhNubh)}(h(:ref:`kdamond directory `h]j)}(hj'h]hkdamond directory}(hj'hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]refdocj- refdomainj'reftyperef refexplicitrefwarnj3 sysfs_kdamonduh1hhhhMahjF'ubh for more details.}(hjF'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMahjS&hhubjt)}(h .. _sysfs_schemes_tried_regions:h]h}(h]h ]h"]h$]h&]jsysfs-schemes-tried-regionsuh1jshMghjS&hhhhubeh}(h](schemes-n-statsjG&eh ]h"](schemes//stats/sysfs_schemes_statseh$]h&]uh1hhjhhhhhMVj}j'j=&sj}jG&j=&subh)}(hhh](h)}(hschemes//tried_regions/h]hschemes//tried_regions/}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hhhhhMjubh)}(h7This directory initially has one file, ``total_bytes``.h](h'This directory initially has one file, }(hj'hhhNhNubj)}(h``total_bytes``h]h total_bytes}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMlhj'hhubh)}(hXWhen a special keyword, ``update_schemes_tried_regions``, is written to the relevant ``kdamonds//state`` file, DAMON updates the ``total_bytes`` file so that reading it returns the total size of the scheme tried regions, and creates directories named integer starting from ``0`` under this directory. Each directory contains files exposing detailed information about each of the memory region that the corresponding scheme's ``action`` has tried to be applied under this directory, during next :ref:`apply interval ` of the corresponding scheme. The information includes address range, ``nr_accesses``, and ``age`` of the region.h](hWhen a special keyword, }(hj'hhhNhNubj)}(h ``update_schemes_tried_regions``h]hupdate_schemes_tried_regions}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh, is written to the relevant }(hj'hhhNhNubj)}(h``kdamonds//state``h]hkdamonds//state}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh file, DAMON updates the }(hj'hhhNhNubj)}(h``total_bytes``h]h total_bytes}(hj!(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh file so that reading it returns the total size of the scheme tried regions, and creates directories named integer starting from }(hj'hhhNhNubj)}(h``0``h]h0}(hj3(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh under this directory. Each directory contains files exposing detailed information about each of the memory region that the corresponding scheme’s }(hj'hhhNhNubj)}(h ``action``h]haction}(hjE(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh; has tried to be applied under this directory, during next }(hj'hhhNhNubh)}(h*:ref:`apply interval `h]j)}(hjY(h]happly interval}(hj[(hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhjW(ubah}(h]h ]h"]h$]h&]refdocj- refdomainje(reftyperef refexplicitrefwarnj3damon_design_damosuh1hhhhMnhj'ubhG of the corresponding scheme. The information includes address range, }(hj'hhhNhNubj)}(h``nr_accesses``h]h nr_accesses}(hj{(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh, and }(hj'hhhNhNubj)}(h``age``h]hage}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh of the region.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMnhj'hhubh)}(hWriting ``update_schemes_tried_bytes`` to the relevant ``kdamonds//state`` file will only update the ``total_bytes`` file, and will not create the subdirectories.h](hWriting }(hj(hhhNhNubj)}(h``update_schemes_tried_bytes``h]hupdate_schemes_tried_bytes}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh to the relevant }(hj(hhhNhNubj)}(h``kdamonds//state``h]hkdamonds//state}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh file will only update the }(hj(hhhNhNubj)}(h``total_bytes``h]h total_bytes}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh. file, and will not create the subdirectories.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMxhj'hhubh)}(hThe directories will be removed when another special keyword, ``clear_schemes_tried_regions``, is written to the relevant ``kdamonds//state`` file.h](h>The directories will be removed when another special keyword, }(hj(hhhNhNubj)}(h``clear_schemes_tried_regions``h]hclear_schemes_tried_regions}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh, is written to the relevant }(hj(hhhNhNubj)}(h``kdamonds//state``h]hkdamonds//state}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh file.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM|hj'hhubh)}(hX7The expected usage of this directory is investigations of schemes' behaviors, and query-like efficient data access monitoring results retrievals. For the latter use case, in particular, users can set the ``action`` as ``stat`` and set the ``access pattern`` as their interested pattern that they want to query.h](hThe expected usage of this directory is investigations of schemes’ behaviors, and query-like efficient data access monitoring results retrievals. For the latter use case, in particular, users can set the }(hj)hhhNhNubj)}(h ``action``h]haction}(hj#)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh as }(hj)hhhNhNubj)}(h``stat``h]hstat}(hj5)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh and set the }(hj)hhhNhNubj)}(h``access pattern``h]haccess pattern}(hjG)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh5 as their interested pattern that they want to query.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj'hhubjt)}(h.. _sysfs_schemes_tried_region:h]h}(h]h ]h"]h$]h&]jsysfs-schemes-tried-regionuh1jshMhj'hhhhubeh}(h](schemes-n-tried-regionsj'eh ]h"](schemes//tried_regions/sysfs_schemes_tried_regionseh$]h&]uh1hhjhhhhhMjj}jp)j'sj}j'j'subh)}(hhh](h)}(htried_regions//h]htried_regions//}(hjx)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhju)hhhhhMubh)}(hX In each region directory, you will find five files (``start``, ``end``, ``nr_accesses``, ``age`` and ``sz_filter_passed``). Reading the files will show the properties of the region that corresponding DAMON-based operation scheme ``action`` has tried to be applied.h](h4In each region directory, you will find five files (}(hj)hhhNhNubj)}(h ``start``h]hstart}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh, }(hj)hhhNhNubj)}(h``end``h]hend}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh, }(hj)hhhNhNubj)}(h``nr_accesses``h]h nr_accesses}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh, }hj)sbj)}(h``age``h]hage}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh and }(hj)hhhNhNubj)}(h``sz_filter_passed``h]hsz_filter_passed}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubhm). Reading the files will show the properties of the region that corresponding DAMON-based operation scheme }(hj)hhhNhNubj)}(h ``action``h]haction}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh has tried to be applied.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhju)hhubeh}(h](tried-regions-nji)eh ]h"](tried_regions//sysfs_schemes_tried_regioneh$]h&]uh1hhjhhhhhMj}j*j_)sj}ji)j_)subh)}(hhh](h)}(htried_regions//probes/h]htried_regions//probes/}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj *hhhhhMubh)}(hXPIn each region directory, one directory (``probes``) also exists. In the directory, subdirectories named ``0`` to ``N-1`` exists. ``N`` is the number of installed probes. In each number-named directory, a file (``hits``) exist. Reading the file shows the number of data attributes monitoring probe-hit positive samples of the region.h](h)In each region directory, one directory (}(hj*hhhNhNubj)}(h ``probes``h]hprobes}(hj$*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh7) also exists. In the directory, subdirectories named }(hj*hhhNhNubj)}(h``0``h]h0}(hj6*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh to }(hj*hhhNhNubj)}(h``N-1``h]hN-1}(hjH*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh exists. }(hj*hhhNhNubj)}(h``N``h]hN}(hjZ*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubhM is the number of installed probes. In each number-named directory, a file (}(hj*hhhNhNubj)}(h``hits``h]hhits}(hjl*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubhr) exist. Reading the file shows the number of data attributes monitoring probe-hit positive samples of the region.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj *hhubh)}(hhh](h)}(hExampleh]hExample}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hhhhhMubh)}(hX[Below commands applies a scheme saying "If a memory region of size in [4KiB, 8KiB] is showing accesses per aggregate interval in [0, 5] for aggregate interval in [10, 20], page out the region. For the paging out, use only up to 10ms per second, and also don't page out more than 1GiB per second. Under the limitation, page out memory regions having longer age first. Also, check the free memory rate of the system every 5 seconds, start the monitoring and paging out when the free memory rate becomes lower than 50%, but stop it if the free memory rate becomes larger than 60%, or lower than 30%". ::h]hX^Below commands applies a scheme saying “If a memory region of size in [4KiB, 8KiB] is showing accesses per aggregate interval in [0, 5] for aggregate interval in [10, 20], page out the region. For the paging out, use only up to 10ms per second, and also don’t page out more than 1GiB per second. Under the limitation, page out memory regions having longer age first. Also, check the free memory rate of the system every 5 seconds, start the monitoring and paging out when the free memory rate becomes lower than 50%, but stop it if the free memory rate becomes larger than 60%, or lower than 30%”.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*hhubj)}(hX7# cd /kernel/mm/damon/admin # # populate directories # echo 1 > kdamonds/nr_kdamonds; echo 1 > kdamonds/0/contexts/nr_contexts; # echo 1 > kdamonds/0/contexts/0/schemes/nr_schemes # cd kdamonds/0/contexts/0/schemes/0 # # set the basic access pattern and the action # echo 4096 > access_pattern/sz/min # echo 8192 > access_pattern/sz/max # echo 0 > access_pattern/nr_accesses/min # echo 5 > access_pattern/nr_accesses/max # echo 10 > access_pattern/age/min # echo 20 > access_pattern/age/max # echo pageout > action # # set quotas # echo 10 > quotas/ms # echo $((1024*1024*1024)) > quotas/bytes # echo 1000 > quotas/reset_interval_ms # # set watermark # echo free_mem_rate > watermarks/metric # echo 5000000 > watermarks/interval_us # echo 600 > watermarks/high # echo 500 > watermarks/mid # echo 300 > watermarks/lowh]hX7# cd /kernel/mm/damon/admin # # populate directories # echo 1 > kdamonds/nr_kdamonds; echo 1 > kdamonds/0/contexts/nr_contexts; # echo 1 > kdamonds/0/contexts/0/schemes/nr_schemes # cd kdamonds/0/contexts/0/schemes/0 # # set the basic access pattern and the action # echo 4096 > access_pattern/sz/min # echo 8192 > access_pattern/sz/max # echo 0 > access_pattern/nr_accesses/min # echo 5 > access_pattern/nr_accesses/max # echo 10 > access_pattern/age/min # echo 20 > access_pattern/age/max # echo pageout > action # # set quotas # echo 10 > quotas/ms # echo $((1024*1024*1024)) > quotas/bytes # echo 1000 > quotas/reset_interval_ms # # set watermark # echo free_mem_rate > watermarks/metric # echo 5000000 > watermarks/interval_us # echo 600 > watermarks/high # echo 500 > watermarks/mid # echo 300 > watermarks/low}hj*sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhj*hhubh)}(hPlease note that it's highly recommended to use user space tools like `damo `_ rather than manually reading and writing the files as above. Above is only for an example.h](hHPlease note that it’s highly recommended to use user space tools like }(hj*hhhNhNubj`)}(h+`damo `_h]hdamo}(hj*hhhNhNubah}(h]h ]h"]h$]h&]namedamojq!https://github.com/damonitor/damouh1j_hj*ubjt)}(h$ h]h}(h]damoah ]h"]damoah$]h&]refurij*uh1jsjKhj*ubh\ rather than manually reading and writing the files as above. Above is only for an example.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj*hhubjt)}(h.. _tracepoint:h]h}(h]h ]h"]h$]h&]j tracepointuh1jshMhj*hhhhubeh}(h]exampleah ]h"]exampleah$]h&]uh1hhj *hhhhhMubeh}(h]tried-regions-n-probesah ]h"]tried_regions//probes/ah$]h&]uh1hhjhhhhhMubeh}(h](jid1eh ]h"](sysfs interfacesysfs_interfaceeh$]h&]uh1hhhhhhhhK&j}j+jsj}jjsubh)}(hhh](h)}(h"Tracepoints for Monitoring Resultsh]h"Tracepoints for Monitoring Results}(hj +hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hhhhhMubh)}(hX&Users can get the monitoring results via the :ref:`tried_regions `. The interface is useful for getting a snapshot, but it could be inefficient for fully recording all the monitoring results. For the purpose, two trace points, namely ``damon:damon_aggregated`` and ``damon:damos_before_apply``, are provided. ``damon:damon_aggregated`` provides the whole monitoring results, while ``damon:damos_before_apply`` provides the monitoring results for regions that each DAMON-based Operation Scheme (:ref:`DAMOS `) is gonna be applied. Hence, ``damon:damos_before_apply`` is more useful for recording internal behavior of DAMOS, or DAMOS target access :ref:`pattern ` based query-like efficient monitoring results recording.h](h-Users can get the monitoring results via the }(hj+hhhNhNubh)}(h2:ref:`tried_regions `h]j)}(hj"+h]h tried_regions}(hj$+hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj +ubah}(h]h ]h"]h$]h&]refdocj- refdomainj.+reftyperef refexplicitrefwarnj3sysfs_schemes_tried_regionsuh1hhhhMhj+ubh. The interface is useful for getting a snapshot, but it could be inefficient for fully recording all the monitoring results. For the purpose, two trace points, namely }(hj+hhhNhNubj)}(h``damon:damon_aggregated``h]hdamon:damon_aggregated}(hjD+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh and }(hj+hhhNhNubj)}(h``damon:damos_before_apply``h]hdamon:damos_before_apply}(hjV+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh, are provided. }(hj+hhhNhNubj)}(h``damon:damon_aggregated``h]hdamon:damon_aggregated}(hjh+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh. provides the whole monitoring results, while }(hj+hhhNhNubj)}(h``damon:damos_before_apply``h]hdamon:damos_before_apply}(hjz+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubhU provides the monitoring results for regions that each DAMON-based Operation Scheme (}(hj+hhhNhNubh)}(h!:ref:`DAMOS `h]j)}(hj+h]hDAMOS}(hj+hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]refdocj- refdomainj+reftyperef refexplicitrefwarnj3damon_design_damosuh1hhhhMhj+ubh) is gonna be applied. Hence, }(hj+hhhNhNubj)}(h``damon:damos_before_apply``h]hdamon:damos_before_apply}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubhQ is more useful for recording internal behavior of DAMOS, or DAMOS target access }(hj+hhhNhNubh)}(h2:ref:`pattern `h]j)}(hj+h]hpattern}(hj+hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]refdocj- refdomainj+reftyperef refexplicitrefwarnj3!damon_design_damos_access_patternuh1hhhhMhj+ubh9 based query-like efficient monitoring results recording.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+hhubh)}(hWhile the monitoring is turned on, you could record the tracepoint events and show results using tracepoint supporting tools like ``perf``. For example::h](hWhile the monitoring is turned on, you could record the tracepoint events and show results using tracepoint supporting tools like }(hj+hhhNhNubj)}(h``perf``h]hperf}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh. For example:}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+hhubj)}(hX# echo on > kdamonds/0/state # perf record -e damon:damon_aggregated & # sleep 5 # kill 9 $(pidof perf) # echo off > kdamonds/0/state # perf script kdamond.0 46568 [027] 79357.842179: damon:damon_aggregated: target_id=0 nr_regions=11 122509119488-135708762112: 0 864 [...]h]hX# echo on > kdamonds/0/state # perf record -e damon:damon_aggregated & # sleep 5 # kill 9 $(pidof perf) # echo off > kdamonds/0/state # perf script kdamond.0 46568 [027] 79357.842179: damon:damon_aggregated: target_id=0 nr_regions=11 122509119488-135708762112: 0 864 [...]}hj ,sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhj+hhubh)}(hXEach line of the perf script output represents each monitoring region. The first five fields are as usual other tracepoint outputs. The sixth field (``target_id=X``) shows the id of the monitoring target of the region. The seventh field (``nr_regions=X``) shows the total number of monitoring regions for the target. The eighth field (``X-Y:``) shows the start (``X``) and end (``Y``) addresses of the region in bytes. The ninth field (``X``) shows the ``nr_accesses`` of the region (refer to :ref:`design ` for more details of the counter). Finally the tenth field (``X``) shows the ``age`` of the region (refer to :ref:`design ` for more details of the counter).h](hEach line of the perf script output represents each monitoring region. The first five fields are as usual other tracepoint outputs. The sixth field (}(hj,hhhNhNubj)}(h``target_id=X``h]h target_id=X}(hj",hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubhK) shows the id of the monitoring target of the region. The seventh field (}(hj,hhhNhNubj)}(h``nr_regions=X``h]h nr_regions=X}(hj4,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubhR) shows the total number of monitoring regions for the target. The eighth field (}(hj,hhhNhNubj)}(h``X-Y:``h]hX-Y:}(hjF,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh) shows the start (}(hj,hhhNhNubj)}(h``X``h]hX}(hjX,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh ) and end (}(hj,hhhNhNubj)}(h``Y``h]hY}(hjj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh6) addresses of the region in bytes. The ninth field (}(hj,hhhNhNubj)}(h``X``h]hX}(hj|,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh ) shows the }(hj,hhhNhNubj)}(h``nr_accesses``h]h nr_accesses}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh of the region (refer to }(hj,hhhNhNubh)}(h2:ref:`design `h]j)}(hj,h]hdesign}(hj,hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]refdocj- refdomainj,reftyperef refexplicitrefwarnj3"damon_design_region_based_samplinguh1hhhhMhj,ubh= for more details of the counter). Finally the tenth field (}(hj,hhhNhNubj)}(h``X``h]hX}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh ) shows the }(hj,hhhNhNubj)}(h``age``h]hage}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh of the region (refer to }(hj,hhhNhNubh)}(h):ref:`design `h]j)}(hj,h]hdesign}(hj,hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]refdocj- refdomainj,reftyperef refexplicitrefwarnj3damon_design_age_trackinguh1hhhhMhj,ubh" for more details of the counter).}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+hhubh)}(hhIf the event was ``damon:damos_beofre_apply``, the ``perf script`` output would be somewhat like below::h](hIf the event was }(hj-hhhNhNubj)}(h``damon:damos_beofre_apply``h]hdamon:damos_beofre_apply}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh, the }(hj-hhhNhNubj)}(h``perf script``h]h perf script}(hj,-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh% output would be somewhat like below:}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+hhubj)}(hkdamond.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 [...]h]hkdamond.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 [...]}hjD-sbah}(h]h ]h"]h$]h&]hhuh1jhhhMhj+hhubh)}(hXEach line of the output represents each monitoring region that each DAMON-based Operation Scheme was about to be applied at the traced time. The first five fields are as usual. It shows the index of the DAMON context (``ctx_idx=X``) of the scheme in the list of the contexts of the context's kdamond, the index of the scheme (``scheme_idx=X``) in the list of the schemes of the context, in addition to the output of ``damon_aggregated`` tracepoint.h](hEach line of the output represents each monitoring region that each DAMON-based Operation Scheme was about to be applied at the traced time. The first five fields are as usual. It shows the index of the DAMON context (}(hjR-hhhNhNubj)}(h ``ctx_idx=X``h]h ctx_idx=X}(hjZ-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjR-ubha) of the scheme in the list of the contexts of the context’s kdamond, the index of the scheme (}(hjR-hhhNhNubj)}(h``scheme_idx=X``h]h scheme_idx=X}(hjl-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjR-ubhJ) in the list of the schemes of the context, in addition to the output of }(hjR-hhhNhNubj)}(h``damon_aggregated``h]hdamon_aggregated}(hj~-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjR-ubh tracepoint.}(hjR-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+hhubeh}(h]("tracepoints-for-monitoring-resultsj*eh ]h"]("tracepoints for monitoring results tracepointeh$]h&]uh1hhhhhhhhMj}j-j*sj}j*j*subeh}(h]detailed-usagesah ]h"]detailed usagesah$]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}refids}(j]jaj?]j5aj]jaj\]jRaj ]j ajm ]jc aj:]j0aj]jyaj]jaj]jaj.]j$aj!]jaj|]jraj+]j!aj]jaj]jaj:]j0aj]jaj]jaj ]j aj0%]j&%ajG&]j=&aj']j'aji)]j_)aj*]j*aunameids}(j-j-j~j{jjj j j+jj+j*jEjBjj?jjjcjjbj_j j\j j jt j js jp jAjm j@j=jj:jjjjjjjjjjj5jj4j1j(j.j'j$jj!jjj2j|j1j.jj+jjjjjjjAjj@j=jj:jjjjjjj jj j j7%j j6%j3%jN&j0%jM&jJ&j'jG&j'j'jp)j'jo)jl)j*ji)j*j*j*j*j*j*j*j*j-j*j-j-u nametypes}(j-j~jj j+j+jEjjjcjbj j jt js jAj@jjjjjjj5j4j(j'jjj2j1jjjjjAj@jjjjj j j7%j6%jN&jM&j'j'jp)jo)j*j*j*j*j*j-j-uh}(j-hj{jujjj jjjj*jjBjj?jHjjHjjj_jj\jhj jhj j jp j jm jy j=jy j:jFjjFjjjjjjjjjjj1jj.j:j$j:j!j-jj-j|jj.jj+j7jj7jjjjjjj=jj:jFjjFjjjjjjj jj j j3%j j0%j<%jJ&j<%jG&jS&j'jS&j'j'jl)j'ji)ju)j*ju)j*j *j*j*j*j*j*j+j-j+u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j-KsRparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h5Hyperlink target "sysfs-interface" is not referenced.}hjN.sbah}(h]h ]h"]h$]h&]uh1hhjK.ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehnjlineK#uh1jI.ubjJ.)}(hhh]h)}(hhh]h0Hyperlink target "sysfs-root" is not referenced.}hji.sbah}(h]h ]h"]h$]h&]uh1hhjf.ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineKruh1jI.ubjJ.)}(hhh]h)}(hhh]h4Hyperlink target "sysfs-kdamonds" is not referenced.}hj.sbah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineK|uh1jI.ubjJ.)}(hhh]h)}(hhh]h3Hyperlink target "sysfs-kdamond" is not referenced.}hj.sbah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineKuh1jI.ubjJ.)}(hhh]h)}(hhh]h4Hyperlink target "sysfs-contexts" is not referenced.}hj.sbah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineKuh1jI.ubjJ.)}(hhh]h)}(hhh]h3Hyperlink target "sysfs-context" is not referenced.}hj.sbah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineKuh1jI.ubjJ.)}(hhh]h)}(hhh]hHyperlink target "damon-usage-sysfs-probes" is not referenced.}hj/sbah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMuh1jI.ubjJ.)}(hhh]h)}(hhh]h3Hyperlink target "sysfs-targets" is not referenced.}hj9/sbah}(h]h ]h"]h$]h&]uh1hhj6/ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineM(uh1jI.ubjJ.)}(hhh]h)}(hhh]h2Hyperlink target "sysfs-target" is not referenced.}hjS/sbah}(h]h ]h"]h$]h&]uh1hhjP/ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineM1uh1jI.ubjJ.)}(hhh]h)}(hhh]h3Hyperlink target "sysfs-regions" is not referenced.}hjm/sbah}(h]h ]h"]h$]h&]uh1hhjj/ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMDuh1jI.ubjJ.)}(hhh]h)}(hhh]h2Hyperlink target "sysfs-region" is not referenced.}hj/sbah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineM[uh1jI.ubjJ.)}(hhh]h)}(hhh]h3Hyperlink target "sysfs-schemes" is not referenced.}hj/sbah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMguh1jI.ubjJ.)}(hhh]h)}(hhh]h2Hyperlink target "sysfs-scheme" is not referenced.}hj/sbah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMtuh1jI.ubjJ.)}(hhh]h)}(hhh]h:Hyperlink target "sysfs-access-pattern" is not referenced.}hj/sbah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMuh1jI.ubjJ.)}(hhh]h)}(hhh]h2Hyperlink target "sysfs-quotas" is not referenced.}hj/sbah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMuh1jI.ubjJ.)}(hhh]h)}(hhh]h?Hyperlink target "sysfs-schemes-quota-goals" is not referenced.}hj 0sbah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMuh1jI.ubjJ.)}(hhh]h)}(hhh]h6Hyperlink target "sysfs-watermarks" is not referenced.}hj#0sbah}(h]h ]h"]h$]h&]uh1hhj 0ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMuh1jI.ubjJ.)}(hhh]h)}(hhh]h3Hyperlink target "sysfs-filters" is not referenced.}hj=0sbah}(h]h ]h"]h$]h&]uh1hhj:0ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMuh1jI.ubjJ.)}(hhh]h)}(hhh]h7Hyperlink target "damon-sysfs-dests" is not referenced.}hjW0sbah}(h]h ]h"]h$]h&]uh1hhjT0ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineM<uh1jI.ubjJ.)}(hhh]h)}(hhh]h9Hyperlink target "sysfs-schemes-stats" is not referenced.}hjq0sbah}(h]h ]h"]h$]h&]uh1hhjn0ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMSuh1jI.ubjJ.)}(hhh]h)}(hhh]hAHyperlink target "sysfs-schemes-tried-regions" is not referenced.}hj0sbah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMguh1jI.ubjJ.)}(hhh]h)}(hhh]h@Hyperlink target "sysfs-schemes-tried-region" is not referenced.}hj0sbah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMuh1jI.ubjJ.)}(hhh]h)}(hhh]h0Hyperlink target "tracepoint" is not referenced.}hj0sbah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]levelKtypejc.sourcehnjlineMuh1jI.ube transformerN include_log] decorationNhhub.