sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget /translations/zh_CN/mm/damon/apimodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/zh_TW/mm/damon/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/it_IT/mm/damon/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ja_JP/mm/damon/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ko_KR/mm/damon/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/sp_SP/mm/damon/apimodnameN 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:spacepreserveuh1hhhhhh:/var/lib/git/docbuild/linux/Documentation/mm/damon/api.rsthKubhsection)}(hhh](htitle)}(h API Referenceh]h API Reference}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hKernel space programs can use every feature of DAMON using below APIs. All you need to do is including ``damon.h``, which is located in ``include/linux/`` of the source tree.h](hhKernel space programs can use every feature of DAMON using below APIs. All you need to do is including }(hhhhhNhNubhliteral)}(h ``damon.h``h]hdamon.h}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh, which is located in }(hhhhhNhNubh)}(h``include/linux/``h]hinclude/linux/}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh of the source tree.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Structuresh]h Structures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singledamon_addr_range (C struct)c.damon_addr_rangehNtauh1jhhhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhNubhdesc)}(hhh](hdesc_signature)}(hdamon_addr_rangeh]hdesc_signature_line)}(hstruct damon_addr_rangeh](hdesc_sig_keyword)}(hstructh]hstruct}(hj5hhhNhNubah}(h]h ]kah"]h$]h&]uh1j3hj/hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubhdesc_sig_space)}(h h]h }(hjGhhhNhNubah}(h]h ]wah"]h$]h&]uh1jEhj/hhhjDhKubh desc_name)}(hdamon_addr_rangeh]h desc_sig_name)}(hj+h]hdamon_addr_range}(hj^hhhNhNubah}(h]h ]nah"]h$]h&]uh1j\hjXubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jVhj/hhhjDhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1j-sphinx_line_type declaratorhj)hhhjDhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j'hjDhKhj$hhubh desc_content)}(hhh]h)}(h5Represents an address region of [**start**, **end**).h](h!Represents an address region of [}(hjhhhNhNubhstrong)}(h **start**h]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h**end**h]hend}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhj$hhhjDhKubeh}(h]h ](cstructeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1j"hhhhhj!hNubh container)}(h**Definition**:: struct damon_addr_range { unsigned long start; unsigned long end; }; **Members** ``start`` Start address of the region (inclusive). ``end`` End address of the region (exclusive).h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK!hjubh literal_block)}(hLstruct damon_addr_range { unsigned long start; unsigned long end; };h]hLstruct damon_addr_range { unsigned long start; unsigned long end; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK#hjubh)}(h **Members**h]j)}(hj h]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK(hjubhdefinition_list)}(hhh](hdefinition_list_item)}(h3``start`` Start address of the region (inclusive). h](hterm)}(h ``start``h]h)}(hj1h]hstart}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj)ubh definition)}(hhh]h)}(h(Start address of the region (inclusive).h]h(Start address of the region (inclusive).}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhKhjIubah}(h]h ]h"]h$]h&]uh1jGhj)ubeh}(h]h ]h"]h$]h&]uh1j'hjFhKhj$ubj()}(h.``end`` End address of the region (exclusive).h](j.)}(h``end``h]h)}(hjlh]hend}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjfubjH)}(hhh]h)}(h&End address of the region (exclusive).h]h&End address of the region (exclusive).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK hjubah}(h]h ]h"]h$]h&]uh1jGhjfubeh}(h]h ]h"]h$]h&]uh1j'hjhKhj$ubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_size_range (C struct)c.damon_size_rangehNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamon_size_rangeh]j.)}(hstruct damon_size_rangeh](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK&ubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhK&ubjW)}(hdamon_size_rangeh]j])}(hjh]hdamon_size_range}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhK&ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhK&ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhK&hjhhubj)}(hhh]h)}(haggr_interval ` and be increased for every :c:type:`damon_attrs->sample_interval ` if an access to the region during the last sampling interval is found. The update of this field should not be done with direct access but with the helper function, damon_update_region_access_rate().h](j)}(h**nr_accesses**h]h nr_accesses}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubh is reset to zero for every }(hj`hhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hjxh]hdamon_attrs->aggr_interval}(hjzhhhNhNubah}(h]h ](xrefjc-typeeh"]h$]h&]uh1hhjvubah}(h]h ]h"]h$]h&]refdoc mm/damon/api refdomainjreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sb reftarget damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK9hj`ubh and be increased for every }(hj`hhhNhNubh)}(h4:c:type:`damon_attrs->sample_interval `h]h)}(hjh]hdamon_attrs->sample_interval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjhK9hj`ubh if an access to the region during the last sampling interval is found. The update of this field should not be done with direct access but with the helper function, damon_update_region_access_rate().}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK9hhhhubh)}(hX**nr_accesses_bp** is another representation of **nr_accesses** in basis point (1 in 10,000) that updated for every :c:type:`damon_attrs->sample_interval ` in a manner similar to moving sum. By the algorithm, this value becomes **nr_accesses** * 10000 for every :c:type:`struct damon_attrs `->aggr_interval. This can be used when the aggregation interval is too huge and therefore cannot wait for it before getting the access monitoring results.h](j)}(h**nr_accesses_bp**h]hnr_accesses_bp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is another representation of }(hjhhhNhNubj)}(h**nr_accesses**h]h nr_accesses}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh5 in basis point (1 in 10,000) that updated for every }(hjhhhNhNubh)}(h4:c:type:`damon_attrs->sample_interval `h]h)}(hjh]hdamon_attrs->sample_interval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK?hjubhJ in a manner similar to moving sum. By the algorithm, this value becomes }(hjhhhNhNubj)}(h**nr_accesses**h]h nr_accesses}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh * 10000 for every }(hjhhhNhNubh)}(h*:c:type:`struct damon_attrs `h]h)}(hj.h]hstruct damon_attrs}(hj0hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjhK?hjubh->aggr_interval. This can be used when the aggregation interval is too huge and therefore cannot wait for it before getting the access monitoring results.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK?hhhhubh)}(hX3**age** is initially zero, increased for each aggregation interval, and reset to zero again if the access frequency is significantly changed. If two regions are merged into a new region, both **nr_accesses** and **age** of the new region are set as region size-weighted average of those of the two regions.h](j)}(h**age**h]hage}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubh is initially zero, increased for each aggregation interval, and reset to zero again if the access frequency is significantly changed. If two regions are merged into a new region, both }(hjUhhhNhNubj)}(h**nr_accesses**h]h nr_accesses}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubh and }(hjUhhhNhNubj)}(h**age**h]hage}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubhW of the new region are set as region size-weighted average of those of the two regions.}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKFhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_target (C struct)c.damon_targethNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damon_targeth]j.)}(hstruct damon_targeth](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKNubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhKNubjW)}(h damon_targeth]j])}(hjh]h damon_target}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhKNubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhKNubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhKNhjhhubj)}(hhh]h)}(hRepresents a monitoring target.h]hRepresents a monitoring target.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKYhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKNubeh}(h]h ](jstructeh"]h$]h&]jjjj jj jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_target { struct pid *pid; unsigned int nr_regions; struct list_head regions_list; struct list_head list; bool obsolete; }; **Members** ``pid`` The PID of the virtual address space to monitor. ``nr_regions`` Number of monitoring target regions of this target. ``regions_list`` Head of the monitoring target regions of this target. ``list`` List head for siblings. ``obsolete`` Whether the commit destination target is obsolete.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK]hj ubj)}(hstruct damon_target { struct pid *pid; unsigned int nr_regions; struct list_head regions_list; struct list_head list; bool obsolete; };h]hstruct damon_target { struct pid *pid; unsigned int nr_regions; struct list_head regions_list; struct list_head list; bool obsolete; };}hj.sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK_hj ubh)}(h **Members**h]j)}(hj?h]hMembers}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKghj ubj#)}(hhh](j()}(h9``pid`` The PID of the virtual address space to monitor. h](j.)}(h``pid``h]h)}(hj^h]hpid}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK[hjXubjH)}(hhh]h)}(h0The PID of the virtual address space to monitor.h]h0The PID of the virtual address space to monitor.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshK[hjtubah}(h]h ]h"]h$]h&]uh1jGhjXubeh}(h]h ]h"]h$]h&]uh1j'hjshK[hjUubj()}(hC``nr_regions`` Number of monitoring target regions of this target. h](j.)}(h``nr_regions``h]h)}(hjh]h nr_regions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK\hjubjH)}(hhh]h)}(h3Number of monitoring target regions of this target.h]h3Number of monitoring target regions of this target.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK\hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhK\hjUubj()}(hG``regions_list`` Head of the monitoring target regions of this target. h](j.)}(h``regions_list``h]h)}(hjh]h regions_list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK]hjubjH)}(hhh]h)}(h5Head of the monitoring target regions of this target.h]h5Head of the monitoring target regions of this target.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK]hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhK]hjUubj()}(h!``list`` List head for siblings. h](j.)}(h``list``h]h)}(hj h]hlist}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK^hj ubjH)}(hhh]h)}(hList head for siblings.h]hList head for siblings.}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK^hj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hK^hjUubj()}(h?``obsolete`` Whether the commit destination target is obsolete.h](j.)}(h ``obsolete``h]h)}(hjB h]hobsolete}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK^hj< ubjH)}(hhh]h)}(h2Whether the commit destination target is obsolete.h]h2Whether the commit destination target is obsolete.}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK_hjX ubah}(h]h ]h"]h$]h&]uh1jGhj< ubeh}(h]h ]h"]h$]h&]uh1j'hjW hK^hjUubeh}(h]h ]h"]h$]h&]uh1j"hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKbhhhhubh)}(hX0Each monitoring context could have multiple targets. For example, a context for virtual memory address spaces could have multiple target processes. The **pid** should be set for appropriate :c:type:`struct damon_operations ` including the virtual address spaces monitoring operations.h](hEach monitoring context could have multiple targets. For example, a context for virtual memory address spaces could have multiple target processes. The }(hj hhhNhNubj)}(h**pid**h]hpid}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh should be set for appropriate }(hj hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj h]hstruct damon_operations}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK_hj ubh< including the virtual address spaces monitoring operations.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hK_hhhhubh)}(h**obsolete** is used only for damon_commit_targets() source targets, to specify the matching destination targets are obsolete. Read damon_commit_targets() to see how it is handled.h](j)}(h **obsolete**h]hobsolete}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is used only for damon_commit_targets() source targets, to specify the matching destination targets are obsolete. Read damon_commit_targets() to see how it is handled.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKdhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_action (C enum)c.damos_actionhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damos_actionh]j.)}(henum damos_actionh](j4)}(henumh]henum}(hj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKkubjF)}(h h]h }(hj$ hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj hhhj# hKkubjW)}(h damos_actionh]j])}(hj h]h damos_action}(hj6 hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj2 ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj hhhj# hKkubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj hhhj# hKkubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j'hj# hKkhj hhubj)}(hhh]h)}(hHRepresents an action of a Data Access Monitoring-based Operation Scheme.h]hHRepresents an action of a Data Access Monitoring-based Operation Scheme.}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKrhjU hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj# hKkubeh}(h]h ](jenumeh"]h$]h&]jjjjp jjp jjjuh1j"hhhhhj!hNubj)}(hX**Constants** ``DAMOS_WILLNEED`` Call ``madvise()`` for the region with MADV_WILLNEED. ``DAMOS_COLD`` Call ``madvise()`` for the region with MADV_COLD. ``DAMOS_PAGEOUT`` Reclaim the region. ``DAMOS_HUGEPAGE`` Call ``madvise()`` for the region with MADV_HUGEPAGE. ``DAMOS_NOHUGEPAGE`` Call ``madvise()`` for the region with MADV_NOHUGEPAGE. ``DAMOS_LRU_PRIO`` Prioritize the region on its LRU lists. ``DAMOS_LRU_DEPRIO`` Deprioritize the region on its LRU lists. ``DAMOS_MIGRATE_HOT`` Migrate the regions prioritizing warmer regions. ``DAMOS_MIGRATE_COLD`` Migrate the regions prioritizing colder regions. ``DAMOS_STAT`` Do nothing but count the stat. ``NR_DAMOS_ACTIONS`` Total number of DAMOS actionsh](h)}(h **Constants**h]j)}(hjz h]h Constants}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKvhjt ubj#)}(hhh](j()}(hI``DAMOS_WILLNEED`` Call ``madvise()`` for the region with MADV_WILLNEED. h](j.)}(h``DAMOS_WILLNEED``h]h)}(hj h]hDAMOS_WILLNEED}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKyhj ubjH)}(hhh]h)}(h5Call ``madvise()`` for the region with MADV_WILLNEED.h](hCall }(hj hhhNhNubh)}(h ``madvise()``h]h madvise()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh# for the region with MADV_WILLNEED.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hKyhj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKyhj ubj()}(hA``DAMOS_COLD`` Call ``madvise()`` for the region with MADV_COLD. h](j.)}(h``DAMOS_COLD``h]h)}(hj h]h DAMOS_COLD}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK|hj ubjH)}(hhh]h)}(h1Call ``madvise()`` for the region with MADV_COLD.h](hCall }(hj hhhNhNubh)}(h ``madvise()``h]h madvise()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh for the region with MADV_COLD.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hK|hj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hK|hj ubj()}(h&``DAMOS_PAGEOUT`` Reclaim the region. h](j.)}(h``DAMOS_PAGEOUT``h]h)}(hj/ h]h DAMOS_PAGEOUT}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj- ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj) ubjH)}(hhh]h)}(hReclaim the region.h]hReclaim the region.}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD hKhjE ubah}(h]h ]h"]h$]h&]uh1jGhj) ubeh}(h]h ]h"]h$]h&]uh1j'hjD hKhj ubj()}(hI``DAMOS_HUGEPAGE`` Call ``madvise()`` for the region with MADV_HUGEPAGE. h](j.)}(h``DAMOS_HUGEPAGE``h]h)}(hjh h]hDAMOS_HUGEPAGE}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjb ubjH)}(hhh]h)}(h5Call ``madvise()`` for the region with MADV_HUGEPAGE.h](hCall }(hj hhhNhNubh)}(h ``madvise()``h]h madvise()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh# for the region with MADV_HUGEPAGE.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj} hKhj~ ubah}(h]h ]h"]h$]h&]uh1jGhjb ubeh}(h]h ]h"]h$]h&]uh1j'hj} hKhj ubj()}(hM``DAMOS_NOHUGEPAGE`` Call ``madvise()`` for the region with MADV_NOHUGEPAGE. h](j.)}(h``DAMOS_NOHUGEPAGE``h]h)}(hj h]hDAMOS_NOHUGEPAGE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubjH)}(hhh]h)}(h7Call ``madvise()`` for the region with MADV_NOHUGEPAGE.h](hCall }(hj hhhNhNubh)}(h ``madvise()``h]h madvise()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh% for the region with MADV_NOHUGEPAGE.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKhj ubj()}(h;``DAMOS_LRU_PRIO`` Prioritize the region on its LRU lists. h](j.)}(h``DAMOS_LRU_PRIO``h]h)}(hj h]hDAMOS_LRU_PRIO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubjH)}(hhh]h)}(h'Prioritize the region on its LRU lists.h]h'Prioritize the region on its LRU lists.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKhj ubj()}(h?``DAMOS_LRU_DEPRIO`` Deprioritize the region on its LRU lists. h](j.)}(h``DAMOS_LRU_DEPRIO``h]h)}(hj7 h]hDAMOS_LRU_DEPRIO}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5 ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj1 ubjH)}(hhh]h)}(h)Deprioritize the region on its LRU lists.h]h)Deprioritize the region on its LRU lists.}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL hKhjM ubah}(h]h ]h"]h$]h&]uh1jGhj1 ubeh}(h]h ]h"]h$]h&]uh1j'hjL hKhj ubj()}(hG``DAMOS_MIGRATE_HOT`` Migrate the regions prioritizing warmer regions. h](j.)}(h``DAMOS_MIGRATE_HOT``h]h)}(hjp h]hDAMOS_MIGRATE_HOT}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjn ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjj ubjH)}(hhh]h)}(h0Migrate the regions prioritizing warmer regions.h]h0Migrate the regions prioritizing warmer regions.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jGhjj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKhj ubj()}(hH``DAMOS_MIGRATE_COLD`` Migrate the regions prioritizing colder regions. h](j.)}(h``DAMOS_MIGRATE_COLD``h]h)}(hj h]hDAMOS_MIGRATE_COLD}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubjH)}(hhh]h)}(h0Migrate the regions prioritizing colder regions.h]h0Migrate the regions prioritizing colder regions.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKhj ubj()}(h.``DAMOS_STAT`` Do nothing but count the stat. h](j.)}(h``DAMOS_STAT``h]h)}(hj h]h DAMOS_STAT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubjH)}(hhh]h)}(hDo nothing but count the stat.h]hDo nothing but count the stat.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKhj ubj()}(h2``NR_DAMOS_ACTIONS`` Total number of DAMOS actionsh](j.)}(h``NR_DAMOS_ACTIONS``h]h)}(hj h]hNR_DAMOS_ACTIONS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubjH)}(hhh]h)}(hTotal number of DAMOS actionsh]hTotal number of DAMOS actions}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj1 ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj0 hKhj ubeh}(h]h ]h"]h$]h&]uh1j"hjt ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj^ h]h Description}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hThe support of each action is up to running :c:type:`struct damon_operations `. Refer to 'Operation Action' section of Documentation/mm/damon/design.rst for status of the supports.h](h,The support of each action is up to running }(hjt hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj~ h]hstruct damon_operations}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj| ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjt ubhj. Refer to ‘Operation Action’ section of Documentation/mm/damon/design.rst for status of the supports.}(hjt hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hKhhhhubh)}(h2Note that DAMOS_PAGEOUT doesn't trigger demotions.h]h4Note that DAMOS_PAGEOUT doesn’t trigger demotions.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j damos_quota_goal_metric (C enum)c.damos_quota_goal_metrichNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_quota_goal_metrich]j.)}(henum damos_quota_goal_metrich](j4)}(hj h]henum}(hj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj hhhj hKubjW)}(hdamos_quota_goal_metrich]j])}(hj h]hdamos_quota_goal_metric}(hj hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj hhhj hKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj hhhj hKubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j'hj hKhj hhubj)}(hhh]h)}(h,Represents the metric to be used as the goalh]h,Represents the metric to be used as the goal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKubeh}(h]h ](jenumeh"]h$]h&]jjjj(jj(jjjuh1j"hhhhhj!hNubj)}(hXg**Constants** ``DAMOS_QUOTA_USER_INPUT`` User-input value. ``DAMOS_QUOTA_SOME_MEM_PSI_US`` System level some memory PSI in us. ``DAMOS_QUOTA_NODE_MEM_USED_BP`` MemUsed ratio of a node. ``DAMOS_QUOTA_NODE_MEM_FREE_BP`` MemFree ratio of a node. ``DAMOS_QUOTA_NODE_MEMCG_USED_BP`` MemUsed ratio of a node for a cgroup. ``DAMOS_QUOTA_NODE_MEMCG_FREE_BP`` MemFree ratio of a node for a cgroup. ``DAMOS_QUOTA_ACTIVE_MEM_BP`` Active to total LRU memory ratio. ``DAMOS_QUOTA_INACTIVE_MEM_BP`` Inactive to total LRU memory ratio. ``NR_DAMOS_QUOTA_GOAL_METRICS`` Number of DAMOS quota goal metrics.h](h)}(h **Constants**h]j)}(hj2h]h Constants}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj,ubj#)}(hhh](j()}(h-``DAMOS_QUOTA_USER_INPUT`` User-input value. h](j.)}(h``DAMOS_QUOTA_USER_INPUT``h]h)}(hjQh]hDAMOS_QUOTA_USER_INPUT}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjKubjH)}(hhh]h)}(hUser-input value.h]hUser-input value.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhKhjgubah}(h]h ]h"]h$]h&]uh1jGhjKubeh}(h]h ]h"]h$]h&]uh1j'hjfhKhjHubj()}(hD``DAMOS_QUOTA_SOME_MEM_PSI_US`` System level some memory PSI in us. h](j.)}(h``DAMOS_QUOTA_SOME_MEM_PSI_US``h]h)}(hjh]hDAMOS_QUOTA_SOME_MEM_PSI_US}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h#System level some memory PSI in us.h]h#System level some memory PSI in us.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjHubj()}(h:``DAMOS_QUOTA_NODE_MEM_USED_BP`` MemUsed ratio of a node. h](j.)}(h ``DAMOS_QUOTA_NODE_MEM_USED_BP``h]h)}(hjh]hDAMOS_QUOTA_NODE_MEM_USED_BP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(hMemUsed ratio of a node.h]hMemUsed ratio of a node.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjHubj()}(h:``DAMOS_QUOTA_NODE_MEM_FREE_BP`` MemFree ratio of a node. h](j.)}(h ``DAMOS_QUOTA_NODE_MEM_FREE_BP``h]h)}(hjh]hDAMOS_QUOTA_NODE_MEM_FREE_BP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(hMemFree ratio of a node.h]hMemFree ratio of a node.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjHubj()}(hI``DAMOS_QUOTA_NODE_MEMCG_USED_BP`` MemUsed ratio of a node for a cgroup. h](j.)}(h"``DAMOS_QUOTA_NODE_MEMCG_USED_BP``h]h)}(hj5h]hDAMOS_QUOTA_NODE_MEMCG_USED_BP}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj/ubjH)}(hhh]h)}(h%MemUsed ratio of a node for a cgroup.h]h%MemUsed ratio of a node for a cgroup.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhKhjKubah}(h]h ]h"]h$]h&]uh1jGhj/ubeh}(h]h ]h"]h$]h&]uh1j'hjJhKhjHubj()}(hI``DAMOS_QUOTA_NODE_MEMCG_FREE_BP`` MemFree ratio of a node for a cgroup. h](j.)}(h"``DAMOS_QUOTA_NODE_MEMCG_FREE_BP``h]h)}(hjnh]hDAMOS_QUOTA_NODE_MEMCG_FREE_BP}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjhubjH)}(hhh]h)}(h%MemFree ratio of a node for a cgroup.h]h%MemFree ratio of a node for a cgroup.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjhubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjHubj()}(h@``DAMOS_QUOTA_ACTIVE_MEM_BP`` Active to total LRU memory ratio. h](j.)}(h``DAMOS_QUOTA_ACTIVE_MEM_BP``h]h)}(hjh]hDAMOS_QUOTA_ACTIVE_MEM_BP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h!Active to total LRU memory ratio.h]h!Active to total LRU memory ratio.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjHubj()}(hD``DAMOS_QUOTA_INACTIVE_MEM_BP`` Inactive to total LRU memory ratio. h](j.)}(h``DAMOS_QUOTA_INACTIVE_MEM_BP``h]h)}(hjh]hDAMOS_QUOTA_INACTIVE_MEM_BP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h#Inactive to total LRU memory ratio.h]h#Inactive to total LRU memory ratio.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjHubj()}(hC``NR_DAMOS_QUOTA_GOAL_METRICS`` Number of DAMOS quota goal metrics.h](j.)}(h``NR_DAMOS_QUOTA_GOAL_METRICS``h]h)}(hjh]hNR_DAMOS_QUOTA_GOAL_METRICS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h#Number of DAMOS quota goal metrics.h]h#Number of DAMOS quota goal metrics.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj/ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj.hKhjHubeh}(h]h ]h"]h$]h&]uh1j"hj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj\h]h Description}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hMMetrics equal to larger than **NR_DAMOS_QUOTA_GOAL_METRICS** are unsupported.h](hMetrics equal to larger than }(hjrhhhNhNubj)}(h**NR_DAMOS_QUOTA_GOAL_METRICS**h]hNR_DAMOS_QUOTA_GOAL_METRICS}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubh are unsupported.}(hjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_quota_goal (C struct)c.damos_quota_goalhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_quota_goalh]j.)}(hstruct damos_quota_goalh](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhKubjW)}(hdamos_quota_goalh]j])}(hjh]hdamos_quota_goal}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhKhjhhubj)}(hhh]h)}(h$DAMOS scheme quota auto-tuning goal.h]h$DAMOS scheme quota auto-tuning goal.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damos_quota_goal { enum damos_quota_goal_metric metric; unsigned long target_value; unsigned long current_value; union { u64 last_psi_total; struct { int nid; u64 memcg_id; }; }; struct list_head list; }; **Members** ``metric`` Metric to be used for representing the goal. ``target_value`` Target value of **metric** to achieve with the tuning. ``current_value`` Current value of **metric**. ``{unnamed_union}`` anonymous ``last_psi_total`` Last measured total PSI ``{unnamed_struct}`` anonymous ``nid`` Node id. ``memcg_id`` Memcg id. ``list`` List head for siblings.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubj)}(hXstruct damos_quota_goal { enum damos_quota_goal_metric metric; unsigned long target_value; unsigned long current_value; union { u64 last_psi_total; struct { int nid; u64 memcg_id; }; }; struct list_head list; };h]hXstruct damos_quota_goal { enum damos_quota_goal_metric metric; unsigned long target_value; unsigned long current_value; union { u64 last_psi_total; struct { int nid; u64 memcg_id; }; }; struct list_head list; };}hj+sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubh)}(h **Members**h]j)}(hj<h]hMembers}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubj#)}(hhh](j()}(h8``metric`` Metric to be used for representing the goal. h](j.)}(h ``metric``h]h)}(hj[h]hmetric}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjUubjH)}(hhh]h)}(h,Metric to be used for representing the goal.h]h,Metric to be used for representing the goal.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphKhjqubah}(h]h ]h"]h$]h&]uh1jGhjUubeh}(h]h ]h"]h$]h&]uh1j'hjphKhjRubj()}(hH``target_value`` Target value of **metric** to achieve with the tuning. h](j.)}(h``target_value``h]h)}(hjh]h target_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h6Target value of **metric** to achieve with the tuning.h](hTarget value of }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to achieve with the tuning.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjRubj()}(h/``current_value`` Current value of **metric**. h](j.)}(h``current_value``h]h)}(hjh]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(hCurrent value of **metric**.h](hCurrent value of }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjRubj()}(h``{unnamed_union}`` anonymous h](j.)}(h``{unnamed_union}``h]h)}(hj*h]h{unnamed_union}}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj$ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hKhj@ubah}(h]h ]h"]h$]h&]uh1jGhj$ubeh}(h]h ]h"]h$]h&]uh1j'hj?hKhjRubj()}(h+``last_psi_total`` Last measured total PSI h](j.)}(h``last_psi_total``h]h)}(hjch]hlast_psi_total}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj]ubjH)}(hhh]h)}(hLast measured total PSIh]hLast measured total PSI}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhKhjyubah}(h]h ]h"]h$]h&]uh1jGhj]ubeh}(h]h ]h"]h$]h&]uh1j'hjxhKhjRubj()}(h``{unnamed_struct}`` anonymous h](j.)}(h``{unnamed_struct}``h]h)}(hjh]h{unnamed_struct}}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h anonymoush]h anonymous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjRubj()}(h``nid`` Node id. h](j.)}(h``nid``h]h)}(hjh]hnid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(hNode id.h]hNode id.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjRubj()}(h``memcg_id`` Memcg id. h](j.)}(h ``memcg_id``h]h)}(hjh]hmemcg_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h Memcg id.h]h Memcg id.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hKhj$ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj#hKhjRubj()}(h ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hjGh]hlist}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjAubjH)}(hhh]h)}(hList head for siblings.h]hList head for siblings.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj]ubah}(h]h ]h"]h$]h&]uh1jGhjAubeh}(h]h ]h"]h$]h&]uh1j'hj\hKhjRubeh}(h]h ]h"]h$]h&]uh1j"hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hData structure for getting the current score of the quota tuning goal. The score is calculated by how close **current_value** and **target_value** are. Then the score is entered to DAMON's internal feedback loop mechanism to get the auto-tuned quota.h](hmData structure for getting the current score of the quota tuning goal. The score is calculated by how close }(hjhhhNhNubj)}(h**current_value**h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h**target_value**h]h target_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhk are. Then the score is entered to DAMON’s internal feedback loop mechanism to get the auto-tuned quota.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hIf **metric** is DAMOS_QUOTA_USER_INPUT, **current_value** should be manually entered by the user, probably inside the kdamond callbacks. Otherwise, DAMON sets **current_value** with self-measured value of **metric**.h](hIf }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is DAMOS_QUOTA_USER_INPUT, }(hjhhhNhNubj)}(h**current_value**h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhg should be manually entered by the user, probably inside the kdamond callbacks. Otherwise, DAMON sets }(hjhhhNhNubj)}(h**current_value**h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh with self-measured value of }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hIf **metric** is DAMOS_QUOTA_NODE_MEM_{USED,FREE}_BP, **nid** represents the node id of the target node to account the used/free memory.h](hIf }(hj*hhhNhNubj)}(h **metric**h]hmetric}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh) is DAMOS_QUOTA_NODE_MEM_{USED,FREE}_BP, }(hj*hhhNhNubj)}(h**nid**h]hnid}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubhK represents the node id of the target node to account the used/free memory.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hIf **metric** is DAMOS_QUOTA_NODE_MEMCG_{USED,FREE}_BP, **nid** and **memcg_id** represents the node id and the cgroup to account the used memory for.h](hIf }(hj]hhhNhNubj)}(h **metric**h]hmetric}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubh+ is DAMOS_QUOTA_NODE_MEMCG_{USED,FREE}_BP, }(hj]hhhNhNubj)}(h**nid**h]hnid}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubh and }(hj]hhhNhNubj)}(h **memcg_id**h]hmemcg_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubhF represents the node id and the cgroup to account the used memory for.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_quota (C struct) c.damos_quotahNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damos_quotah]j.)}(hstruct damos_quotah](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhKubjW)}(h damos_quotah]j])}(hjh]h damos_quota}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhKhjhhubj)}(hhh]h)}(h0Controls the aggressiveness of the given scheme.h]h0Controls the aggressiveness of the given scheme.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1j"hhhhhj!hNubj)}(hX(**Definition**:: struct damos_quota { unsigned long reset_interval; unsigned long ms; unsigned long sz; struct list_head goals; unsigned long esz; unsigned int weight_sz; unsigned int weight_nr_accesses; unsigned int weight_age; }; **Members** ``reset_interval`` Charge reset interval in milliseconds. ``ms`` Maximum milliseconds that the scheme can use. ``sz`` Maximum bytes of memory that the action can be applied. ``goals`` Head of quota tuning goals (:c:type:`damos_quota_goal`) list. ``esz`` Effective size quota in bytes. ``weight_sz`` Weight of the region's size for prioritization. ``weight_nr_accesses`` Weight of the region's nr_accesses for prioritization. ``weight_age`` Weight of the region's age for prioritization.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubj)}(hstruct damos_quota { unsigned long reset_interval; unsigned long ms; unsigned long sz; struct list_head goals; unsigned long esz; unsigned int weight_sz; unsigned int weight_nr_accesses; unsigned int weight_age; };h]hstruct damos_quota { unsigned long reset_interval; unsigned long ms; unsigned long sz; struct list_head goals; unsigned long esz; unsigned int weight_sz; unsigned int weight_nr_accesses; unsigned int weight_age; };}hj:sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubh)}(h **Members**h]j)}(hjKh]hMembers}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubj#)}(hhh](j()}(h:``reset_interval`` Charge reset interval in milliseconds. h](j.)}(h``reset_interval``h]h)}(hjjh]hreset_interval}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjdubjH)}(hhh]h)}(h&Charge reset interval in milliseconds.h]h&Charge reset interval in milliseconds.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjdubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjaubj()}(h5``ms`` Maximum milliseconds that the scheme can use. h](j.)}(h``ms``h]h)}(hjh]hms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h-Maximum milliseconds that the scheme can use.h]h-Maximum milliseconds that the scheme can use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjaubj()}(h?``sz`` Maximum bytes of memory that the action can be applied. h](j.)}(h``sz``h]h)}(hjh]hsz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h7Maximum bytes of memory that the action can be applied.h]h7Maximum bytes of memory that the action can be applied.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjaubj()}(hH``goals`` Head of quota tuning goals (:c:type:`damos_quota_goal`) list. h](j.)}(h ``goals``h]h)}(hjh]hgoals}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h=Head of quota tuning goals (:c:type:`damos_quota_goal`) list.h](hHead of quota tuning goals (}(hj.hhhNhNubh)}(h:c:type:`damos_quota_goal`h]h)}(hj8h]hdamos_quota_goal}(hj:hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_quota_goaluh1hhj*hKhj.ubh) list.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj*hKhj+ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj*hKhjaubj()}(h'``esz`` Effective size quota in bytes. h](j.)}(h``esz``h]h)}(hjqh]hesz}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjoubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjkubjH)}(hhh]h)}(hEffective size quota in bytes.h]hEffective size quota in bytes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjkubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjaubj()}(h>``weight_sz`` Weight of the region's size for prioritization. h](j.)}(h ``weight_sz``h]h)}(hjh]h weight_sz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h/Weight of the region's size for prioritization.h]h1Weight of the region’s size for prioritization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjaubj()}(hN``weight_nr_accesses`` Weight of the region's nr_accesses for prioritization. h](j.)}(h``weight_nr_accesses``h]h)}(hjh]hweight_nr_accesses}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h6Weight of the region's nr_accesses for prioritization.h]h8Weight of the region’s nr_accesses for prioritization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjaubj()}(h=``weight_age`` Weight of the region's age for prioritization.h](j.)}(h``weight_age``h]h)}(hjh]h weight_age}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h.Weight of the region's age for prioritization.h]h0Weight of the region’s age for prioritization.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj2ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj1hKhjaubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj_h]h Description}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hXTo avoid consuming too much CPU time or IO resources for applying the :c:type:`struct damos `->action to large memory, DAMON allows users to set time and/or size quotas. The quotas can be set by writing non-zero values to :c:type:`ms` and :c:type:`sz`, respectively. If the time quota is set, DAMON tries to use only up to :c:type:`ms` milliseconds within :c:type:`reset_interval` for applying the action. If the size quota is set, DAMON tries to apply the action only up to :c:type:`sz` bytes within :c:type:`reset_interval`.h](hFTo avoid consuming too much CPU time or IO resources for applying the }(hjuhhhNhNubh)}(h:c:type:`struct damos `h]h)}(hjh]h struct damos}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj}ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjuubh->action to large memory, DAMON allows users to set time and/or size quotas. The quotas can be set by writing non-zero values to }(hjuhhhNhNubh)}(h :c:type:`ms`h]h)}(hjh]hms}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmsuh1hhjhKhjuubh and }(hjuhhhNhNubh)}(h :c:type:`sz`h]h)}(hjh]hsz}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjszuh1hhjhKhjuubhI, respectively. If the time quota is set, DAMON tries to use only up to }(hjuhhhNhNubh)}(h :c:type:`ms`h]h)}(hjh]hms}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmsuh1hhjhKhjuubh milliseconds within }(hjuhhhNhNubh)}(h:c:type:`reset_interval`h]h)}(hj h]hreset_interval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjreset_intervaluh1hhjhKhjuubh` for applying the action. If the size quota is set, DAMON tries to apply the action only up to }(hjuhhhNhNubh)}(h :c:type:`sz`h]h)}(hj/h]hsz}(hj1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjszuh1hhjhKhjuubh bytes within }(hjuhhhNhNubh)}(h:c:type:`reset_interval`h]h)}(hjRh]hreset_interval}(hjThhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjPubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjreset_intervaluh1hhjhKhjuubh.}(hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhhhhubh)}(hTo convince the different types of quotas and goals, DAMON internally converts those into one single size quota called "effective quota". DAMON internally uses it as the only one real quota. The conversion is made as follows.h]hTo convince the different types of quotas and goals, DAMON internally converts those into one single size quota called “effective quota”. DAMON internally uses it as the only one real quota. The conversion is made as follows.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hThe time quota is transformed to a size quota using estimated throughput of the scheme's action. DAMON then compares it against :c:type:`sz` and uses smaller one as the effective quota.h](hThe time quota is transformed to a size quota using estimated throughput of the scheme’s action. DAMON then compares it against }(hjhhhNhNubh)}(h :c:type:`sz`h]h)}(hjh]hsz}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjszuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubh- and uses smaller one as the effective quota.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhhhhubh)}(hXIf **goals** is not empty, DAMON calculates yet another size quota based on the goals using its internal feedback loop algorithm, for every **reset_interval**. Then, if the new size quota is smaller than the effective quota, it uses the new size quota as the effective quota.h](hIf }(hjhhhNhNubj)}(h **goals**h]hgoals}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is not empty, DAMON calculates yet another size quota based on the goals using its internal feedback loop algorithm, for every }(hjhhhNhNubj)}(h**reset_interval**h]hreset_interval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhu. Then, if the new size quota is smaller than the effective quota, it uses the new size quota as the effective quota.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(h>The resulting effective size quota in bytes is set to **esz**.h](h6The resulting effective size quota in bytes is set to }(hjhhhNhNubj)}(h**esz**h]hesz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hXvFor selecting regions within the quota, DAMON prioritizes current scheme's target memory regions using the :c:type:`struct damon_operations `->get_scheme_score. You could customize the prioritization logic by setting :c:type:`weight_sz`, :c:type:`weight_nr_accesses`, and :c:type:`weight_age`, because monitoring operations are encouraged to respect those.h](hmFor selecting regions within the quota, DAMON prioritizes current scheme’s target memory regions using the }(hjhhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjh]hstruct damon_operations}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubhL->get_scheme_score. You could customize the prioritization logic by setting }(hjhhhNhNubh)}(h:c:type:`weight_sz`h]h)}(hj<h]h weight_sz}(hj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj weight_szuh1hhj5hKhjubh, }(hjhhhNhNubh)}(h:c:type:`weight_nr_accesses`h]h)}(hj_h]hweight_nr_accesses}(hjahhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj]ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjweight_nr_accessesuh1hhj5hKhjubh, and }(hjhhhNhNubh)}(h:c:type:`weight_age`h]h)}(hjh]h weight_age}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj weight_ageuh1hhj5hKhjubh@, because monitoring operations are encouraged to respect those.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj5hKhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_wmark_metric (C enum)c.damos_wmark_metrichNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_wmark_metrich]j.)}(henum damos_wmark_metrich](j4)}(hj h]henum}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhMubjW)}(hdamos_wmark_metrich]j])}(hjh]hdamos_wmark_metric}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhMhjhhubj)}(hhh]h)}(h Represents the watermark metric.h]h Represents the watermark metric.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jenumeh"]h$]h&]jjjjjjjjjuh1j"hhhhhj!hNubj)}(h**Constants** ``DAMOS_WMARK_NONE`` Ignore the watermarks of the given scheme. ``DAMOS_WMARK_FREE_MEM_RATE`` Free memory rate of the system in [0,1000]. ``NR_DAMOS_WMARK_METRICS`` Total number of DAMOS watermark metricsh](h)}(h **Constants**h]j)}(hj&h]h Constants}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM$hj ubj#)}(hhh](j()}(h@``DAMOS_WMARK_NONE`` Ignore the watermarks of the given scheme. h](j.)}(h``DAMOS_WMARK_NONE``h]h)}(hjEh]hDAMOS_WMARK_NONE}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM'hj?ubjH)}(hhh]h)}(h*Ignore the watermarks of the given scheme.h]h*Ignore the watermarks of the given scheme.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhM'hj[ubah}(h]h ]h"]h$]h&]uh1jGhj?ubeh}(h]h ]h"]h$]h&]uh1j'hjZhM'hj<ubj()}(hJ``DAMOS_WMARK_FREE_MEM_RATE`` Free memory rate of the system in [0,1000]. h](j.)}(h``DAMOS_WMARK_FREE_MEM_RATE``h]h)}(hj~h]hDAMOS_WMARK_FREE_MEM_RATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM*hjxubjH)}(hhh]h)}(h+Free memory rate of the system in [0,1000].h]h+Free memory rate of the system in [0,1000].}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM*hjubah}(h]h ]h"]h$]h&]uh1jGhjxubeh}(h]h ]h"]h$]h&]uh1j'hjhM*hj<ubj()}(hB``NR_DAMOS_WMARK_METRICS`` Total number of DAMOS watermark metricsh](j.)}(h``NR_DAMOS_WMARK_METRICS``h]h)}(hjh]hNR_DAMOS_WMARK_METRICS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM,hjubjH)}(hhh]h)}(h'Total number of DAMOS watermark metricsh]h'Total number of DAMOS watermark metrics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM-hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM,hj<ubeh}(h]h ]h"]h$]h&]uh1j"hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_watermarks (C struct)c.damos_watermarkshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_watermarksh]j.)}(hstruct damos_watermarksh](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM2ubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj hhhjhM2ubjW)}(hdamos_watermarksh]j])}(hj h]hdamos_watermarks}(hj1hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj-ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj hhhjhM2ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj hhhjhM2ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhM2hjhhubj)}(hhh]h)}(h1Controls when a given scheme should be activated.h]h1Controls when a given scheme should be activated.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM-hjPhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM2ubeh}(h]h ](jstructeh"]h$]h&]jjjjkjjkjjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damos_watermarks { enum damos_wmark_metric metric; unsigned long interval; unsigned long high; unsigned long mid; unsigned long low; }; **Members** ``metric`` Metric for the watermarks. ``interval`` Watermarks check time interval in microseconds. ``high`` High watermark. ``mid`` Middle watermark. ``low`` Low watermark.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubh:}(hjshhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM1hjoubj)}(hstruct damos_watermarks { enum damos_wmark_metric metric; unsigned long interval; unsigned long high; unsigned long mid; unsigned long low; };h]hstruct damos_watermarks { enum damos_wmark_metric metric; unsigned long interval; unsigned long high; unsigned long mid; unsigned long low; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM3hjoubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM;hjoubj#)}(hhh](j()}(h&``metric`` Metric for the watermarks. h](j.)}(h ``metric``h]h)}(hjh]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM/hjubjH)}(hhh]h)}(hMetric for the watermarks.h]hMetric for the watermarks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM/hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM/hjubj()}(h=``interval`` Watermarks check time interval in microseconds. h](j.)}(h ``interval``h]h)}(hjh]hinterval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM0hjubjH)}(hhh]h)}(h/Watermarks check time interval in microseconds.h]h/Watermarks check time interval in microseconds.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM0hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM0hjubj()}(h``high`` High watermark. h](j.)}(h``high``h]h)}(hj2h]hhigh}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM1hj,ubjH)}(hhh]h)}(hHigh watermark.h]hHigh watermark.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhM1hjHubah}(h]h ]h"]h$]h&]uh1jGhj,ubeh}(h]h ]h"]h$]h&]uh1j'hjGhM1hjubj()}(h``mid`` Middle watermark. h](j.)}(h``mid``h]h)}(hjkh]hmid}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjiubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM2hjeubjH)}(hhh]h)}(hMiddle watermark.h]hMiddle watermark.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM2hjubah}(h]h ]h"]h$]h&]uh1jGhjeubeh}(h]h ]h"]h$]h&]uh1j'hjhM2hjubj()}(h``low`` Low watermark.h](j.)}(h``low``h]h)}(hjh]hlow}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM2hjubjH)}(hhh]h)}(hLow watermark.h]hLow watermark.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM3hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM2hjubeh}(h]h ]h"]h$]h&]uh1j"hjoubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM6hhhhubh)}(hX8If :c:type:`metric` is :c:type:`DAMOS_WMARK_NONE`, the scheme is always active. Being active means DAMON does monitoring and applying the action of the scheme to appropriate memory regions. Else, DAMON checks :c:type:`metric` of the system for at least every :c:type:`interval` microseconds and works as below.h](hIf }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjh]hmetric}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM3hjubh is }(hjhhhNhNubh)}(h:c:type:`DAMOS_WMARK_NONE`h]h)}(hj+h]hDAMOS_WMARK_NONE}(hj-hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_WMARK_NONEuh1hhj$hM3hjubh, the scheme is always active. Being active means DAMON does monitoring and applying the action of the scheme to appropriate memory regions. Else, DAMON checks }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjNh]hmetric}(hjPhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjLubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhj$hM3hjubh" of the system for at least every }(hjhhhNhNubh)}(h:c:type:`interval`h]h)}(hjqh]hinterval}(hjshhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjoubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjintervaluh1hhj$hM3hjubh! microseconds and works as below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj$hM3hhhhubh)}(hIf :c:type:`metric` is higher than :c:type:`high`, the scheme is inactivated. If :c:type:`metric` is between :c:type:`mid` and :c:type:`low`, the scheme is activated. If :c:type:`metric` is lower than :c:type:`low`, the scheme is inactivated.h](hIf }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjh]hmetric}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM8hjubh is higher than }(hjhhhNhNubh)}(h:c:type:`high`h]h)}(hjh]hhigh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjhighuh1hhjhM8hjubh!, the scheme is inactivated. If }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjh]hmetric}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhjhM8hjubh is between }(hjhhhNhNubh)}(h :c:type:`mid`h]h)}(hj h]hmid}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmiduh1hhjhM8hjubh and }(hjhhhNhNubh)}(h :c:type:`low`h]h)}(hj/h]hlow}(hj1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjlowuh1hhjhM8hjubh, the scheme is activated. If }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjRh]hmetric}(hjThhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjPubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhjhM8hjubh is lower than }(hjhhhNhNubh)}(h :c:type:`low`h]h)}(hjuh]hlow}(hjwhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjsubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjlowuh1hhjhM8hjubh, the scheme is inactivated.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM8hhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_stat (C struct) c.damos_stathNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damos_stath]j.)}(hstruct damos_stath](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM?ubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhM?ubjW)}(h damos_stath]j])}(hjh]h damos_stat}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhM?ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhM?ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhM?hjhhubj)}(hhh]h)}(hStatistics on a given scheme.h]hStatistics on a given scheme.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMIhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM?ubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1j"hhhhhj!hNubj)}(hX;**Definition**:: struct damos_stat { unsigned long nr_tried; unsigned long sz_tried; unsigned long nr_applied; unsigned long sz_applied; unsigned long sz_ops_filter_passed; unsigned long qt_exceeds; unsigned long nr_snapshots; }; **Members** ``nr_tried`` Total number of regions that the scheme is tried to be applied. ``sz_tried`` Total size of regions that the scheme is tried to be applied. ``nr_applied`` Total number of regions that the scheme is applied. ``sz_applied`` Total size of regions that the scheme is applied. ``sz_ops_filter_passed`` Total bytes that passed ops layer-handled DAMOS filters. ``qt_exceeds`` Total number of times the quota of the scheme has exceeded. ``nr_snapshots`` Total number of DAMON snapshots that the scheme has tried.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMMhjubj)}(hstruct damos_stat { unsigned long nr_tried; unsigned long sz_tried; unsigned long nr_applied; unsigned long sz_applied; unsigned long sz_ops_filter_passed; unsigned long qt_exceeds; unsigned long nr_snapshots; };h]hstruct damos_stat { unsigned long nr_tried; unsigned long sz_tried; unsigned long nr_applied; unsigned long sz_applied; unsigned long sz_ops_filter_passed; unsigned long qt_exceeds; unsigned long nr_snapshots; };}hj4sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMOhjubh)}(h **Members**h]j)}(hjEh]hMembers}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMYhjubj#)}(hhh](j()}(hM``nr_tried`` Total number of regions that the scheme is tried to be applied. h](j.)}(h ``nr_tried``h]h)}(hjdh]hnr_tried}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMKhj^ubjH)}(hhh]h)}(h?Total number of regions that the scheme is tried to be applied.h]h?Total number of regions that the scheme is tried to be applied.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhMKhjzubah}(h]h ]h"]h$]h&]uh1jGhj^ubeh}(h]h ]h"]h$]h&]uh1j'hjyhMKhj[ubj()}(hK``sz_tried`` Total size of regions that the scheme is tried to be applied. h](j.)}(h ``sz_tried``h]h)}(hjh]hsz_tried}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMLhjubjH)}(hhh]h)}(h=Total size of regions that the scheme is tried to be applied.h]h=Total size of regions that the scheme is tried to be applied.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMLhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMLhj[ubj()}(hC``nr_applied`` Total number of regions that the scheme is applied. h](j.)}(h``nr_applied``h]h)}(hjh]h nr_applied}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMMhjubjH)}(hhh]h)}(h3Total number of regions that the scheme is applied.h]h3Total number of regions that the scheme is applied.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMMhj[ubj()}(hA``sz_applied`` Total size of regions that the scheme is applied. h](j.)}(h``sz_applied``h]h)}(hj h]h sz_applied}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMNhj ubjH)}(hhh]h)}(h1Total size of regions that the scheme is applied.h]h1Total size of regions that the scheme is applied.}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ hMNhj% ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj$ hMNhj[ubj()}(hR``sz_ops_filter_passed`` Total bytes that passed ops layer-handled DAMOS filters. h](j.)}(h``sz_ops_filter_passed``h]h)}(hjH h]hsz_ops_filter_passed}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMOhjB ubjH)}(hhh]h)}(h8Total bytes that passed ops layer-handled DAMOS filters.h]h8Total bytes that passed ops layer-handled DAMOS filters.}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj] hMOhj^ ubah}(h]h ]h"]h$]h&]uh1jGhjB ubeh}(h]h ]h"]h$]h&]uh1j'hj] hMOhj[ubj()}(hK``qt_exceeds`` Total number of times the quota of the scheme has exceeded. h](j.)}(h``qt_exceeds``h]h)}(hj h]h qt_exceeds}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMQhj{ ubjH)}(hhh]h)}(h;Total number of times the quota of the scheme has exceeded.h]h;Total number of times the quota of the scheme has exceeded.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMQhj ubah}(h]h ]h"]h$]h&]uh1jGhj{ ubeh}(h]h ]h"]h$]h&]uh1j'hj hMQhj[ubj()}(hK``nr_snapshots`` Total number of DAMON snapshots that the scheme has tried.h](j.)}(h``nr_snapshots``h]h)}(hj h]h nr_snapshots}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMQhj ubjH)}(hhh]h)}(h:Total number of DAMON snapshots that the scheme has tried.h]h:Total number of DAMON snapshots that the scheme has tried.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMRhj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hMQhj[ubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMUhhhhubh)}(hX2"Tried an action to a region" in this context means the DAMOS core logic determined the region as eligible to apply the action. The access pattern (:c:type:`struct damos_access_pattern `), quotas (:c:type:`struct damos_quota `), watermarks (:c:type:`struct damos_watermarks `) and filters (:c:type:`struct damos_filter `) that handled on core logic can affect this. The core logic asks the operation set (:c:type:`struct damon_operations `) to apply the action to the region.h](h“Tried an action to a region” in this context means the DAMOS core logic determined the region as eligible to apply the action. The access pattern (}(hj!hhhNhNubh)}(h<:c:type:`struct damos_access_pattern `h]h)}(hj!h]hstruct damos_access_pattern}(hj!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_access_patternuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMShj!ubh ), quotas (}(hj!hhhNhNubh)}(h*:c:type:`struct damos_quota `h]h)}(hjA!h]hstruct damos_quota}(hjC!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj?!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_quotauh1hhj:!hMShj!ubh), watermarks (}(hj!hhhNhNubh)}(h4:c:type:`struct damos_watermarks `h]h)}(hjd!h]hstruct damos_watermarks}(hjf!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjb!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_watermarksuh1hhj:!hMShj!ubh) and filters (}(hj!hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hj!h]hstruct damos_filter}(hj!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj:!hMShj!ubhV) that handled on core logic can affect this. The core logic asks the operation set (}(hj!hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj!h]hstruct damon_operations}(hj!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj:!hMShj!ubh$) to apply the action to the region.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj:!hMShhhhubh)}(hX"Applied an action to a region" in this context means the operation set (:c:type:`struct damon_operations `) successfully applied the action to the region, at least to a part of the region. The filters (:c:type:`struct damos_filter `) that handled on operation set layer and type of the action and pages of the region can affect this. For example, if a filter is set to exclude anonymous pages and the region has only anonymous pages, the region will be failed at applying the action. If the action is :c:type:`DAMOS_PAGEOUT` and all pages of the region are already paged out, the region will be failed at applying the action.h](hM“Applied an action to a region” in this context means the operation set (}(hj!hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj!h]hstruct damon_operations}(hj!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMZhj!ubha) successfully applied the action to the region, at least to a part of the region. The filters (}(hj!hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hj!h]hstruct damos_filter}(hj"hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj!hMZhj!ubhX) that handled on operation set layer and type of the action and pages of the region can affect this. For example, if a filter is set to exclude anonymous pages and the region has only anonymous pages, the region will be failed at applying the action. If the action is }(hj!hhhNhNubh)}(h:c:type:`DAMOS_PAGEOUT`h]h)}(hj""h]h DAMOS_PAGEOUT}(hj$"hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj "ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj DAMOS_PAGEOUTuh1hhj!hMZhj!ubhe and all pages of the region are already paged out, the region will be failed at applying the action.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj!hMZhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_filter_type (C enum)c.damos_filter_typehNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_filter_typeh]j.)}(henum damos_filter_typeh](j4)}(hj h]henum}(hjb"hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj^"hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMgubjF)}(h h]h }(hjp"hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj^"hhhjo"hMgubjW)}(hdamos_filter_typeh]j])}(hj\"h]hdamos_filter_type}(hj"hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj~"ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj^"hhhjo"hMgubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjZ"hhhjo"hMgubah}(h]jU"ah ](jjeh"]h$]h&]jj)jhuh1j'hjo"hMghjW"hhubj)}(hhh]h)}(h?Type of memory for :c:type:`struct damos_filter `h](hType of memory for }(hj"hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hj"h]hstruct damos_filter}(hj"hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjj)}j]j ASTIdentifier)} identifierj\"sbc.damos_filter_typeasbj damos_filteruh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj"ubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMphj"hhubah}(h]h ]h"]h$]h&]uh1jhjW"hhhjo"hMgubeh}(h]h ](jenumeh"]h$]h&]jjjj"jj"jjjuh1j"hhhhhj!hNubj)}(hX**Constants** ``DAMOS_FILTER_TYPE_ANON`` Anonymous pages. ``DAMOS_FILTER_TYPE_ACTIVE`` Active pages. ``DAMOS_FILTER_TYPE_MEMCG`` Specific memcg's pages. ``DAMOS_FILTER_TYPE_YOUNG`` Recently accessed pages. ``DAMOS_FILTER_TYPE_HUGEPAGE_SIZE`` Page is part of a hugepage. ``DAMOS_FILTER_TYPE_UNMAPPED`` Unmapped pages. ``DAMOS_FILTER_TYPE_ADDR`` Address range. ``DAMOS_FILTER_TYPE_TARGET`` Data Access Monitoring target. ``NR_DAMOS_FILTER_TYPES`` Number of filter types.h](h)}(h **Constants**h]j)}(hj"h]h Constants}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMthj"ubj#)}(hhh](j()}(h,``DAMOS_FILTER_TYPE_ANON`` Anonymous pages. h](j.)}(h``DAMOS_FILTER_TYPE_ANON``h]h)}(hj#h]hDAMOS_FILTER_TYPE_ANON}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj #ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMwhj #ubjH)}(hhh]h)}(hAnonymous pages.h]hAnonymous pages.}(hj(#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$#hMwhj%#ubah}(h]h ]h"]h$]h&]uh1jGhj #ubeh}(h]h ]h"]h$]h&]uh1j'hj$#hMwhj#ubj()}(h+``DAMOS_FILTER_TYPE_ACTIVE`` Active pages. h](j.)}(h``DAMOS_FILTER_TYPE_ACTIVE``h]h)}(hjH#h]hDAMOS_FILTER_TYPE_ACTIVE}(hjJ#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF#ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMzhjB#ubjH)}(hhh]h)}(h Active pages.h]h Active pages.}(hja#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]#hMzhj^#ubah}(h]h ]h"]h$]h&]uh1jGhjB#ubeh}(h]h ]h"]h$]h&]uh1j'hj]#hMzhj#ubj()}(h4``DAMOS_FILTER_TYPE_MEMCG`` Specific memcg's pages. h](j.)}(h``DAMOS_FILTER_TYPE_MEMCG``h]h)}(hj#h]hDAMOS_FILTER_TYPE_MEMCG}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM}hj{#ubjH)}(hhh]h)}(hSpecific memcg's pages.h]hSpecific memcg’s pages.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hM}hj#ubah}(h]h ]h"]h$]h&]uh1jGhj{#ubeh}(h]h ]h"]h$]h&]uh1j'hj#hM}hj#ubj()}(h5``DAMOS_FILTER_TYPE_YOUNG`` Recently accessed pages. h](j.)}(h``DAMOS_FILTER_TYPE_YOUNG``h]h)}(hj#h]hDAMOS_FILTER_TYPE_YOUNG}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj#ubjH)}(hhh]h)}(hRecently accessed pages.h]hRecently accessed pages.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMhj#ubah}(h]h ]h"]h$]h&]uh1jGhj#ubeh}(h]h ]h"]h$]h&]uh1j'hj#hMhj#ubj()}(h@``DAMOS_FILTER_TYPE_HUGEPAGE_SIZE`` Page is part of a hugepage. h](j.)}(h#``DAMOS_FILTER_TYPE_HUGEPAGE_SIZE``h]h)}(hj#h]hDAMOS_FILTER_TYPE_HUGEPAGE_SIZE}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj#ubjH)}(hhh]h)}(hPage is part of a hugepage.h]hPage is part of a hugepage.}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj $ubah}(h]h ]h"]h$]h&]uh1jGhj#ubeh}(h]h ]h"]h$]h&]uh1j'hj$hMhj#ubj()}(h/``DAMOS_FILTER_TYPE_UNMAPPED`` Unmapped pages. h](j.)}(h``DAMOS_FILTER_TYPE_UNMAPPED``h]h)}(hj,$h]hDAMOS_FILTER_TYPE_UNMAPPED}(hj.$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*$ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj&$ubjH)}(hhh]h)}(hUnmapped pages.h]hUnmapped pages.}(hjE$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA$hMhjB$ubah}(h]h ]h"]h$]h&]uh1jGhj&$ubeh}(h]h ]h"]h$]h&]uh1j'hjA$hMhj#ubj()}(h*``DAMOS_FILTER_TYPE_ADDR`` Address range. h](j.)}(h``DAMOS_FILTER_TYPE_ADDR``h]h)}(hje$h]hDAMOS_FILTER_TYPE_ADDR}(hjg$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc$ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj_$ubjH)}(hhh]h)}(hAddress range.h]hAddress range.}(hj~$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjz$hMhj{$ubah}(h]h ]h"]h$]h&]uh1jGhj_$ubeh}(h]h ]h"]h$]h&]uh1j'hjz$hMhj#ubj()}(h<``DAMOS_FILTER_TYPE_TARGET`` Data Access Monitoring target. h](j.)}(h``DAMOS_FILTER_TYPE_TARGET``h]h)}(hj$h]hDAMOS_FILTER_TYPE_TARGET}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj$ubjH)}(hhh]h)}(hData Access Monitoring target.h]hData Access Monitoring target.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj$ubah}(h]h ]h"]h$]h&]uh1jGhj$ubeh}(h]h ]h"]h$]h&]uh1j'hj$hMhj#ubj()}(h1``NR_DAMOS_FILTER_TYPES`` Number of filter types.h](j.)}(h``NR_DAMOS_FILTER_TYPES``h]h)}(hj$h]hNR_DAMOS_FILTER_TYPES}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj$ubjH)}(hhh]h)}(hNumber of filter types.h]hNumber of filter types.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj$ubah}(h]h ]h"]h$]h&]uh1jGhj$ubeh}(h]h ]h"]h$]h&]uh1j'hj$hMhj#ubeh}(h]h ]h"]h$]h&]uh1j"hj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj%h]h Description}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hX8The anon pages type and memcg type filters are handled by underlying :c:type:`struct damon_operations ` as a part of scheme action trying, and therefore accounted as 'tried'. In contrast, other types are handled by core layer before trying of the action and therefore not accounted as 'tried'.h](hEThe anon pages type and memcg type filters are handled by underlying }(hj0%hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj:%h]hstruct damon_operations}(hj<%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj8%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMzhj0%ubh as a part of scheme action trying, and therefore accounted as ‘tried’. In contrast, other types are handled by core layer before trying of the action and therefore not accounted as ‘tried’.}(hj0%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjW%hMzhhhhubh)}(hXThe support of the filters that handled by :c:type:`struct damon_operations ` depend on the running :c:type:`struct damon_operations `. :c:type:`enum DAMON_OPS_PADDR ` supports both anon pages type and memcg type filters, while :c:type:`enum DAMON_OPS_VADDR ` and :c:type:`enum DAMON_OPS_FVADDR ` don't support any of the two types.h](h+The support of the filters that handled by }(hjb%hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjl%h]hstruct damon_operations}(hjn%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjj%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjb%ubh depend on the running }(hjb%hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj%h]hstruct damon_operations}(hj%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj%hMhjb%ubh. }(hjb%hhhNhNubh)}(h0:c:type:`enum DAMON_OPS_PADDR `h]h)}(hj%h]henum DAMON_OPS_PADDR}(hj%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMON_OPS_PADDRuh1hhj%hMhjb%ubh= supports both anon pages type and memcg type filters, while }(hjb%hhhNhNubh)}(h0:c:type:`enum DAMON_OPS_VADDR `h]h)}(hj%h]henum DAMON_OPS_VADDR}(hj%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMON_OPS_VADDRuh1hhj%hMhjb%ubh and }(hjb%hhhNhNubh)}(h2:c:type:`enum DAMON_OPS_FVADDR `h]h)}(hj%h]henum DAMON_OPS_FVADDR}(hj%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMON_OPS_FVADDRuh1hhj%hMhjb%ubh& don’t support any of the two types.}(hjb%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj%hMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_filter (C struct)c.damos_filterhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damos_filterh]j.)}(hstruct damos_filterh](j4)}(hj7h]hstruct}(hj9&hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj5&hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjG&hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj5&hhhjF&hMubjW)}(h damos_filterh]j])}(hj3&h]h damos_filter}(hjY&hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjU&ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj5&hhhjF&hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj1&hhhjF&hMubah}(h]j,&ah ](jjeh"]h$]h&]jj)jhuh1j'hjF&hMhj.&hhubj)}(hhh]h)}(h"DAMOS action target memory filter.h]h"DAMOS action target memory filter.}(hj{&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjx&hhubah}(h]h ]h"]h$]h&]uh1jhj.&hhhjF&hMubeh}(h]h ](jstructeh"]h$]h&]jjjj&jj&jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damos_filter { enum damos_filter_type type; bool matching; bool allow; union { u64 memcg_id; struct damon_addr_range addr_range; int target_idx; struct damon_size_range sz_range; }; struct list_head list; }; **Members** ``type`` Type of the target memory. ``matching`` Whether this is for **type**-matching memory. ``allow`` Whether to include or exclude the **matching** memory. ``{unnamed_union}`` anonymous ``memcg_id`` Memcg id of the question if **type** is DAMOS_FILTER_MEMCG. ``addr_range`` Address range if **type** is DAMOS_FILTER_TYPE_ADDR. ``target_idx`` Index of the :c:type:`struct damon_target ` of :c:type:`damon_ctx->adaptive_targets ` if **type** is DAMOS_FILTER_TYPE_TARGET. ``sz_range`` Size range if **type** is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE. ``list`` List head for siblings.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh:}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj&ubj)}(hXstruct damos_filter { enum damos_filter_type type; bool matching; bool allow; union { u64 memcg_id; struct damon_addr_range addr_range; int target_idx; struct damon_size_range sz_range; }; struct list_head list; };h]hXstruct damos_filter { enum damos_filter_type type; bool matching; bool allow; union { u64 memcg_id; struct damon_addr_range addr_range; int target_idx; struct damon_size_range sz_range; }; struct list_head list; };}hj&sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj&ubh)}(h **Members**h]j)}(hj&h]hMembers}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj&ubj#)}(hhh](j()}(h$``type`` Type of the target memory. h](j.)}(h``type``h]h)}(hj&h]htype}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj&ubjH)}(hhh]h)}(hType of the target memory.h]hType of the target memory.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jGhj&ubeh}(h]h ]h"]h$]h&]uh1j'hj&hMhj&ubj()}(h;``matching`` Whether this is for **type**-matching memory. h](j.)}(h ``matching``h]h)}(hj!'h]hmatching}(hj#'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj'ubjH)}(hhh]h)}(h-Whether this is for **type**-matching memory.h](hWhether this is for }(hj:'hhhNhNubj)}(h**type**h]htype}(hjB'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:'ubh-matching memory.}(hj:'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj6'hMhj7'ubah}(h]h ]h"]h$]h&]uh1jGhj'ubeh}(h]h ]h"]h$]h&]uh1j'hj6'hMhj&ubj()}(hA``allow`` Whether to include or exclude the **matching** memory. h](j.)}(h ``allow``h]h)}(hjl'h]hallow}(hjn'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjj'ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjf'ubjH)}(hhh]h)}(h6Whether to include or exclude the **matching** memory.h](h"Whether to include or exclude the }(hj'hhhNhNubj)}(h **matching**h]hmatching}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh memory.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubah}(h]h ]h"]h$]h&]uh1jGhjf'ubeh}(h]h ]h"]h$]h&]uh1j'hj'hMhj&ubj()}(h``{unnamed_union}`` anonymous h](j.)}(h``{unnamed_union}``h]h)}(hj'h]h{unnamed_union}}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj'ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hKhj'ubah}(h]h ]h"]h$]h&]uh1jGhj'ubeh}(h]h ]h"]h$]h&]uh1j'hj'hKhj&ubj()}(hI``memcg_id`` Memcg id of the question if **type** is DAMOS_FILTER_MEMCG. h](j.)}(h ``memcg_id``h]h)}(hj'h]hmemcg_id}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj'ubjH)}(hhh]h)}(h;Memcg id of the question if **type** is DAMOS_FILTER_MEMCG.h](hMemcg id of the question if }(hj (hhhNhNubj)}(h**type**h]htype}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj (ubh is DAMOS_FILTER_MEMCG.}(hj (hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jGhj'ubeh}(h]h ]h"]h$]h&]uh1j'hj(hMhj&ubj()}(hD``addr_range`` Address range if **type** is DAMOS_FILTER_TYPE_ADDR. h](j.)}(h``addr_range``h]h)}(hj;(h]h addr_range}(hj=(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9(ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj5(ubjH)}(hhh]h)}(h4Address range if **type** is DAMOS_FILTER_TYPE_ADDR.h](hAddress range if }(hjT(hhhNhNubj)}(h**type**h]htype}(hj\(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT(ubh is DAMOS_FILTER_TYPE_ADDR.}(hjT(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjP(hMhjQ(ubah}(h]h ]h"]h$]h&]uh1jGhj5(ubeh}(h]h ]h"]h$]h&]uh1j'hjP(hMhj&ubj()}(h``target_idx`` Index of the :c:type:`struct damon_target ` of :c:type:`damon_ctx->adaptive_targets ` if **type** is DAMOS_FILTER_TYPE_TARGET. h](j.)}(h``target_idx``h]h)}(hj(h]h target_idx}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj(ubjH)}(hhh]h)}(hIndex of the :c:type:`struct damon_target ` of :c:type:`damon_ctx->adaptive_targets ` if **type** is DAMOS_FILTER_TYPE_TARGET.h](h Index of the }(hj(hhhNhNubh)}(h,:c:type:`struct damon_target `h]h)}(hj(h]hstruct damon_target}(hj(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_targetuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj(ubh of }(hj(hhhNhNubh)}(h1:c:type:`damon_ctx->adaptive_targets `h]h)}(hj(h]hdamon_ctx->adaptive_targets}(hj(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhj(hMhj(ubh if }(hj(hhhNhNubj)}(h**type**h]htype}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh is DAMOS_FILTER_TYPE_TARGET.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jGhj(ubeh}(h]h ]h"]h$]h&]uh1j'hj(hMhj&ubj()}(hH``sz_range`` Size range if **type** is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE. h](j.)}(h ``sz_range``h]h)}(hj)h]hsz_range}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj)ubjH)}(hhh]h)}(h:Size range if **type** is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.h](hSize range if }(hj1)hhhNhNubj)}(h**type**h]htype}(hj9)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1)ubh$ is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.}(hj1)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj-)hMhj.)ubah}(h]h ]h"]h$]h&]uh1jGhj)ubeh}(h]h ]h"]h$]h&]uh1j'hj-)hMhj&ubj()}(h ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hjc)h]hlist}(hje)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhja)ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj])ubjH)}(hhh]h)}(hList head for siblings.h]hList head for siblings.}(hj|)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjy)ubah}(h]h ]h"]h$]h&]uh1jGhj])ubeh}(h]h ]h"]h$]h&]uh1j'hjx)hMhj&ubeh}(h]h ]h"]h$]h&]uh1j"hj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj)h]h Description}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hX|Before applying the :c:type:`damos->action ` to a memory region, DAMOS checks if each byte of the region matches to this given condition and avoid applying the action if so. Support of each filter type depends on the running :c:type:`struct damon_operations ` and the type. Refer to :c:type:`enum damos_filter_type ` for more details.h](hBefore applying the }(hj)hhhNhNubh)}(h:c:type:`damos->action `h]h)}(hj)h]h damos->action}(hj)hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj)ubh to a memory region, DAMOS checks if each byte of the region matches to this given condition and avoid applying the action if so. Support of each filter type depends on the running }(hj)hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj)h]hstruct damon_operations}(hj)hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj)hMhj)ubh and the type. Refer to }(hj)hhhNhNubh)}(h4:c:type:`enum damos_filter_type `h]h)}(hj *h]henum damos_filter_type}(hj*hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj *ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_filter_typeuh1hhj)hMhj)ubh for more details.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj)hMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_walk_control (C struct)c.damos_walk_controlhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_walk_controlh]j.)}(hstruct damos_walk_controlh](j4)}(hj7h]hstruct}(hjM*hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjI*hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj[*hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjI*hhhjZ*hMubjW)}(hdamos_walk_controlh]j])}(hjG*h]hdamos_walk_control}(hjm*hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hji*ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjI*hhhjZ*hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjE*hhhjZ*hMubah}(h]j@*ah ](jjeh"]h$]h&]jj)jhuh1j'hjZ*hMhjB*hhubj)}(hhh]h)}(hControl damos_walk().h]hControl damos_walk().}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*hhubah}(h]h ]h"]h$]h&]uh1jhjB*hhhjZ*hMubeh}(h]h ](jstructeh"]h$]h&]jjjj*jj*jjjuh1j"hhhhhj!hNubj)}(hXa**Definition**:: struct damos_walk_control { void (*walk_fn)(void *data, struct damon_ctx *ctx, struct damon_target *t, struct damon_region *r, struct damos *s, unsigned long sz_filter_passed); void *data; }; **Members** ``walk_fn`` Function to be called back for each region. ``data`` Data that will be passed to walk functions.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh:}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*ubj)}(hstruct damos_walk_control { void (*walk_fn)(void *data, struct damon_ctx *ctx, struct damon_target *t, struct damon_region *r, struct damos *s, unsigned long sz_filter_passed); void *data; };h]hstruct damos_walk_control { void (*walk_fn)(void *data, struct damon_ctx *ctx, struct damon_target *t, struct damon_region *r, struct damos *s, unsigned long sz_filter_passed); void *data; };}hj*sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*ubh)}(h **Members**h]j)}(hj*h]hMembers}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*ubj#)}(hhh](j()}(h8``walk_fn`` Function to be called back for each region. h](j.)}(h ``walk_fn``h]h)}(hj*h]hwalk_fn}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*ubjH)}(hhh]h)}(h+Function to be called back for each region.h]h+Function to be called back for each region.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jGhj*ubeh}(h]h ]h"]h$]h&]uh1j'hj+hMhj*ubj()}(h4``data`` Data that will be passed to walk functions.h](j.)}(h``data``h]h)}(hj5+h]hdata}(hj7+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3+ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj/+ubjH)}(hhh]h)}(h+Data that will be passed to walk functions.h]h+Data that will be passed to walk functions.}(hjN+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjK+ubah}(h]h ]h"]h$]h&]uh1jGhj/+ubeh}(h]h ]h"]h$]h&]uh1j'hjJ+hMhj*ubeh}(h]h ]h"]h$]h&]uh1j"hj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjx+h]h Description}(hjz+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjv+ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hControl damos_walk(), which requests specific kdamond to invoke the given function to each region that eligible to apply actions of the kdamond's schemes. Refer to damos_walk() for more details.h]hControl damos_walk(), which requests specific kdamond to invoke the given function to each region that eligible to apply actions of the kdamond’s schemes. Refer to damos_walk() for more details.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_access_pattern (C struct)c.damos_access_patternhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_access_patternh]j.)}(hstruct damos_access_patternh](j4)}(hj7h]hstruct}(hj+hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj+hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj+hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj+hhhj+hMubjW)}(hdamos_access_patternh]j])}(hj+h]hdamos_access_pattern}(hj+hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj+ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj+hhhj+hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj+hhhj+hMubah}(h]j+ah ](jjeh"]h$]h&]jj)jhuh1j'hj+hMhj+hhubj)}(hhh]h)}(h*Target access pattern of the given scheme.h]h*Target access pattern of the given scheme.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj+hhubah}(h]h ]h"]h$]h&]uh1jhj+hhhj+hMubeh}(h]h ](jstructeh"]h$]h&]jjjj,jj,jjjuh1j"hhhhhj!hNubj)}(hXs**Definition**:: struct damos_access_pattern { unsigned long min_sz_region; unsigned long max_sz_region; unsigned int min_nr_accesses; unsigned int max_nr_accesses; unsigned int min_age_region; unsigned int max_age_region; }; **Members** ``min_sz_region`` Minimum size of target regions. ``max_sz_region`` Maximum size of target regions. ``min_nr_accesses`` Minimum ``->nr_accesses`` of target regions. ``max_nr_accesses`` Maximum ``->nr_accesses`` of target regions. ``min_age_region`` Minimum age of target regions. ``max_age_region`` Maximum age of target regions.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh:}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,ubj)}(hstruct damos_access_pattern { unsigned long min_sz_region; unsigned long max_sz_region; unsigned int min_nr_accesses; unsigned int max_nr_accesses; unsigned int min_age_region; unsigned int max_age_region; };h]hstruct damos_access_pattern { unsigned long min_sz_region; unsigned long max_sz_region; unsigned int min_nr_accesses; unsigned int max_nr_accesses; unsigned int min_age_region; unsigned int max_age_region; };}hj5,sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,ubh)}(h **Members**h]j)}(hjF,h]hMembers}(hjH,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD,ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,ubj#)}(hhh](j()}(h2``min_sz_region`` Minimum size of target regions. h](j.)}(h``min_sz_region``h]h)}(hje,h]h min_sz_region}(hjg,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc,ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj_,ubjH)}(hhh]h)}(hMinimum size of target regions.h]hMinimum size of target regions.}(hj~,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjz,hMhj{,ubah}(h]h ]h"]h$]h&]uh1jGhj_,ubeh}(h]h ]h"]h$]h&]uh1j'hjz,hMhj\,ubj()}(h2``max_sz_region`` Maximum size of target regions. h](j.)}(h``max_sz_region``h]h)}(hj,h]h max_sz_region}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,ubjH)}(hhh]h)}(hMaximum size of target regions.h]hMaximum size of target regions.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jGhj,ubeh}(h]h ]h"]h$]h&]uh1j'hj,hMhj\,ubj()}(hA``min_nr_accesses`` Minimum ``->nr_accesses`` of target regions. h](j.)}(h``min_nr_accesses``h]h)}(hj,h]hmin_nr_accesses}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,ubjH)}(hhh]h)}(h,Minimum ``->nr_accesses`` of target regions.h](hMinimum }(hj,hhhNhNubh)}(h``->nr_accesses``h]h ->nr_accesses}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubh of target regions.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jGhj,ubeh}(h]h ]h"]h$]h&]uh1j'hj,hMhj\,ubj()}(hA``max_nr_accesses`` Maximum ``->nr_accesses`` of target regions. h](j.)}(h``max_nr_accesses``h]h)}(hj"-h]hmax_nr_accesses}(hj$-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj -ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj-ubjH)}(hhh]h)}(h,Maximum ``->nr_accesses`` of target regions.h](hMaximum }(hj;-hhhNhNubh)}(h``->nr_accesses``h]h ->nr_accesses}(hjC-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;-ubh of target regions.}(hj;-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj7-hMhj8-ubah}(h]h ]h"]h$]h&]uh1jGhj-ubeh}(h]h ]h"]h$]h&]uh1j'hj7-hMhj\,ubj()}(h2``min_age_region`` Minimum age of target regions. h](j.)}(h``min_age_region``h]h)}(hjm-h]hmin_age_region}(hjo-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjk-ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjg-ubjH)}(hhh]h)}(hMinimum age of target regions.h]hMinimum age of target regions.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hMhj-ubah}(h]h ]h"]h$]h&]uh1jGhjg-ubeh}(h]h ]h"]h$]h&]uh1j'hj-hMhj\,ubj()}(h1``max_age_region`` Maximum age of target regions.h](j.)}(h``max_age_region``h]h)}(hj-h]hmax_age_region}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj-ubjH)}(hhh]h)}(hMaximum age of target regions.h]hMaximum age of target regions.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj-ubah}(h]h ]h"]h$]h&]uh1jGhj-ubeh}(h]h ]h"]h$]h&]uh1j'hj-hMhj\,ubeh}(h]h ]h"]h$]h&]uh1j"hj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_migrate_dests (C struct)c.damos_migrate_destshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_migrate_destsh]j.)}(hstruct damos_migrate_destsh](j4)}(hj7h]hstruct}(hj.hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj-hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj.hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj-hhhj .hMubjW)}(hdamos_migrate_destsh]j])}(hj-h]hdamos_migrate_dests}(hj .hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj.ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj-hhhj .hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj-hhhj .hMubah}(h]j-ah ](jjeh"]h$]h&]jj)jhuh1j'hj .hMhj-hhubj)}(hhh]h)}(h.Migration destination nodes and their weights.h]h.Migration destination nodes and their weights.}(hjB.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj?.hhubah}(h]h ]h"]h$]h&]uh1jhj-hhhj .hMubeh}(h]h ](jstructeh"]h$]h&]jjjjZ.jjZ.jjjuh1j"hhhhhj!hNubj)}(hXa**Definition**:: struct damos_migrate_dests { unsigned int *node_id_arr; unsigned int *weight_arr; size_t nr_dests; }; **Members** ``node_id_arr`` Array of migration destination node ids. ``weight_arr`` Array of migration weights for **node_id_arr**. ``nr_dests`` Length of the **node_id_arr** and **weight_arr** arrays.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjf.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb.ubh:}(hjb.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj^.ubj)}(hqstruct damos_migrate_dests { unsigned int *node_id_arr; unsigned int *weight_arr; size_t nr_dests; };h]hqstruct damos_migrate_dests { unsigned int *node_id_arr; unsigned int *weight_arr; size_t nr_dests; };}hj.sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj^.ubh)}(h **Members**h]j)}(hj.h]hMembers}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj^.ubj#)}(hhh](j()}(h9``node_id_arr`` Array of migration destination node ids. h](j.)}(h``node_id_arr``h]h)}(hj.h]h node_id_arr}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj.ubjH)}(hhh]h)}(h(Array of migration destination node ids.h]h(Array of migration destination node ids.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jGhj.ubeh}(h]h ]h"]h$]h&]uh1j'hj.hMhj.ubj()}(h?``weight_arr`` Array of migration weights for **node_id_arr**. h](j.)}(h``weight_arr``h]h)}(hj.h]h weight_arr}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj.ubjH)}(hhh]h)}(h/Array of migration weights for **node_id_arr**.h](hArray of migration weights for }(hj/hhhNhNubj)}(h**node_id_arr**h]h node_id_arr}(hj /hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jGhj.ubeh}(h]h ]h"]h$]h&]uh1j'hj.hMhj.ubj()}(hE``nr_dests`` Length of the **node_id_arr** and **weight_arr** arrays.h](j.)}(h ``nr_dests``h]h)}(hj3/h]hnr_dests}(hj5/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1/ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj-/ubjH)}(hhh]h)}(h8Length of the **node_id_arr** and **weight_arr** arrays.h](hLength of the }(hjL/hhhNhNubj)}(h**node_id_arr**h]h node_id_arr}(hjT/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL/ubh and }(hjL/hhhNhNubj)}(h**weight_arr**h]h weight_arr}(hjf/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL/ubh arrays.}(hjL/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjI/ubah}(h]h ]h"]h$]h&]uh1jGhj-/ubeh}(h]h ]h"]h$]h&]uh1j'hjH/hMhj.ubeh}(h]h ]h"]h$]h&]uh1j"hj^.ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj/h]h Description}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(h**node_id_arr** is an array of the ids of migration destination nodes. **weight_arr** is an array of the weights for those. The weights in **weight_arr** are for nodes in **node_id_arr** of same array index.h](j)}(h**node_id_arr**h]h node_id_arr}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh8 is an array of the ids of migration destination nodes. }(hj/hhhNhNubj)}(h**weight_arr**h]h weight_arr}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh7 is an array of the weights for those. The weights in }(hj/hhhNhNubj)}(h**weight_arr**h]h weight_arr}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh are for nodes in }(hj/hhhNhNubj)}(h**node_id_arr**h]h node_id_arr}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh of same array index.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos (C struct)c.damoshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamosh]j.)}(h struct damosh](j4)}(hj7h]hstruct}(hj0hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj0hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj*0hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj0hhhj)0hMubjW)}(hdamosh]j])}(hj0h]hdamos}(hj<0hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj80ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj0hhhj)0hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj0hhhj)0hMubah}(h]j0ah ](jjeh"]h$]h&]jj)jhuh1j'hj)0hMhj0hhubj)}(hhh]h)}(h;Represents a Data Access Monitoring-based Operation Scheme.h]h;Represents a Data Access Monitoring-based Operation Scheme.}(hj^0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj[0hhubah}(h]h ]h"]h$]h&]uh1jhj0hhhj)0hMubeh}(h]h ](jstructeh"]h$]h&]jjjjv0jjv0jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damos { struct damos_access_pattern pattern; enum damos_action action; unsigned long apply_interval_us; struct damos_quota quota; struct damos_watermarks wmarks; union { struct { int target_nid; struct damos_migrate_dests migrate_dests; }; }; struct list_head core_filters; struct list_head ops_filters; void *last_applied; struct damos_stat stat; unsigned long max_nr_snapshots; struct list_head list; }; **Members** ``pattern`` Access pattern of target regions. ``action`` :c:type:`damos_action` to be applied to the target regions. ``apply_interval_us`` The time between applying the **action**. ``quota`` Control the aggressiveness of this scheme. ``wmarks`` Watermarks for automated (in)activation of this scheme. ``{unnamed_union}`` anonymous ``{unnamed_struct}`` anonymous ``target_nid`` Destination node if **action** is "migrate_{hot,cold}". ``migrate_dests`` Destination nodes if **action** is "migrate_{hot,cold}". ``core_filters`` Additional set of :c:type:`struct damos_filter ` for :c:type:`action`. ``ops_filters`` ops layer handling :c:type:`struct damos_filter ` objects list. ``last_applied`` Last **action** applied ops-managing entity. ``stat`` Statistics of this scheme. ``max_nr_snapshots`` Upper limit of nr_snapshots stat. ``list`` List head for siblings.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~0ubh:}(hj~0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjz0ubj)}(hXstruct damos { struct damos_access_pattern pattern; enum damos_action action; unsigned long apply_interval_us; struct damos_quota quota; struct damos_watermarks wmarks; union { struct { int target_nid; struct damos_migrate_dests migrate_dests; }; }; struct list_head core_filters; struct list_head ops_filters; void *last_applied; struct damos_stat stat; unsigned long max_nr_snapshots; struct list_head list; };h]hXstruct damos { struct damos_access_pattern pattern; enum damos_action action; unsigned long apply_interval_us; struct damos_quota quota; struct damos_watermarks wmarks; union { struct { int target_nid; struct damos_migrate_dests migrate_dests; }; }; struct list_head core_filters; struct list_head ops_filters; void *last_applied; struct damos_stat stat; unsigned long max_nr_snapshots; struct list_head list; };}hj0sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjz0ubh)}(h **Members**h]j)}(hj0h]hMembers}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjz0ubj#)}(hhh](j()}(h.``pattern`` Access pattern of target regions. h](j.)}(h ``pattern``h]h)}(hj0h]hpattern}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj0ubjH)}(hhh]h)}(h!Access pattern of target regions.h]h!Access pattern of target regions.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hj0hMhj0ubj()}(hG``action`` :c:type:`damos_action` to be applied to the target regions. h](j.)}(h ``action``h]h)}(hj1h]haction}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj0ubjH)}(hhh]h)}(h;:c:type:`damos_action` to be applied to the target regions.h](h)}(h:c:type:`damos_action`h]h)}(hj#1h]h damos_action}(hj%1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj!1ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_actionuh1hhj1hMhj1ubh% to be applied to the target regions.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hj1hMhj0ubj()}(h@``apply_interval_us`` The time between applying the **action**. h](j.)}(h``apply_interval_us``h]h)}(hj\1h]happly_interval_us}(hj^1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZ1ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjV1ubjH)}(hhh]h)}(h)The time between applying the **action**.h](hThe time between applying the }(hju1hhhNhNubj)}(h **action**h]haction}(hj}1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju1ubh.}(hju1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjq1hMhjr1ubah}(h]h ]h"]h$]h&]uh1jGhjV1ubeh}(h]h ]h"]h$]h&]uh1j'hjq1hMhj0ubj()}(h5``quota`` Control the aggressiveness of this scheme. h](j.)}(h ``quota``h]h)}(hj1h]hquota}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1ubjH)}(hhh]h)}(h*Control the aggressiveness of this scheme.h]h*Control the aggressiveness of this scheme.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jGhj1ubeh}(h]h ]h"]h$]h&]uh1j'hj1hMhj0ubj()}(hC``wmarks`` Watermarks for automated (in)activation of this scheme. h](j.)}(h ``wmarks``h]h)}(hj1h]hwmarks}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1ubjH)}(hhh]h)}(h7Watermarks for automated (in)activation of this scheme.h]h7Watermarks for automated (in)activation of this scheme.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jGhj1ubeh}(h]h ]h"]h$]h&]uh1j'hj1hMhj0ubj()}(h``{unnamed_union}`` anonymous h](j.)}(h``{unnamed_union}``h]h)}(hj2h]h{unnamed_union}}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj2ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hj22hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.2hKhj/2ubah}(h]h ]h"]h$]h&]uh1jGhj2ubeh}(h]h ]h"]h$]h&]uh1j'hj.2hKhj0ubj()}(h``{unnamed_struct}`` anonymous h](j.)}(h``{unnamed_struct}``h]h)}(hjR2h]h{unnamed_struct}}(hjT2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP2ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjL2ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hjk2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjg2hKhjh2ubah}(h]h ]h"]h$]h&]uh1jGhjL2ubeh}(h]h ]h"]h$]h&]uh1j'hjg2hKhj0ubj()}(hG``target_nid`` Destination node if **action** is "migrate_{hot,cold}". h](j.)}(h``target_nid``h]h)}(hj2h]h target_nid}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj2ubjH)}(hhh]h)}(h7Destination node if **action** is "migrate_{hot,cold}".h](hDestination node if }(hj2hhhNhNubj)}(h **action**h]haction}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh is “migrate_{hot,cold}”.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jGhj2ubeh}(h]h ]h"]h$]h&]uh1j'hj2hMhj0ubj()}(hK``migrate_dests`` Destination nodes if **action** is "migrate_{hot,cold}". h](j.)}(h``migrate_dests``h]h)}(hj2h]h migrate_dests}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj2ubjH)}(hhh]h)}(h8Destination nodes if **action** is "migrate_{hot,cold}".h](hDestination nodes if }(hj2hhhNhNubj)}(h **action**h]haction}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh is “migrate_{hot,cold}”.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jGhj2ubeh}(h]h ]h"]h$]h&]uh1j'hj2hMhj0ubj()}(hf``core_filters`` Additional set of :c:type:`struct damos_filter ` for :c:type:`action`. h](j.)}(h``core_filters``h]h)}(hj!3h]h core_filters}(hj#3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj3ubjH)}(hhh]h)}(hTAdditional set of :c:type:`struct damos_filter ` for :c:type:`action`.h](hAdditional set of }(hj:3hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hjD3h]hstruct damos_filter}(hjF3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjB3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj63hMhj:3ubh for }(hj:3hhhNhNubh)}(h:c:type:`action`h]h)}(hjg3h]haction}(hji3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhje3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj63hMhj:3ubh.}(hj:3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj63hMhj73ubah}(h]h ]h"]h$]h&]uh1jGhj3ubeh}(h]h ]h"]h$]h&]uh1j'hj63hMhj0ubj()}(h^``ops_filters`` ops layer handling :c:type:`struct damos_filter ` objects list. h](j.)}(h``ops_filters``h]h)}(hj3h]h ops_filters}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj3ubjH)}(hhh]h)}(hMops layer handling :c:type:`struct damos_filter ` objects list.h](hops layer handling }(hj3hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hj3h]hstruct damos_filter}(hj3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj3hMhj3ubh objects list.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj3hMhj3ubah}(h]h ]h"]h$]h&]uh1jGhj3ubeh}(h]h ]h"]h$]h&]uh1j'hj3hMhj0ubj()}(h>``last_applied`` Last **action** applied ops-managing entity. h](j.)}(h``last_applied``h]h)}(hj3h]h last_applied}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj3ubjH)}(hhh]h)}(h,Last **action** applied ops-managing entity.h](hLast }(hj4hhhNhNubj)}(h **action**h]haction}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh applied ops-managing entity.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj4hMhj4ubah}(h]h ]h"]h$]h&]uh1jGhj3ubeh}(h]h ]h"]h$]h&]uh1j'hj4hMhj0ubj()}(h$``stat`` Statistics of this scheme. h](j.)}(h``stat``h]h)}(hjG4h]hstat}(hjI4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE4ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjA4ubjH)}(hhh]h)}(hStatistics of this scheme.h]hStatistics of this scheme.}(hj`4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\4hMhj]4ubah}(h]h ]h"]h$]h&]uh1jGhjA4ubeh}(h]h ]h"]h$]h&]uh1j'hj\4hMhj0ubj()}(h7``max_nr_snapshots`` Upper limit of nr_snapshots stat. h](j.)}(h``max_nr_snapshots``h]h)}(hj4h]hmax_nr_snapshots}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~4ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjz4ubjH)}(hhh]h)}(h!Upper limit of nr_snapshots stat.h]h!Upper limit of nr_snapshots stat.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMhj4ubah}(h]h ]h"]h$]h&]uh1jGhjz4ubeh}(h]h ]h"]h$]h&]uh1j'hj4hMhj0ubj()}(h ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hj4h]hlist}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj4ubjH)}(hhh]h)}(hList head for siblings.h]hList head for siblings.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj4ubah}(h]h ]h"]h$]h&]uh1jGhj4ubeh}(h]h ]h"]h$]h&]uh1j'hj4hMhj0ubeh}(h]h ]h"]h$]h&]uh1j"hjz0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hFor each **apply_interval_us**, DAMON finds regions which fit in the :c:type:`pattern` and applies :c:type:`action` to those. To avoid consuming too much CPU time or IO resources for the :c:type:`action`, :c:type:`quota` is used.h](h For each }(hj5hhhNhNubj)}(h**apply_interval_us**h]happly_interval_us}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh', DAMON finds regions which fit in the }(hj5hhhNhNubh)}(h:c:type:`pattern`h]h)}(hj.5h]hpattern}(hj05hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj,5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjpatternuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj5ubh and applies }(hj5hhhNhNubh)}(h:c:type:`action`h]h)}(hjR5h]haction}(hjT5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjP5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhjK5hMhj5ubhH to those. To avoid consuming too much CPU time or IO resources for the }(hj5hhhNhNubh)}(h:c:type:`action`h]h)}(hju5h]haction}(hjw5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjs5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhjK5hMhj5ubh, }(hj5hhhNhNubh)}(h:c:type:`quota`h]h)}(hj5h]hquota}(hj5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjquotauh1hhjK5hMhj5ubh is used.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjK5hMhhhhubh)}(heIf **apply_interval_us** is zero, :c:type:`damon_attrs->aggr_interval ` is used instead.h](hIf }(hj5hhhNhNubj)}(h**apply_interval_us**h]happly_interval_us}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh is zero, }(hj5hhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hj5h]hdamon_attrs->aggr_interval}(hj5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj5ubh is used instead.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj5hMhhhhubh)}(hXTo do the work only when needed, schemes can be activated for specific system situations using :c:type:`wmarks`. If all schemes that registered to the monitoring context are inactive, DAMON stops monitoring either, and just repeatedly checks the watermarks.h](h_To do the work only when needed, schemes can be activated for specific system situations using }(hj6hhhNhNubh)}(h:c:type:`wmarks`h]h)}(hj 6h]hwmarks}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj 6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjwmarksuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj6ubh. If all schemes that registered to the monitoring context are inactive, DAMON stops monitoring either, and just repeatedly checks the watermarks.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj*6hMhhhhubh)}(h**migrate_dests** specifies multiple migration target nodes with different weights for migrate_hot or migrate_cold actions. **target_nid** is ignored if this is set.h](j)}(h**migrate_dests**h]h migrate_dests}(hj96hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj56ubhl specifies multiple migration target nodes with different weights for migrate_hot or migrate_cold actions. }(hj56hhhNhNubj)}(h**target_nid**h]h target_nid}(hjK6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj56ubh is ignored if this is set.}(hj56hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(h**target_nid** is used to set the migration target node for migrate_hot or migrate_cold actions, and **migrate_dests** is unset.h](j)}(h**target_nid**h]h target_nid}(hjh6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd6ubhW is used to set the migration target node for migrate_hot or migrate_cold actions, and }(hjd6hhhNhNubj)}(h**migrate_dests**h]h migrate_dests}(hjz6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd6ubh is unset.}(hjd6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hhhhubh)}(hBefore applying the :c:type:`action` to a memory region, :c:type:`struct damon_operations ` implementation could check pages of the region and skip :c:type:`action` to respect :c:type:`core_filters`h](hBefore applying the }(hj6hhhNhNubh)}(h:c:type:`action`h]h)}(hj6h]haction}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj6ubh to a memory region, }(hj6hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj6h]hstruct damon_operations}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj6hMhj6ubh9 implementation could check pages of the region and skip }(hj6hhhNhNubh)}(h:c:type:`action`h]h)}(hj6h]haction}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj6hMhj6ubh to respect }(hj6hhhNhNubh)}(h:c:type:`core_filters`h]h)}(hj7h]h core_filters}(hj 7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj core_filtersuh1hhj6hMhj6ubeh}(h]h ]h"]h$]h&]uh1hhj6hMhhhhubh)}(hXThe minimum entity that **action** can be applied depends on the underlying :c:type:`struct damon_operations `. Since it may not be aligned with the core layer abstract, namely :c:type:`struct damon_region `, :c:type:`struct damon_operations ` could apply **action** to same entity multiple times. Large folios that underlying on multiple :c:type:`struct damon ` region objects could be such examples. The :c:type:`struct damon_operations ` can use **last_applied** to avoid that. DAMOS core logic unsets **last_applied** when each regions walking for applying the scheme is finished.h](hThe minimum entity that }(hj*7hhhNhNubj)}(h **action**h]haction}(hj27hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*7ubh* can be applied depends on the underlying }(hj*7hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjF7h]hstruct damon_operations}(hjH7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjD7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*7ubhD. Since it may not be aligned with the core layer abstract, namely }(hj*7hhhNhNubh)}(h,:c:type:`struct damon_region `h]h)}(hjj7h]hstruct damon_region}(hjl7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjh7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhjc7hMhj*7ubh, }(hj*7hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj7h]hstruct damon_operations}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhjc7hMhj*7ubh could apply }(hj*7hhhNhNubj)}(h **action**h]haction}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*7ubhJ to same entity multiple times. Large folios that underlying on multiple }(hj*7hhhNhNubh)}(h:c:type:`struct damon `h]h)}(hj7h]h struct damon}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamonuh1hhjc7hMhj*7ubh- region objects could be such examples. The }(hj*7hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj7h]hstruct damon_operations}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhjc7hMhj*7ubh can use }(hj*7hhhNhNubj)}(h**last_applied**h]h last_applied}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*7ubh) to avoid that. DAMOS core logic unsets }(hj*7hhhNhNubj)}(h**last_applied**h]h last_applied}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*7ubh? when each regions walking for applying the scheme is finished.}(hj*7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjc7hMhhhhubh)}(hNAfter applying the :c:type:`action` to each region, :c:type:`stat` is updated.h](hAfter applying the }(hj08hhhNhNubh)}(h:c:type:`action`h]h)}(hj:8h]haction}(hj<8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj88ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj08ubh to each region, }(hj08hhhNhNubh)}(h:c:type:`stat`h]h)}(hj^8h]hstat}(hj`8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj\8ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjstatuh1hhjW8hMhj08ubh is updated.}(hj08hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjW8hMhhhhubh)}(hIf :c:type:`max_nr_snapshots` is set as non-zero and :c:type:`stat.nr_snapshots ` be same to or greater than it, the scheme is deactivated.h](hIf }(hj8hhhNhNubh)}(h:c:type:`max_nr_snapshots`h]h)}(hj8h]hmax_nr_snapshots}(hj8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmax_nr_snapshotsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj8ubh is set as non-zero and }(hj8hhhNhNubh)}(h":c:type:`stat.nr_snapshots `h]h)}(hj8h]hstat.nr_snapshots}(hj8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjstatuh1hhj8hMhj8ubh: be same to or greater than it, the scheme is deactivated.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj8hMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_ops_id (C enum)c.damon_ops_idhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damon_ops_idh]j.)}(henum damon_ops_idh](j4)}(hj h]henum}(hj8hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj8hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM#ubjF)}(h h]h }(hj9hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj8hhhj9hM#ubjW)}(h damon_ops_idh]j])}(hj8h]h damon_ops_id}(hj9hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj9ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj8hhhj9hM#ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj8hhhj9hM#ubah}(h]j8ah ](jjeh"]h$]h&]jj)jhuh1j'hj9hM#hj8hhubj)}(hhh]h)}(h8Identifier for each monitoring operations implementationh]h8Identifier for each monitoring operations implementation}(hj59hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMGhj29hhubah}(h]h ]h"]h$]h&]uh1jhj8hhhj9hM#ubeh}(h]h ](jenumeh"]h$]h&]jjjjM9jjM9jjjuh1j"hhhhhj!hNubj)}(hXE**Constants** ``DAMON_OPS_VADDR`` Monitoring operations for virtual address spaces ``DAMON_OPS_FVADDR`` Monitoring operations for only fixed ranges of virtual address spaces ``DAMON_OPS_PADDR`` Monitoring operations for the physical address space ``NR_DAMON_OPS`` Number of monitoring operations implementationsh](h)}(h **Constants**h]j)}(hjW9h]h Constants}(hjY9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU9ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMKhjQ9ubj#)}(hhh](j()}(hE``DAMON_OPS_VADDR`` Monitoring operations for virtual address spaces h](j.)}(h``DAMON_OPS_VADDR``h]h)}(hjv9h]hDAMON_OPS_VADDR}(hjx9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjt9ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMNhjp9ubjH)}(hhh]h)}(h0Monitoring operations for virtual address spacesh]h0Monitoring operations for virtual address spaces}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMNhj9ubah}(h]h ]h"]h$]h&]uh1jGhjp9ubeh}(h]h ]h"]h$]h&]uh1j'hj9hMNhjm9ubj()}(h[``DAMON_OPS_FVADDR`` Monitoring operations for only fixed ranges of virtual address spaces h](j.)}(h``DAMON_OPS_FVADDR``h]h)}(hj9h]hDAMON_OPS_FVADDR}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMRhj9ubjH)}(hhh]h)}(hEMonitoring operations for only fixed ranges of virtual address spacesh]hEMonitoring operations for only fixed ranges of virtual address spaces}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMQhj9ubah}(h]h ]h"]h$]h&]uh1jGhj9ubeh}(h]h ]h"]h$]h&]uh1j'hj9hMRhjm9ubj()}(hI``DAMON_OPS_PADDR`` Monitoring operations for the physical address space h](j.)}(h``DAMON_OPS_PADDR``h]h)}(hj9h]hDAMON_OPS_PADDR}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMUhj9ubjH)}(hhh]h)}(h4Monitoring operations for the physical address spaceh]h4Monitoring operations for the physical address space}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMUhj9ubah}(h]h ]h"]h$]h&]uh1jGhj9ubeh}(h]h ]h"]h$]h&]uh1j'hj9hMUhjm9ubj()}(h@``NR_DAMON_OPS`` Number of monitoring operations implementationsh](j.)}(h``NR_DAMON_OPS``h]h)}(hj":h]h NR_DAMON_OPS}(hj$:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj :ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMWhj:ubjH)}(hhh]h)}(h/Number of monitoring operations implementationsh]h/Number of monitoring operations implementations}(hj;:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMXhj8:ubah}(h]h ]h"]h$]h&]uh1jGhj:ubeh}(h]h ]h"]h$]h&]uh1j'hj7:hMWhjm9ubeh}(h]h ]h"]h$]h&]uh1j"hjQ9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_operations (C struct)c.damon_operationshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamon_operationsh]j.)}(hstruct damon_operationsh](j4)}(hj7h]hstruct}(hj|:hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjx:hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM]ubjF)}(h h]h }(hj:hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjx:hhhj:hM]ubjW)}(hdamon_operationsh]j])}(hjv:h]hdamon_operations}(hj:hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj:ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjx:hhhj:hM]ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjt:hhhj:hM]ubah}(h]jo:ah ](jjeh"]h$]h&]jj)jhuh1j'hj:hM]hjq:hhubj)}(hhh]h)}(h*Monitoring operations for given use cases.h]h*Monitoring operations for given use cases.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMWhj:hhubah}(h]h ]h"]h$]h&]uh1jhjq:hhhj:hM]ubeh}(h]h ](jstructeh"]h$]h&]jjjj:jj:jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_operations { enum damon_ops_id id; void (*init)(struct damon_ctx *context); void (*update)(struct damon_ctx *context); void (*prepare_access_checks)(struct damon_ctx *context); unsigned int (*check_accesses)(struct damon_ctx *context); int (*get_scheme_score)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme); unsigned long (*apply_scheme)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme, unsigned long *sz_filter_passed); bool (*target_valid)(struct damon_target *t); void (*cleanup_target)(struct damon_target *t); }; **Members** ``id`` Identifier of this operations set. ``init`` Initialize operations-related data structures. ``update`` Update operations-related data structures. ``prepare_access_checks`` Prepare next access check of target regions. ``check_accesses`` Check the accesses to target regions. ``get_scheme_score`` Get the score of a region for a scheme. ``apply_scheme`` Apply a DAMON-based operation scheme. ``target_valid`` Determine if the target is valid. ``cleanup_target`` Clean up each target before deallocation.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh:}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM[hj:ubj)}(hXstruct damon_operations { enum damon_ops_id id; void (*init)(struct damon_ctx *context); void (*update)(struct damon_ctx *context); void (*prepare_access_checks)(struct damon_ctx *context); unsigned int (*check_accesses)(struct damon_ctx *context); int (*get_scheme_score)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme); unsigned long (*apply_scheme)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme, unsigned long *sz_filter_passed); bool (*target_valid)(struct damon_target *t); void (*cleanup_target)(struct damon_target *t); };h]hXstruct damon_operations { enum damon_ops_id id; void (*init)(struct damon_ctx *context); void (*update)(struct damon_ctx *context); void (*prepare_access_checks)(struct damon_ctx *context); unsigned int (*check_accesses)(struct damon_ctx *context); int (*get_scheme_score)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme); unsigned long (*apply_scheme)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme, unsigned long *sz_filter_passed); bool (*target_valid)(struct damon_target *t); void (*cleanup_target)(struct damon_target *t); };}hj:sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM]hj:ubh)}(h **Members**h]j)}(hj ;h]hMembers}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ;ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMihj:ubj#)}(hhh](j()}(h*``id`` Identifier of this operations set. h](j.)}(h``id``h]h)}(hj+;h]hid}(hj-;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj);ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMZhj%;ubjH)}(hhh]h)}(h"Identifier of this operations set.h]h"Identifier of this operations set.}(hjD;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@;hMZhjA;ubah}(h]h ]h"]h$]h&]uh1jGhj%;ubeh}(h]h ]h"]h$]h&]uh1j'hj@;hMZhj";ubj()}(h8``init`` Initialize operations-related data structures. h](j.)}(h``init``h]h)}(hjd;h]hinit}(hjf;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM[hj^;ubjH)}(hhh]h)}(h.Initialize operations-related data structures.h]h.Initialize operations-related data structures.}(hj};hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy;hM[hjz;ubah}(h]h ]h"]h$]h&]uh1jGhj^;ubeh}(h]h ]h"]h$]h&]uh1j'hjy;hM[hj";ubj()}(h6``update`` Update operations-related data structures. h](j.)}(h ``update``h]h)}(hj;h]hupdate}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM\hj;ubjH)}(hhh]h)}(h*Update operations-related data structures.h]h*Update operations-related data structures.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hM\hj;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj;hM\hj";ubj()}(hG``prepare_access_checks`` Prepare next access check of target regions. h](j.)}(h``prepare_access_checks``h]h)}(hj;h]hprepare_access_checks}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM]hj;ubjH)}(hhh]h)}(h,Prepare next access check of target regions.h]h,Prepare next access check of target regions.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hM]hj;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj;hM]hj";ubj()}(h9``check_accesses`` Check the accesses to target regions. h](j.)}(h``check_accesses``h]h)}(hj<h]hcheck_accesses}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj <ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM^hj <ubjH)}(hhh]h)}(h%Check the accesses to target regions.h]h%Check the accesses to target regions.}(hj(<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$<hM^hj%<ubah}(h]h ]h"]h$]h&]uh1jGhj <ubeh}(h]h ]h"]h$]h&]uh1j'hj$<hM^hj";ubj()}(h=``get_scheme_score`` Get the score of a region for a scheme. h](j.)}(h``get_scheme_score``h]h)}(hjH<h]hget_scheme_score}(hjJ<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF<ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM_hjB<ubjH)}(hhh]h)}(h'Get the score of a region for a scheme.h]h'Get the score of a region for a scheme.}(hja<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]<hM_hj^<ubah}(h]h ]h"]h$]h&]uh1jGhjB<ubeh}(h]h ]h"]h$]h&]uh1j'hj]<hM_hj";ubj()}(h7``apply_scheme`` Apply a DAMON-based operation scheme. h](j.)}(h``apply_scheme``h]h)}(hj<h]h apply_scheme}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM`hj{<ubjH)}(hhh]h)}(h%Apply a DAMON-based operation scheme.h]h%Apply a DAMON-based operation scheme.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hM`hj<ubah}(h]h ]h"]h$]h&]uh1jGhj{<ubeh}(h]h ]h"]h$]h&]uh1j'hj<hM`hj";ubj()}(h3``target_valid`` Determine if the target is valid. h](j.)}(h``target_valid``h]h)}(hj<h]h target_valid}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMahj<ubjH)}(hhh]h)}(h!Determine if the target is valid.h]h!Determine if the target is valid.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hMahj<ubah}(h]h ]h"]h$]h&]uh1jGhj<ubeh}(h]h ]h"]h$]h&]uh1j'hj<hMahj";ubj()}(h<``cleanup_target`` Clean up each target before deallocation.h](j.)}(h``cleanup_target``h]h)}(hj<h]hcleanup_target}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMahj<ubjH)}(hhh]h)}(h)Clean up each target before deallocation.h]h)Clean up each target before deallocation.}(hj =hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMbhj =ubah}(h]h ]h"]h$]h&]uh1jGhj<ubeh}(h]h ]h"]h$]h&]uh1j'hj=hMahj";ubeh}(h]h ]h"]h$]h&]uh1j"hj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj6=h]h Description}(hj8=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4=ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMehhhhubh)}(hX8DAMON can be extended for various address spaces and usages. For this, users should register the low level operations for their target address space and usecase via the :c:type:`damon_ctx.ops `. Then, the monitoring thread (:c:type:`damon_ctx.kdamond `) calls **init** and **prepare_access_checks** before starting the monitoring, **update** after each :c:type:`damon_attrs.ops_update_interval `, and **check_accesses**, **target_valid** and **prepare_access_checks** after each :c:type:`damon_attrs.sample_interval `.h](hDAMON can be extended for various address spaces and usages. For this, users should register the low level operations for their target address space and usecase via the }(hjL=hhhNhNubh)}(h#:c:type:`damon_ctx.ops `h]h)}(hjV=h]h damon_ctx.ops}(hjX=hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjT=ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMbhjL=ubh . Then, the monitoring thread (}(hjL=hhhNhNubh)}(h':c:type:`damon_ctx.kdamond `h]h)}(hjz=h]hdamon_ctx.kdamond}(hj|=hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjx=ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhjs=hMbhjL=ubh) calls }(hjL=hhhNhNubj)}(h**init**h]hinit}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL=ubh and }(hjL=hhhNhNubj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL=ubh! before starting the monitoring, }(hjL=hhhNhNubj)}(h **update**h]hupdate}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL=ubh after each }(hjL=hhhNhNubh)}(h7:c:type:`damon_attrs.ops_update_interval `h]h)}(hj=h]hdamon_attrs.ops_update_interval}(hj=hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj=ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjs=hMbhjL=ubh, and }(hjL=hhhNhNubj)}(h**check_accesses**h]hcheck_accesses}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL=ubh, }(hjL=hhhNhNubj)}(h**target_valid**h]h target_valid}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL=ubh and }hjL=sbj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL=ubh after each }(hjL=hhhNhNubh)}(h3:c:type:`damon_attrs.sample_interval `h]h)}(hj,>h]hdamon_attrs.sample_interval}(hj.>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj*>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjs=hMbhjL=ubh.}(hjL=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjs=hMbhhhhubh)}(hX7Each :c:type:`struct damon_operations ` instance having valid **id** can be registered via damon_register_ops() and selected by damon_select_ops() later. **init** should initialize operations-related data structures. For example, this could be used to construct proper monitoring target regions and link those to **damon_ctx.adaptive_targets**. **update** should update the operations-related data structures. For example, this could be used to update monitoring target regions for current status. **prepare_access_checks** should manipulate the monitoring regions to be prepared for the next access check. **check_accesses** should check the accesses to each region that made after the last preparation and update the number of observed accesses of each region. It should also return max number of observed accesses that made as a result of its update. The value will be used for regions adjustment threshold. **get_scheme_score** should return the priority score of a region for a scheme as an integer in [0, :c:type:`DAMOS_MAX_SCORE`]. **apply_scheme** is called from **kdamond** when a region for user provided DAMON-based operation scheme is found. It should apply the scheme's action to the region and return bytes of the region that the action is successfully applied. It should also report how many bytes of the region has passed filters (:c:type:`struct damos_filter `) that handled by itself. **target_valid** should check whether the target is still valid for the monitoring. **cleanup_target** is called before the target will be deallocated.h](hEach }(hjS>hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj]>h]hstruct damon_operations}(hj_>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj[>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMjhjS>ubh instance having valid }(hjS>hhhNhNubj)}(h**id**h]hid}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubhV can be registered via damon_register_ops() and selected by damon_select_ops() later. }(hjS>hhhNhNubj)}(h**init**h]hinit}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubh should initialize operations-related data structures. For example, this could be used to construct proper monitoring target regions and link those to }(hjS>hhhNhNubj)}(h**damon_ctx.adaptive_targets**h]hdamon_ctx.adaptive_targets}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubh. }(hjS>hhhNhNubj)}(h **update**h]hupdate}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubh should update the operations-related data structures. For example, this could be used to update monitoring target regions for current status. }(hjS>hhhNhNubj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubhT should manipulate the monitoring regions to be prepared for the next access check. }(hjS>hhhNhNubj)}(h**check_accesses**h]hcheck_accesses}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubhX should check the accesses to each region that made after the last preparation and update the number of observed accesses of each region. It should also return max number of observed accesses that made as a result of its update. The value will be used for regions adjustment threshold. }(hjS>hhhNhNubj)}(h**get_scheme_score**h]hget_scheme_score}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubhP should return the priority score of a region for a scheme as an integer in [0, }(hjS>hhhNhNubh)}(h:c:type:`DAMOS_MAX_SCORE`h]h)}(hj>h]hDAMOS_MAX_SCORE}(hj?hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_MAX_SCOREuh1hhjz>hMjhjS>ubh]. }(hjS>hhhNhNubj)}(h**apply_scheme**h]h apply_scheme}(hj ?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubh is called from }(hjS>hhhNhNubj)}(h **kdamond**h]hkdamond}(hj2?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubhX  when a region for user provided DAMON-based operation scheme is found. It should apply the scheme’s action to the region and return bytes of the region that the action is successfully applied. It should also report how many bytes of the region has passed filters (}(hjS>hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hjF?h]hstruct damos_filter}(hjH?hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjD?ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhjz>hMjhjS>ubh) that handled by itself. }(hjS>hhhNhNubj)}(h**target_valid**h]h target_valid}(hjg?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubhD should check whether the target is still valid for the monitoring. }(hjS>hhhNhNubj)}(h**cleanup_target**h]hcleanup_target}(hjy?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubh1 is called before the target will be deallocated.}(hjS>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjz>hMjhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_intervals_goal (C struct)c.damon_intervals_goalhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamon_intervals_goalh]j.)}(hstruct damon_intervals_goalh](j4)}(hj7h]hstruct}(hj?hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj?hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj?hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj?hhhj?hMubjW)}(hdamon_intervals_goalh]j])}(hj?h]hdamon_intervals_goal}(hj?hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj?ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj?hhhj?hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj?hhhj?hMubah}(h]j?ah ](jjeh"]h$]h&]jj)jhuh1j'hj?hMhj?hhubj)}(hhh]h)}(h&Monitoring intervals auto-tuning goal.h]h&Monitoring intervals auto-tuning goal.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj?hhubah}(h]h ]h"]h$]h&]uh1jhj?hhhj?hMubeh}(h]h ](jstructeh"]h$]h&]jjjj@jj@jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_intervals_goal { unsigned long access_bp; unsigned long aggrs; unsigned long min_sample_us; unsigned long max_sample_us; }; **Members** ``access_bp`` Access events observation ratio to achieve in bp. ``aggrs`` Number of aggregations to achieve **access_bp** within. ``min_sample_us`` Minimum resulting sampling interval in microseconds. ``max_sample_us`` Maximum resulting sampling interval in microseconds.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj @ubh:}(hj @hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj@ubj)}(hstruct damon_intervals_goal { unsigned long access_bp; unsigned long aggrs; unsigned long min_sample_us; unsigned long max_sample_us; };h]hstruct damon_intervals_goal { unsigned long access_bp; unsigned long aggrs; unsigned long min_sample_us; unsigned long max_sample_us; };}hj)@sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj@ubh)}(h **Members**h]j)}(hj:@h]hMembers}(hj<@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8@ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj@ubj#)}(hhh](j()}(h@``access_bp`` Access events observation ratio to achieve in bp. h](j.)}(h ``access_bp``h]h)}(hjY@h]h access_bp}(hj[@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjW@ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjS@ubjH)}(hhh]h)}(h1Access events observation ratio to achieve in bp.h]h1Access events observation ratio to achieve in bp.}(hjr@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjn@hMhjo@ubah}(h]h ]h"]h$]h&]uh1jGhjS@ubeh}(h]h ]h"]h$]h&]uh1j'hjn@hMhjP@ubj()}(hB``aggrs`` Number of aggregations to achieve **access_bp** within. h](j.)}(h ``aggrs``h]h)}(hj@h]haggrs}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj@ubjH)}(hhh]h)}(h7Number of aggregations to achieve **access_bp** within.h](h"Number of aggregations to achieve }(hj@hhhNhNubj)}(h **access_bp**h]h access_bp}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh within.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jGhj@ubeh}(h]h ]h"]h$]h&]uh1j'hj@hMhjP@ubj()}(hG``min_sample_us`` Minimum resulting sampling interval in microseconds. h](j.)}(h``min_sample_us``h]h)}(hj@h]h min_sample_us}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj@ubjH)}(hhh]h)}(h4Minimum resulting sampling interval in microseconds.h]h4Minimum resulting sampling interval in microseconds.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jGhj@ubeh}(h]h ]h"]h$]h&]uh1j'hj@hMhjP@ubj()}(hF``max_sample_us`` Maximum resulting sampling interval in microseconds.h](j.)}(h``max_sample_us``h]h)}(hjAh]h max_sample_us}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjAubjH)}(hhh]h)}(h4Maximum resulting sampling interval in microseconds.h]h4Maximum resulting sampling interval in microseconds.}(hj/AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,Aubah}(h]h ]h"]h$]h&]uh1jGhjAubeh}(h]h ]h"]h$]h&]uh1j'hj+AhMhjP@ubeh}(h]h ]h"]h$]h&]uh1j"hj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjYAh]h Description}(hj[AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWAubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hX'DAMON automatically tunes :c:type:`damon_attrs->sample_interval ` and :c:type:`damon_attrs->aggr_interval ` aiming the ratio in bp (1/10,000) of DAMON-observed access events to theoretical maximum amount within **aggrs** aggregations be same to **access_bp**. The logic increases :c:type:`damon_attrs->aggr_interval ` and :c:type:`damon_attrs->sampling_interval ` in same ratio if the current access events observation ratio is lower than the target for each **aggrs** aggregations, and vice versa.h](hDAMON automatically tunes }(hjoAhhhNhNubh)}(h4:c:type:`damon_attrs->sample_interval `h]h)}(hjyAh]hdamon_attrs->sample_interval}(hj{AhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjwAubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjoAubh and }(hjoAhhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hjAh]hdamon_attrs->aggr_interval}(hjAhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjAubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjAhMhjoAubhh aiming the ratio in bp (1/10,000) of DAMON-observed access events to theoretical maximum amount within }(hjoAhhhNhNubj)}(h **aggrs**h]haggrs}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoAubh aggregations be same to }(hjoAhhhNhNubj)}(h **access_bp**h]h access_bp}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoAubh. The logic increases }(hjoAhhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hjAh]hdamon_attrs->aggr_interval}(hjAhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjAubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjAhMhjoAubh and }(hjoAhhhNhNubh)}(h6:c:type:`damon_attrs->sampling_interval `h]h)}(hjBh]hdamon_attrs->sampling_interval}(hj BhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjAhMhjoAubh` in same ratio if the current access events observation ratio is lower than the target for each }(hjoAhhhNhNubj)}(h **aggrs**h]haggrs}(hj(BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoAubh aggregations, and vice versa.}(hjoAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjAhMhhhhubh)}(hNIf **aggrs** is zero, the tuning is disabled and hence this struct is ignored.h](hIf }(hj@BhhhNhNubj)}(h **aggrs**h]haggrs}(hjHBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@BubhB is zero, the tuning is disabled and hence this struct is ignored.}(hj@BhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_attrs (C struct) c.damon_attrshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damon_attrsh]j.)}(hstruct damon_attrsh](j4)}(hj7h]hstruct}(hjzBhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjvBhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjBhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjvBhhhjBhMubjW)}(h damon_attrsh]j])}(hjtBh]h damon_attrs}(hjBhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjBubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjvBhhhjBhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjrBhhhjBhMubah}(h]jmBah ](jjeh"]h$]h&]jj)jhuh1j'hjBhMhjoBhhubj)}(hhh]h)}(h4Monitoring attributes for accuracy/overhead control.h]h4Monitoring attributes for accuracy/overhead control.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBhhubah}(h]h ]h"]h$]h&]uh1jhjoBhhhjBhMubeh}(h]h ](jstructeh"]h$]h&]jjjjBjjBjjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_attrs { unsigned long sample_interval; unsigned long aggr_interval; unsigned long ops_update_interval; struct damon_intervals_goal intervals_goal; unsigned long min_nr_regions; unsigned long max_nr_regions; }; **Members** ``sample_interval`` The time between access samplings. ``aggr_interval`` The time between monitor results aggregations. ``ops_update_interval`` The time between monitoring operations updates. ``intervals_goal`` Intervals auto-tuning goal. ``min_nr_regions`` The minimum number of adaptive monitoring regions. ``max_nr_regions`` The maximum number of adaptive monitoring regions.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh:}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBubj)}(hstruct damon_attrs { unsigned long sample_interval; unsigned long aggr_interval; unsigned long ops_update_interval; struct damon_intervals_goal intervals_goal; unsigned long min_nr_regions; unsigned long max_nr_regions; };h]hstruct damon_attrs { unsigned long sample_interval; unsigned long aggr_interval; unsigned long ops_update_interval; struct damon_intervals_goal intervals_goal; unsigned long min_nr_regions; unsigned long max_nr_regions; };}hjBsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBubh)}(h **Members**h]j)}(hj Ch]hMembers}(hj ChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBubj#)}(hhh](j()}(h7``sample_interval`` The time between access samplings. h](j.)}(h``sample_interval``h]h)}(hj)Ch]hsample_interval}(hj+ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'Cubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj#CubjH)}(hhh]h)}(h"The time between access samplings.h]h"The time between access samplings.}(hjBChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>ChMhj?Cubah}(h]h ]h"]h$]h&]uh1jGhj#Cubeh}(h]h ]h"]h$]h&]uh1j'hj>ChMhj Cubj()}(hA``aggr_interval`` The time between monitor results aggregations. h](j.)}(h``aggr_interval``h]h)}(hjbCh]h aggr_interval}(hjdChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`Cubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj\CubjH)}(hhh]h)}(h.The time between monitor results aggregations.h]h.The time between monitor results aggregations.}(hj{ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwChMhjxCubah}(h]h ]h"]h$]h&]uh1jGhj\Cubeh}(h]h ]h"]h$]h&]uh1j'hjwChMhj Cubj()}(hH``ops_update_interval`` The time between monitoring operations updates. h](j.)}(h``ops_update_interval``h]h)}(hjCh]hops_update_interval}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjCubjH)}(hhh]h)}(h/The time between monitoring operations updates.h]h/The time between monitoring operations updates.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjCubah}(h]h ]h"]h$]h&]uh1jGhjCubeh}(h]h ]h"]h$]h&]uh1j'hjChMhj Cubj()}(h/``intervals_goal`` Intervals auto-tuning goal. h](j.)}(h``intervals_goal``h]h)}(hjCh]hintervals_goal}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjCubjH)}(hhh]h)}(hIntervals auto-tuning goal.h]hIntervals auto-tuning goal.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjCubah}(h]h ]h"]h$]h&]uh1jGhjCubeh}(h]h ]h"]h$]h&]uh1j'hjChMhj Cubj()}(hF``min_nr_regions`` The minimum number of adaptive monitoring regions. h](j.)}(h``min_nr_regions``h]h)}(hj Dh]hmin_nr_regions}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj Dubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjDubjH)}(hhh]h)}(h2The minimum number of adaptive monitoring regions.h]h2The minimum number of adaptive monitoring regions.}(hj&DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj#Dubah}(h]h ]h"]h$]h&]uh1jGhjDubeh}(h]h ]h"]h$]h&]uh1j'hj"DhMhj Cubj()}(hE``max_nr_regions`` The maximum number of adaptive monitoring regions.h](j.)}(h``max_nr_regions``h]h)}(hjGDh]hmax_nr_regions}(hjIDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEDubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjADubjH)}(hhh]h)}(h2The maximum number of adaptive monitoring regions.h]h2The maximum number of adaptive monitoring regions.}(hj`DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\DhMhj]Dubah}(h]h ]h"]h$]h&]uh1jGhjADubeh}(h]h ]h"]h$]h&]uh1j'hj\DhMhj Cubeh}(h]h ]h"]h$]h&]uh1j"hjBubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjDh]h Description}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hXFor each **sample_interval**, DAMON checks whether each region is accessed or not during the last **sample_interval**. If such access is found, DAMON aggregates the information by increasing :c:type:`damon_region->nr_accesses ` for **aggr_interval** time. For each **aggr_interval**, the count is reset. DAMON also checks whether the target memory regions need update (e.g., by ``mmap()`` calls from the application, in case of virtual memory monitoring) and applies the changes for each **ops_update_interval**. All time intervals are in micro-seconds. Please refer to :c:type:`struct damon_operations ` and :c:type:`struct damon_call_control ` for more detail.h](h For each }(hjDhhhNhNubj)}(h**sample_interval**h]hsample_interval}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubhF, DAMON checks whether each region is accessed or not during the last }(hjDhhhNhNubj)}(h**sample_interval**h]hsample_interval}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubhK. If such access is found, DAMON aggregates the information by increasing }(hjDhhhNhNubh)}(h2:c:type:`damon_region->nr_accesses `h]h)}(hjDh]hdamon_region->nr_accesses}(hjDhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjDubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjDubh for }(hjDhhhNhNubj)}(h**aggr_interval**h]h aggr_interval}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh time. For each }(hjDhhhNhNubj)}(h**aggr_interval**h]h aggr_interval}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubha, the count is reset. DAMON also checks whether the target memory regions need update (e.g., by }(hjDhhhNhNubh)}(h ``mmap()``h]hmmap()}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDubhd calls from the application, in case of virtual memory monitoring) and applies the changes for each }(hjDhhhNhNubj)}(h**ops_update_interval**h]hops_update_interval}(hj%EhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh=. All time intervals are in micro-seconds. Please refer to }(hjDhhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj9Eh]hstruct damon_operations}(hj;EhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj7Eubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhjDhMhjDubh and }(hjDhhhNhNubh)}(h8:c:type:`struct damon_call_control `h]h)}(hj\Eh]hstruct damon_call_control}(hj^EhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjZEubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjDhMhjDubh for more detail.}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjDhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_ctx (C struct) c.damon_ctxhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damon_ctxh]j.)}(hstruct damon_ctxh](j4)}(hj7h]hstruct}(hjEhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjEhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjEhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjEhhhjEhMubjW)}(h damon_ctxh]j])}(hjEh]h damon_ctx}(hjEhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjEubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjEhhhjEhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjEhhhjEhMubah}(h]jEah ](jjeh"]h$]h&]jj)jhuh1j'hjEhMhjEhhubj)}(hhh]h)}(hRepresents a context for each monitoring. This is the main interface that allows users to set the attributes and get the results of the monitoring.h]hRepresents a context for each monitoring. This is the main interface that allows users to set the attributes and get the results of the monitoring.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjEhhubah}(h]h ]h"]h$]h&]uh1jhjEhhhjEhMubeh}(h]h ](jstructeh"]h$]h&]jjjjEjjEjjjuh1j"hhhhhj!hNubj)}(hXz**Definition**:: struct damon_ctx { struct damon_attrs attrs; struct damon_operations ops; unsigned long addr_unit; unsigned long min_region_sz; struct list_head adaptive_targets; struct list_head schemes; }; **Members** ``attrs`` Monitoring attributes for accuracy/overhead control. ``ops`` Set of monitoring operations for given use cases. ``addr_unit`` Scale factor for core to ops address conversion. ``min_region_sz`` Minimum region size. ``adaptive_targets`` Head of monitoring targets (:c:type:`damon_target`) list. ``schemes`` Head of schemes (:c:type:`damos`) list.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh:}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjEubj)}(hstruct damon_ctx { struct damon_attrs attrs; struct damon_operations ops; unsigned long addr_unit; unsigned long min_region_sz; struct list_head adaptive_targets; struct list_head schemes; };h]hstruct damon_ctx { struct damon_attrs attrs; struct damon_operations ops; unsigned long addr_unit; unsigned long min_region_sz; struct list_head adaptive_targets; struct list_head schemes; };}hjFsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjEubh)}(h **Members**h]j)}(hj,Fh]hMembers}(hj.FhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*Fubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjEubj#)}(hhh](j()}(h?``attrs`` Monitoring attributes for accuracy/overhead control. h](j.)}(h ``attrs``h]h)}(hjKFh]hattrs}(hjMFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIFubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjEFubjH)}(hhh]h)}(h4Monitoring attributes for accuracy/overhead control.h]h4Monitoring attributes for accuracy/overhead control.}(hjdFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`FhMhjaFubah}(h]h ]h"]h$]h&]uh1jGhjEFubeh}(h]h ]h"]h$]h&]uh1j'hj`FhMhjBFubj()}(h:``ops`` Set of monitoring operations for given use cases. h](j.)}(h``ops``h]h)}(hjFh]hops}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj~FubjH)}(hhh]h)}(h1Set of monitoring operations for given use cases.h]h1Set of monitoring operations for given use cases.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jGhj~Fubeh}(h]h ]h"]h$]h&]uh1j'hjFhMhjBFubj()}(h?``addr_unit`` Scale factor for core to ops address conversion. h](j.)}(h ``addr_unit``h]h)}(hjFh]h addr_unit}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjFubjH)}(hhh]h)}(h0Scale factor for core to ops address conversion.h]h0Scale factor for core to ops address conversion.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jGhjFubeh}(h]h ]h"]h$]h&]uh1j'hjFhMhjBFubj()}(h'``min_region_sz`` Minimum region size. h](j.)}(h``min_region_sz``h]h)}(hjFh]h min_region_sz}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hjFubjH)}(hhh]h)}(hMinimum region size.h]hMinimum region size.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj GhM hj Gubah}(h]h ]h"]h$]h&]uh1jGhjFubeh}(h]h ]h"]h$]h&]uh1j'hj GhM hjBFubj()}(hO``adaptive_targets`` Head of monitoring targets (:c:type:`damon_target`) list. h](j.)}(h``adaptive_targets``h]h)}(hj/Gh]hadaptive_targets}(hj1GhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-Gubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hj)GubjH)}(hhh]h)}(h9Head of monitoring targets (:c:type:`damon_target`) list.h](hHead of monitoring targets (}(hjHGhhhNhNubh)}(h:c:type:`damon_target`h]h)}(hjRGh]h damon_target}(hjTGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjPGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_targetuh1hhjDGhM hjHGubh) list.}(hjHGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjDGhM hjEGubah}(h]h ]h"]h$]h&]uh1jGhj)Gubeh}(h]h ]h"]h$]h&]uh1j'hjDGhM hjBFubj()}(h3``schemes`` Head of schemes (:c:type:`damos`) list.h](j.)}(h ``schemes``h]h)}(hjGh]hschemes}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hjGubjH)}(hhh]h)}(h'Head of schemes (:c:type:`damos`) list.h](hHead of schemes (}(hjGhhhNhNubh)}(h:c:type:`damos`h]h)}(hjGh]hdamos}(hjGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hjGubh) list.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjGhM hjGubah}(h]h ]h"]h$]h&]uh1jGhjGubeh}(h]h ]h"]h$]h&]uh1j'hjGhM hjBFubeh}(h]h ]h"]h$]h&]uh1j"hjEubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjGh]h Description}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hFor each monitoring context, one kernel thread for the monitoring, namely kdamond, is created. The pid of kdamond can be retrieved using damon_kdamond_pid().h]hFor each monitoring context, one kernel thread for the monitoring, namely kdamond, is created. The pid of kdamond can be retrieved using damon_kdamond_pid().}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hXpOnce started, kdamond runs until explicitly required to be terminated or every monitoring target is invalid. The validity of the targets is checked via the :c:type:`damon_operations.target_valid ` of **ops**. The termination can also be explicitly requested by calling damon_stop(). To know if a kdamond is running, damon_is_running() can be used.h](hOnce started, kdamond runs until explicitly required to be terminated or every monitoring target is invalid. The validity of the targets is checked via the }(hjHhhhNhNubh)}(h::c:type:`damon_operations.target_valid `h]h)}(hj Hh]hdamon_operations.target_valid}(hj"HhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjHubh of }(hjHhhhNhNubj)}(h**ops**h]hops}(hjBHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh. The termination can also be explicitly requested by calling damon_stop(). To know if a kdamond is running, damon_is_running() can be used.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj=HhMhhhhubh)}(hWhile the kdamond is running, all accesses to :c:type:`struct damon_ctx ` from a thread other than the kdamond should be made using safe DAMON APIs, including damon_call() and damos_walk().h](h.While the kdamond is running, all accesses to }(hjZHhhhNhNubh)}(h&:c:type:`struct damon_ctx `h]h)}(hjdHh]hstruct damon_ctx}(hjfHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjbHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjZHubht from a thread other than the kdamond should be made using safe DAMON APIs, including damon_call() and damos_walk().}(hjZHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHhMhhhhubeh}(h] structuresah ]h"] structuresah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Functionsh]h Functions}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$damon_is_registered_ops (C function)c.damon_is_registered_opshNtauh1jhjHhhhNhNubj#)}(hhh](j()}(h3bool damon_is_registered_ops (enum damon_ops_id id)h]j.)}(h2bool damon_is_registered_ops(enum damon_ops_id id)h](hdesc_sig_keyword_type)}(hboolh]hbool}(hjHhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jHhjHhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK+ubjF)}(h h]h }(hjHhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjHhhhjHhK+ubjW)}(hdamon_is_registered_opsh]j])}(hdamon_is_registered_opsh]hdamon_is_registered_ops}(hjHhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjHubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjHhhhjHhK+ubhdesc_parameterlist)}(h(enum damon_ops_id id)h]hdesc_parameter)}(henum damon_ops_id idh](j4)}(hj h]henum}(hjIhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjHubjF)}(h h]h }(hjIhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjHubh)}(hhh]j])}(h damon_ops_idh]h damon_ops_id}(hj IhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjIubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetj"ImodnameN classnameNjj)}j]j")}j"jHsbc.damon_is_registered_opsasbuh1hhjHubjF)}(h h]h }(hj@IhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjHubj])}(hidh]hid}(hjNIhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjHubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjHubah}(h]h ]h"]h$]h&]hhuh1jHhjHhhhjHhK+ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjHhhhjHhK+ubah}(h]jHah ](jjeh"]h$]h&]jj)jhuh1j'hjHhK+hjHhhubj)}(hhh]h)}(h0Check if a given damon_operations is registered.h]h0Check if a given damon_operations is registered.}(hjxIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK+hjuIhhubah}(h]h ]h"]h$]h&]uh1jhjHhhhjHhK+ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjIjjIjjjuh1j"hhhjHhNhNubj)}(h**Parameters** ``enum damon_ops_id id`` Id of the damon_operations to check if registered. **Return** true if the ops is set, false otherwise.h](h)}(h**Parameters**h]j)}(hjIh]h Parameters}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK/hjIubj#)}(hhh]j()}(hL``enum damon_ops_id id`` Id of the damon_operations to check if registered. h](j.)}(h``enum damon_ops_id id``h]h)}(hjIh]henum damon_ops_id id}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK,hjIubjH)}(hhh]h)}(h2Id of the damon_operations to check if registered.h]h2Id of the damon_operations to check if registered.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhK,hjIubah}(h]h ]h"]h$]h&]uh1jGhjIubeh}(h]h ]h"]h$]h&]uh1j'hjIhK,hjIubah}(h]h ]h"]h$]h&]uh1j"hjIubh)}(h **Return**h]j)}(hjIh]hReturn}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK.hjIubh)}(h(true if the ops is set, false otherwise.h]h(true if the ops is set, false otherwise.}(hj JhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK.hjIubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_register_ops (C function)c.damon_register_opshNtauh1jhjHhhhNhNubj#)}(hhh](j()}(h5int damon_register_ops (struct damon_operations *ops)h]j.)}(h4int damon_register_ops(struct damon_operations *ops)h](jH)}(hinth]hint}(hj9JhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj5JhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK=ubjF)}(h h]h }(hjHJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj5JhhhjGJhK=ubjW)}(hdamon_register_opsh]j])}(hdamon_register_opsh]hdamon_register_ops}(hjZJhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjVJubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj5JhhhjGJhK=ubjH)}(h(struct damon_operations *ops)h]jH)}(hstruct damon_operations *opsh](j4)}(hj7h]hstruct}(hjvJhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjrJubjF)}(h h]h }(hjJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjrJubh)}(hhh]j])}(hdamon_operationsh]hdamon_operations}(hjJhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjJubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjJmodnameN classnameNjj)}j]j")}j"j\Jsbc.damon_register_opsasbuh1hhjrJubjF)}(h h]h }(hjJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjrJubhdesc_sig_punctuation)}(h*h]h*}(hjJhhhNhNubah}(h]h ]pah"]h$]h&]uh1jJhjrJubj])}(hopsh]hops}(hjJhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjrJubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjnJubah}(h]h ]h"]h$]h&]hhuh1jHhj5JhhhjGJhK=ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj1JhhhjGJhK=ubah}(h]j,Jah ](jjeh"]h$]h&]jj)jhuh1j'hjGJhK=hj.Jhhubj)}(hhh]h)}(h.Register a monitoring operations set to DAMON.h]h.Register a monitoring operations set to DAMON.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK=hjJhhubah}(h]h ]h"]h$]h&]uh1jhj.JhhhjGJhK=ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjKjjKjjjuh1j"hhhjHhNhNubj)}(hXG**Parameters** ``struct damon_operations *ops`` monitoring operations set to register. **Description** This function registers a monitoring operations set of valid :c:type:`struct damon_operations `->id so that others can find and use them later. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjKh]h Parameters}(hj!KhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKAhjKubj#)}(hhh]j()}(hH``struct damon_operations *ops`` monitoring operations set to register. h](j.)}(h ``struct damon_operations *ops``h]h)}(hj>Kh]hstruct damon_operations *ops}(hj@KhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhj8KubjH)}(hhh]h)}(h&monitoring operations set to register.h]h&monitoring operations set to register.}(hjWKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSKhK>hjTKubah}(h]h ]h"]h$]h&]uh1jGhj8Kubeh}(h]h ]h"]h$]h&]uh1j'hjSKhK>hj5Kubah}(h]h ]h"]h$]h&]uh1j"hjKubh)}(h**Description**h]j)}(hjyKh]h Description}(hj{KhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwKubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK@hjKubh)}(hThis function registers a monitoring operations set of valid :c:type:`struct damon_operations `->id so that others can find and use them later.h](h=This function registers a monitoring operations set of valid }(hjKhhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjKh]hstruct damon_operations}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjKubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK?hjKubh0->id so that others can find and use them later.}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjKhK?hjKubh)}(h **Return**h]j)}(hjKh]hReturn}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKBhjKubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKChjKubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_select_ops (C function)c.damon_select_opshNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hBint damon_select_ops (struct damon_ctx *ctx, enum damon_ops_id id)h]j.)}(hAint damon_select_ops(struct damon_ctx *ctx, enum damon_ops_id id)h](jH)}(hinth]hint}(hjLhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjLhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKWubjF)}(h h]h }(hjLhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLhhhjLhKWubjW)}(hdamon_select_opsh]j])}(hdamon_select_opsh]hdamon_select_ops}(hj)LhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj%Lubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjLhhhjLhKWubjH)}(h-(struct damon_ctx *ctx, enum damon_ops_id id)h](jH)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjELhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjALubjF)}(h h]h }(hjRLhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjALubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjcLhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj`Lubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjeLmodnameN classnameNjj)}j]j")}j"j+Lsbc.damon_select_opsasbuh1hhjALubjF)}(h h]h }(hjLhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjALubjJ)}(hjJh]h*}(hjLhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjALubj])}(hctxh]hctx}(hjLhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjALubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhj=LubjH)}(henum damon_ops_id idh](j4)}(hj h]henum}(hjLhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjLubjF)}(h h]h }(hjLhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLubh)}(hhh]j])}(h damon_ops_idh]h damon_ops_id}(hjLhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjLubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjLmodnameN classnameNjj)}j]jLc.damon_select_opsasbuh1h6hjLubjF)}(h h]h }(hjLhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLubj])}(hidh]hid}(hjMhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjLubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhj=Lubeh}(h]h ]h"]h$]h&]hhuh1jHhjLhhhjLhKWubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjLhhhjLhKWubah}(h]jKah ](jjeh"]h$]h&]jj)jhuh1j'hjLhKWhjKhhubj)}(hhh]h)}(h7Select a monitoring operations to use with the context.h]h7Select a monitoring operations to use with the context.}(hj+MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKWhj(Mhhubah}(h]h ]h"]h$]h&]uh1jhjKhhhjLhKWubeh}(h]h ](jfunctioneh"]h$]h&]jjjjCMjjCMjjjuh1j"hhhjHhNhNubj)}(hXR**Parameters** ``struct damon_ctx *ctx`` monitoring context to use the operations. ``enum damon_ops_id id`` id of the registered monitoring operations to select. **Description** This function finds registered monitoring operations set of **id** and make **ctx** to use it. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjMMh]h Parameters}(hjOMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKMubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK[hjGMubj#)}(hhh](j()}(hD``struct damon_ctx *ctx`` monitoring context to use the operations. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjlMh]hstruct damon_ctx *ctx}(hjnMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjMubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKXhjfMubjH)}(hhh]h)}(h)monitoring context to use the operations.h]h)monitoring context to use the operations.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhKXhjMubah}(h]h ]h"]h$]h&]uh1jGhjfMubeh}(h]h ]h"]h$]h&]uh1j'hjMhKXhjcMubj()}(hO``enum damon_ops_id id`` id of the registered monitoring operations to select. h](j.)}(h``enum damon_ops_id id``h]h)}(hjMh]henum damon_ops_id id}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKYhjMubjH)}(hhh]h)}(h5id of the registered monitoring operations to select.h]h5id of the registered monitoring operations to select.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhKYhjMubah}(h]h ]h"]h$]h&]uh1jGhjMubeh}(h]h ]h"]h$]h&]uh1j'hjMhKYhjcMubeh}(h]h ]h"]h$]h&]uh1j"hjGMubh)}(h**Description**h]j)}(hjMh]h Description}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK[hjGMubh)}(h^This function finds registered monitoring operations set of **id** and make **ctx** to use it.h](hOubj#)}(hhh]j()}(h4``enum damos_filter_type type`` type of the filter. h](j.)}(h``enum damos_filter_type type``h]h)}(hjcOh]henum damos_filter_type type}(hjeOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaOubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hj]OubjH)}(hhh]h)}(htype of the filter.h]htype of the filter.}(hj|OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxOhM hjyOubah}(h]h ]h"]h$]h&]uh1jGhj]Oubeh}(h]h ]h"]h$]h&]uh1j'hjxOhM hjZOubah}(h]h ]h"]h$]h&]uh1j"hj>Oubh)}(h **Return**h]j)}(hjOh]hReturn}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM"hj>Oubh)}(hQtrue if the filter of **type** needs to be handled by ops layer, false otherwise.h](htrue if the filter of }(hjOhhhNhNubj)}(h**type**h]htype}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubh3 needs to be handled by ops layer, false otherwise.}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM"hj>Oubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_set_attrs (C function)c.damon_set_attrshNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hFint damon_set_attrs (struct damon_ctx *ctx, struct damon_attrs *attrs)h]j.)}(hEint damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs)h](jH)}(hinth]hint}(hjOhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjOhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hjPhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjOhhhjPhMubjW)}(hdamon_set_attrsh]j])}(hdamon_set_attrsh]hdamon_set_attrs}(hjPhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjOhhhjPhMubjH)}(h2(struct damon_ctx *ctx, struct damon_attrs *attrs)h](jH)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hj2PhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj.PubjF)}(h h]h }(hj?PhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj.Pubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjPPhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjMPubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjRPmodnameN classnameNjj)}j]j")}j"jPsbc.damon_set_attrsasbuh1hhj.PubjF)}(h h]h }(hjpPhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj.PubjJ)}(hjJh]h*}(hj~PhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhj.Pubj])}(hctxh]hctx}(hjPhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj.Pubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhj*PubjH)}(hstruct damon_attrs *attrsh](j4)}(hj7h]hstruct}(hjPhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjPubjF)}(h h]h }(hjPhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPubh)}(hhh]j])}(h damon_attrsh]h damon_attrs}(hjPhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjPmodnameN classnameNjj)}j]jlPc.damon_set_attrsasbuh1hhjPubjF)}(h h]h }(hjPhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPubjJ)}(hjJh]h*}(hjPhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjPubj])}(hattrsh]hattrs}(hjPhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhj*Pubeh}(h]h ]h"]h$]h&]hhuh1jHhjOhhhjPhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjOhhhjPhMubah}(h]jOah ](jjeh"]h$]h&]jj)jhuh1j'hjPhMhjOhhubj)}(hhh]h)}(h"Set attributes for the monitoring.h]h"Set attributes for the monitoring.}(hj%QhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj"Qhhubah}(h]h ]h"]h$]h&]uh1jhjOhhhjPhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj=Qjj=Qjjjuh1j"hhhjHhNhNubj)}(hXy**Parameters** ``struct damon_ctx *ctx`` monitoring context ``struct damon_attrs *attrs`` monitoring attributes **Description** This function should be called while the kdamond is not running, an access check results aggregation is not ongoing (e.g., from damon_call(). Every time interval is in micro-seconds. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjGQh]h Parameters}(hjIQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEQubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjAQubj#)}(hhh](j()}(h-``struct damon_ctx *ctx`` monitoring context h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjfQh]hstruct damon_ctx *ctx}(hjhQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdQubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj`QubjH)}(hhh]h)}(hmonitoring contexth]hmonitoring context}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{QhMhj|Qubah}(h]h ]h"]h$]h&]uh1jGhj`Qubeh}(h]h ]h"]h$]h&]uh1j'hj{QhMhj]Qubj()}(h4``struct damon_attrs *attrs`` monitoring attributes h](j.)}(h``struct damon_attrs *attrs``h]h)}(hjQh]hstruct damon_attrs *attrs}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjQubjH)}(hhh]h)}(hmonitoring attributesh]hmonitoring attributes}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhMhjQubah}(h]h ]h"]h$]h&]uh1jGhjQubeh}(h]h ]h"]h$]h&]uh1j'hjQhMhj]Qubeh}(h]h ]h"]h$]h&]uh1j"hjAQubh)}(h**Description**h]j)}(hjQh]h Description}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjAQubh)}(hThis function should be called while the kdamond is not running, an access check results aggregation is not ongoing (e.g., from damon_call().h]hThis function should be called while the kdamond is not running, an access check results aggregation is not ongoing (e.g., from damon_call().}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjAQubh)}(h(Every time interval is in micro-seconds.h]h(Every time interval is in micro-seconds.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjAQubh)}(h **Return**h]j)}(hjRh]hReturn}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjAQubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hj&RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjAQubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_set_schemes (C function)c.damon_set_schemeshNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hZvoid damon_set_schemes (struct damon_ctx *ctx, struct damos **schemes, ssize_t nr_schemes)h]j.)}(hYvoid damon_set_schemes(struct damon_ctx *ctx, struct damos **schemes, ssize_t nr_schemes)h](jH)}(hvoidh]hvoid}(hjURhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjQRhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hjdRhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjQRhhhjcRhMubjW)}(hdamon_set_schemesh]j])}(hdamon_set_schemesh]hdamon_set_schemes}(hjvRhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjrRubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjQRhhhjcRhMubjH)}(hC(struct damon_ctx *ctx, struct damos **schemes, ssize_t nr_schemes)h](jH)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjRhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjRubjF)}(h h]h }(hjRhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjRubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjRhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjRubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjRmodnameN classnameNjj)}j]j")}j"jxRsbc.damon_set_schemesasbuh1hhjRubjF)}(h h]h }(hjRhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjRubjJ)}(hjJh]h*}(hjRhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjRubj])}(hctxh]hctx}(hjRhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjRubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjRubjH)}(hstruct damos **schemesh](j4)}(hj7h]hstruct}(hjShhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjSubjF)}(h h]h }(hjShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjSubh)}(hhh]j])}(hdamosh]hdamos}(hj"ShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjSubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetj$SmodnameN classnameNjj)}j]jRc.damon_set_schemesasbuh1hhjSubjF)}(h h]h }(hj@ShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjSubjJ)}(hjJh]h*}(hjNShhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjSubjJ)}(hjJh]h*}(hj[ShhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjSubj])}(hschemesh]hschemes}(hjhShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjSubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjRubjH)}(hssize_t nr_schemesh](h)}(hhh]j])}(hssize_th]hssize_t}(hjShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjSubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjSmodnameN classnameNjj)}j]jRc.damon_set_schemesasbuh1hhj}SubjF)}(h h]h }(hjShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj}Subj])}(h nr_schemesh]h nr_schemes}(hjShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj}Subeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjRubeh}(h]h ]h"]h$]h&]hhuh1jHhjQRhhhjcRhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjMRhhhjcRhMubah}(h]jHRah ](jjeh"]h$]h&]jj)jhuh1j'hjcRhMhjJRhhubj)}(hhh]h)}(h3Set data access monitoring based operation schemes.h]h3Set data access monitoring based operation schemes.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjShhubah}(h]h ]h"]h$]h&]uh1jhjJRhhhjcRhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjSjjSjjjuh1j"hhhjHhNhNubj)}(hX**Parameters** ``struct damon_ctx *ctx`` monitoring context ``struct damos **schemes`` array of the schemes ``ssize_t nr_schemes`` number of entries in **schemes** **Description** This function should not be called while the kdamond of the context is running.h](h)}(h**Parameters**h]j)}(hjSh]h Parameters}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjSubj#)}(hhh](j()}(h-``struct damon_ctx *ctx`` monitoring context h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjTh]hstruct damon_ctx *ctx}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjTubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjTubjH)}(hhh]h)}(hmonitoring contexth]hmonitoring context}(hj4ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ThMhj1Tubah}(h]h ]h"]h$]h&]uh1jGhjTubeh}(h]h ]h"]h$]h&]uh1j'hj0ThMhjTubj()}(h0``struct damos **schemes`` array of the schemes h](j.)}(h``struct damos **schemes``h]h)}(hjTTh]hstruct damos **schemes}(hjVThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRTubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjNTubjH)}(hhh]h)}(harray of the schemesh]harray of the schemes}(hjmThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjiThMhjjTubah}(h]h ]h"]h$]h&]uh1jGhjNTubeh}(h]h ]h"]h$]h&]uh1j'hjiThMhjTubj()}(h8``ssize_t nr_schemes`` number of entries in **schemes** h](j.)}(h``ssize_t nr_schemes``h]h)}(hjTh]hssize_t nr_schemes}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjTubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjTubjH)}(hhh]h)}(h number of entries in **schemes**h](hnumber of entries in }(hjThhhNhNubj)}(h **schemes**h]hschemes}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]uh1hhjThMhjTubah}(h]h ]h"]h$]h&]uh1jGhjTubeh}(h]h ]h"]h$]h&]uh1j'hjThMhjTubeh}(h]h ]h"]h$]h&]uh1j"hjSubh)}(h**Description**h]j)}(hjTh]h Description}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjSubh)}(hOThis function should not be called while the kdamond of the context is running.h]hOThis function should not be called while the kdamond of the context is running.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjSubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%damos_commit_quota_goals (C function)c.damos_commit_quota_goalshNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hOint damos_commit_quota_goals (struct damos_quota *dst, struct damos_quota *src)h]j.)}(hNint damos_commit_quota_goals(struct damos_quota *dst, struct damos_quota *src)h](jH)}(hinth]hint}(hjUhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjUhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM1ubjF)}(h h]h }(hj*UhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjUhhhj)UhM1ubjW)}(hdamos_commit_quota_goalsh]j])}(hdamos_commit_quota_goalsh]hdamos_commit_quota_goals}(hjUsbc.damos_commit_quota_goalsasbuh1hhjTUubjF)}(h h]h }(hjUhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjTUubjJ)}(hjJh]h*}(hjUhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjTUubj])}(hdsth]hdst}(hjUhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjTUubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjPUubjH)}(hstruct damos_quota *srch](j4)}(hj7h]hstruct}(hjUhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjUubjF)}(h h]h }(hjUhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjUubh)}(hhh]j])}(h damos_quotah]h damos_quota}(hjUhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjUubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjUmodnameN classnameNjj)}j]jUc.damos_commit_quota_goalsasbuh1hhjUubjF)}(h h]h }(hjVhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjUubjJ)}(hjJh]h*}(hjVhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjUubj])}(hsrch]hsrc}(hj!VhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjUubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjPUubeh}(h]h ]h"]h$]h&]hhuh1jHhjUhhhj)UhM1ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjUhhhj)UhM1ubah}(h]jUah ](jjeh"]h$]h&]jj)jhuh1j'hj)UhM1hjUhhubj)}(hhh]h)}(h*Commit DAMOS quota goals to another quota.h]h*Commit DAMOS quota goals to another quota.}(hjKVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM1hjHVhhubah}(h]h ]h"]h$]h&]uh1jhjUhhhj)UhM1ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjcVjjcVjjjuh1j"hhhjHhNhNubj)}(hX**Parameters** ``struct damos_quota *dst`` The commit destination DAMOS quota. ``struct damos_quota *src`` The commit source DAMOS quota. **Description** Copies user-specified parameters for quota goals from **src** to **dst**. Users should use this function for quota goals-level parameters update of running DAMON contexts, instead of manual in-place updates. This function should be called from parameters-update safe context, like damon_call().h](h)}(h**Parameters**h]j)}(hjmVh]h Parameters}(hjoVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkVubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM5hjgVubj#)}(hhh](j()}(h@``struct damos_quota *dst`` The commit destination DAMOS quota. h](j.)}(h``struct damos_quota *dst``h]h)}(hjVh]hstruct damos_quota *dst}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM2hjVubjH)}(hhh]h)}(h#The commit destination DAMOS quota.h]h#The commit destination DAMOS quota.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhM2hjVubah}(h]h ]h"]h$]h&]uh1jGhjVubeh}(h]h ]h"]h$]h&]uh1j'hjVhM2hjVubj()}(h;``struct damos_quota *src`` The commit source DAMOS quota. h](j.)}(h``struct damos_quota *src``h]h)}(hjVh]hstruct damos_quota *src}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM3hjVubjH)}(hhh]h)}(hThe commit source DAMOS quota.h]hThe commit source DAMOS quota.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhM3hjVubah}(h]h ]h"]h$]h&]uh1jGhjVubeh}(h]h ]h"]h$]h&]uh1j'hjVhM3hjVubeh}(h]h ]h"]h$]h&]uh1j"hjgVubh)}(h**Description**h]j)}(hjWh]h Description}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM5hjgVubh)}(hCopies user-specified parameters for quota goals from **src** to **dst**. Users should use this function for quota goals-level parameters update of running DAMON contexts, instead of manual in-place updates.h](h6Copies user-specified parameters for quota goals from }(hjWhhhNhNubj)}(h**src**h]hsrc}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh to }(hjWhhhNhNubj)}(h**dst**h]hdst}(hj0WhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh. Users should use this function for quota goals-level parameters update of running DAMON contexts, instead of manual in-place updates.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM4hjgVubh)}(hVThis function should be called from parameters-update safe context, like damon_call().h]hVThis function should be called from parameters-update safe context, like damon_call().}(hjIWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM8hjgVubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)damos_filters_default_reject (C function)c.damos_filters_default_rejecthNtauh1jhjHhhhNhNubj#)}(hhh](j()}(h=bool damos_filters_default_reject (struct list_head *filters)h]j.)}(h[hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj+[hhhj=[hMubjW)}(hdamon_nr_running_ctxsh]j])}(hdamon_nr_running_ctxsh]hdamon_nr_running_ctxs}(hjP[hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjL[ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj+[hhhj=[hMubjH)}(h(void)h]jH)}(hvoidh]jH)}(hvoidh]hvoid}(hjl[hhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjh[ubah}(h]h ]h"]h$]h&]noemphhhuh1jHhjd[ubah}(h]h ]h"]h$]h&]hhuh1jHhj+[hhhj=[hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj'[hhhj=[hMubah}(h]j"[ah ](jjeh"]h$]h&]jj)jhuh1j'hj=[hMhj$[hhubj)}(hhh]h)}(h,Return number of currently running contexts.h]h,Return number of currently running contexts.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj[hhubah}(h]h ]h"]h$]h&]uh1jhj$[hhhj=[hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj[jj[jjjuh1j"hhhjHhNhNubj)}(h'**Parameters** ``void`` no argumentsh](h)}(h**Parameters**h]j)}(hj[h]h Parameters}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hj[ubj#)}(hhh]j()}(h``void`` no argumentsh](j.)}(h``void``h]h)}(hj[h]hvoid}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hj[ubjH)}(hhh]h)}(h no argumentsh]h no arguments}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKhj[ubah}(h]h ]h"]h$]h&]uh1jGhj[ubeh}(h]h ]h"]h$]h&]uh1j'hj[hM hj[ubah}(h]h ]h"]h$]h&]uh1j"hj[ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_start (C function) c.damon_starthNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hFint damon_start (struct damon_ctx **ctxs, int nr_ctxs, bool exclusive)h]j.)}(hEint damon_start(struct damon_ctx **ctxs, int nr_ctxs, bool exclusive)h](jH)}(hinth]hint}(hj1\hhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj-\hhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMHubjF)}(h h]h }(hj@\hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj-\hhhj?\hMHubjW)}(h damon_starth]j])}(h damon_starth]h damon_start}(hjR\hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjN\ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj-\hhhj?\hMHubjH)}(h6(struct damon_ctx **ctxs, int nr_ctxs, bool exclusive)h](jH)}(hstruct damon_ctx **ctxsh](j4)}(hj7h]hstruct}(hjn\hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjj\ubjF)}(h h]h }(hj{\hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjj\ubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hj\hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj\ubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetj\modnameN classnameNjj)}j]j")}j"jT\sb c.damon_startasbuh1hhjj\ubjF)}(h h]h }(hj\hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjj\ubjJ)}(hjJh]h*}(hj\hhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjj\ubjJ)}(hjJh]h*}(hj\hhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjj\ubj])}(hctxsh]hctxs}(hj\hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjj\ubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjf\ubjH)}(h int nr_ctxsh](jH)}(hinth]hint}(hj\hhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj\ubjF)}(h h]h }(hj\hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj\ubj])}(hnr_ctxsh]hnr_ctxs}(hj ]hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj\ubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjf\ubjH)}(hbool exclusiveh](jH)}(hjHh]hbool}(hj"]hhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj]ubjF)}(h h]h }(hj/]hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj]ubj])}(h exclusiveh]h exclusive}(hj=]hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj]ubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjf\ubeh}(h]h ]h"]h$]h&]hhuh1jHhj-\hhhj?\hMHubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj)\hhhj?\hMHubah}(h]j$\ah ](jjeh"]h$]h&]jj)jhuh1j'hj?\hMHhj&\hhubj)}(hhh]h)}(h5Starts the monitorings for a given group of contexts.h]h5Starts the monitorings for a given group of contexts.}(hjg]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMHhjd]hhubah}(h]h ]h"]h$]h&]uh1jhj&\hhhj?\hMHubeh}(h]h ](jfunctioneh"]h$]h&]jjjj]jj]jjjuh1j"hhhjHhNhNubj)}(hX**Parameters** ``struct damon_ctx **ctxs`` an array of the pointers for contexts to start monitoring ``int nr_ctxs`` size of **ctxs** ``bool exclusive`` exclusiveness of this contexts group **Description** This function starts a group of monitoring threads for a group of monitoring contexts. One thread per each context is created and run in parallel. The caller should handle synchronization between the threads by itself. If **exclusive** is true and a group of threads that created by other 'damon_start()' call is currently running, this function does nothing but returns -EBUSY. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hj]h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMLhj]ubj#)}(hhh](j()}(hV``struct damon_ctx **ctxs`` an array of the pointers for contexts to start monitoring h](j.)}(h``struct damon_ctx **ctxs``h]h)}(hj]h]hstruct damon_ctx **ctxs}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMIhj]ubjH)}(hhh]h)}(h9an array of the pointers for contexts to start monitoringh]h9an array of the pointers for contexts to start monitoring}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hMIhj]ubah}(h]h ]h"]h$]h&]uh1jGhj]ubeh}(h]h ]h"]h$]h&]uh1j'hj]hMIhj]ubj()}(h!``int nr_ctxs`` size of **ctxs** h](j.)}(h``int nr_ctxs``h]h)}(hj]h]h int nr_ctxs}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMJhj]ubjH)}(hhh]h)}(hsize of **ctxs**h](hsize of }(hj]hhhNhNubj)}(h**ctxs**h]hctxs}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]uh1hhj]hMJhj]ubah}(h]h ]h"]h$]h&]uh1jGhj]ubeh}(h]h ]h"]h$]h&]uh1j'hj]hMJhj]ubj()}(h8``bool exclusive`` exclusiveness of this contexts group h](j.)}(h``bool exclusive``h]h)}(hj(^h]hbool exclusive}(hj*^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&^ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMKhj"^ubjH)}(hhh]h)}(h$exclusiveness of this contexts grouph]h$exclusiveness of this contexts group}(hjA^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=^hMKhj>^ubah}(h]h ]h"]h$]h&]uh1jGhj"^ubeh}(h]h ]h"]h$]h&]uh1j'hj=^hMKhj]ubeh}(h]h ]h"]h$]h&]uh1j"hj]ubh)}(h**Description**h]j)}(hjc^h]h Description}(hje^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja^ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMMhj]ubh)}(hX}This function starts a group of monitoring threads for a group of monitoring contexts. One thread per each context is created and run in parallel. The caller should handle synchronization between the threads by itself. If **exclusive** is true and a group of threads that created by other 'damon_start()' call is currently running, this function does nothing but returns -EBUSY.h](hThis function starts a group of monitoring threads for a group of monitoring contexts. One thread per each context is created and run in parallel. The caller should handle synchronization between the threads by itself. If }(hjy^hhhNhNubj)}(h **exclusive**h]h exclusive}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjy^ubh is true and a group of threads that created by other ‘damon_start()’ call is currently running, this function does nothing but returns -EBUSY.}(hjy^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMLhj]ubh)}(h **Return**h]j)}(hj^h]hReturn}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMShj]ubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMThj]ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_stop (C function) c.damon_stophNtauh1jhjHhhhNhNubj#)}(hhh](j()}(h5int damon_stop (struct damon_ctx **ctxs, int nr_ctxs)h]j.)}(h4int damon_stop(struct damon_ctx **ctxs, int nr_ctxs)h](jH)}(hinth]hint}(hj^hhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj^hhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hj^hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj^hhhj^hMubjW)}(h damon_stoph]j])}(h damon_stoph]h damon_stop}(hj_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj^ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj^hhhj^hMubjH)}(h&(struct damon_ctx **ctxs, int nr_ctxs)h](jH)}(hstruct damon_ctx **ctxsh](j4)}(hj7h]hstruct}(hj_hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj_ubjF)}(h h]h }(hj+_hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj_ubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hj<_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj9_ubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetj>_modnameN classnameNjj)}j]j")}j"j_sb c.damon_stopasbuh1hhj_ubjF)}(h h]h }(hj\_hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj_ubjJ)}(hjJh]h*}(hjj_hhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhj_ubjJ)}(hjJh]h*}(hjw_hhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhj_ubj])}(hctxsh]hctxs}(hj_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhj_ubjH)}(h int nr_ctxsh](jH)}(hinth]hint}(hj_hhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj_ubjF)}(h h]h }(hj_hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj_ubj])}(hnr_ctxsh]hnr_ctxs}(hj_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhj_ubeh}(h]h ]h"]h$]h&]hhuh1jHhj^hhhj^hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj^hhhj^hMubah}(h]j^ah ](jjeh"]h$]h&]jj)jhuh1j'hj^hMhj^hhubj)}(hhh]h)}(h4Stops the monitorings for a given group of contexts.h]h4Stops the monitorings for a given group of contexts.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj_hhubah}(h]h ]h"]h$]h&]uh1jhj^hhhj^hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj_jj_jjjuh1j"hhhjHhNhNubj)}(h**Parameters** ``struct damon_ctx **ctxs`` an array of the pointers for contexts to stop monitoring ``int nr_ctxs`` size of **ctxs** **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hj`h]h Parameters}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj_ubj#)}(hhh](j()}(hU``struct damon_ctx **ctxs`` an array of the pointers for contexts to stop monitoring h](j.)}(h``struct damon_ctx **ctxs``h]h)}(hj$`h]hstruct damon_ctx **ctxs}(hj&`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"`ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj`ubjH)}(hhh]h)}(h8an array of the pointers for contexts to stop monitoringh]h8an array of the pointers for contexts to stop monitoring}(hj=`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9`hMhj:`ubah}(h]h ]h"]h$]h&]uh1jGhj`ubeh}(h]h ]h"]h$]h&]uh1j'hj9`hMhj`ubj()}(h!``int nr_ctxs`` size of **ctxs** h](j.)}(h``int nr_ctxs``h]h)}(hj]`h]h int nr_ctxs}(hj_`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[`ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjW`ubjH)}(hhh]h)}(hsize of **ctxs**h](hsize of }(hjv`hhhNhNubj)}(h**ctxs**h]hctxs}(hj~`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjv`ubeh}(h]h ]h"]h$]h&]uh1hhjr`hMhjs`ubah}(h]h ]h"]h$]h&]uh1jGhjW`ubeh}(h]h ]h"]h$]h&]uh1j'hjr`hMhj`ubeh}(h]h ]h"]h$]h&]uh1j"hj_ubh)}(h **Return**h]j)}(hj`h]hReturn}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj_ubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_is_running (C function)c.damon_is_runninghNtauh1jhjHhhhNhNubj#)}(hhh](j()}(h-bool damon_is_running (struct damon_ctx *ctx)h]j.)}(h,bool damon_is_running(struct damon_ctx *ctx)h](jH)}(hjHh]hbool}(hj`hhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj`hhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hj`hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj`hhhj`hMubjW)}(hdamon_is_runningh]j])}(hdamon_is_runningh]hdamon_is_running}(hj ahhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjaubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj`hhhj`hMubjH)}(h(struct damon_ctx *ctx)h]jH)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hj'ahhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj#aubjF)}(h h]h }(hj4ahhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj#aubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjEahhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjBaubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjGamodnameN classnameNjj)}j]j")}j"j asbc.damon_is_runningasbuh1hhj#aubjF)}(h h]h }(hjeahhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj#aubjJ)}(hjJh]h*}(hjsahhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhj#aubj])}(hctxh]hctx}(hjahhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj#aubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjaubah}(h]h ]h"]h$]h&]hhuh1jHhj`hhhj`hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj`hhhj`hMubah}(h]j`ah ](jjeh"]h$]h&]jj)jhuh1j'hj`hMhj`hhubj)}(hhh]h)}(h,Returns if a given DAMON context is running.h]h,Returns if a given DAMON context is running.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjahhubah}(h]h ]h"]h$]h&]uh1jhj`hhhj`hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjajjajjjuh1j"hhhjHhNhNubj)}(h**Parameters** ``struct damon_ctx *ctx`` The DAMON context to see if running. **Return** true if **ctx** is running, false otherwise.h](h)}(h**Parameters**h]j)}(hjah]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjaubj#)}(hhh]j()}(h?``struct damon_ctx *ctx`` The DAMON context to see if running. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjah]hstruct damon_ctx *ctx}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjaubjH)}(hhh]h)}(h$The DAMON context to see if running.h]h$The DAMON context to see if running.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhMhjbubah}(h]h ]h"]h$]h&]uh1jGhjaubeh}(h]h ]h"]h$]h&]uh1j'hjbhMhjaubah}(h]h ]h"]h$]h&]uh1j"hjaubh)}(h **Return**h]j)}(hj&bh]hReturn}(hj(bhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$bubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjaubh)}(h,true if **ctx** is running, false otherwise.h](htrue if }(hjfn ` and :c:type:`damon_call_control->data ` of **control**. If :c:type:`damon_call_control->repeat ` of **control** is unset, further wait until the kdamond finishes handling of the request. Otherwise, return as soon as the request is made. The kdamond executes the function with the argument in the main loop, just after a sampling of the iteration is finished. The function can hence safely access the internal data of the :c:type:`struct damon_ctx ` without additional synchronization. The return value of the function will be saved in :c:type:`damon_call_control->return_code `. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjbeh]h Parameters}(hjdehhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`eubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj\eubj#)}(hhh](j()}(hB``struct damon_ctx *ctx`` DAMON context to call the function for. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjeh]hstruct damon_ctx *ctx}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj{eubjH)}(hhh]h)}(h'DAMON context to call the function for.h]h'DAMON context to call the function for.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMhjeubah}(h]h ]h"]h$]h&]uh1jGhj{eubeh}(h]h ]h"]h$]h&]uh1j'hjehMhjxeubj()}(hM``struct damon_call_control *control`` Control variable of the call request. h](j.)}(h&``struct damon_call_control *control``h]h)}(hjeh]h"struct damon_call_control *control}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjeubjH)}(hhh]h)}(h%Control variable of the call request.h]h%Control variable of the call request.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMhjeubah}(h]h ]h"]h$]h&]uh1jGhjeubeh}(h]h ]h"]h$]h&]uh1j'hjehMhjxeubeh}(h]h ]h"]h$]h&]uh1j"hj\eubh)}(h**Description**h]j)}(hjeh]h Description}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj\eubh)}(hXAsk DAMON worker thread (kdamond) of **ctx** to call a function with an argument data that respectively passed via :c:type:`damon_call_control->fn ` and :c:type:`damon_call_control->data ` of **control**. If :c:type:`damon_call_control->repeat ` of **control** is unset, further wait until the kdamond finishes handling of the request. Otherwise, return as soon as the request is made.h](h%Ask DAMON worker thread (kdamond) of }(hj fhhhNhNubj)}(h**ctx**h]hctx}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj fubhG to call a function with an argument data that respectively passed via }(hj fhhhNhNubh)}(h5:c:type:`damon_call_control->fn `h]h)}(hj'fh]hdamon_call_control->fn}(hj)fhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj%fubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj fubh and }(hj fhhhNhNubh)}(h7:c:type:`damon_call_control->data `h]h)}(hjKfh]hdamon_call_control->data}(hjMfhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjIfubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjDfhMhj fubh of }(hj fhhhNhNubj)}(h **control**h]hcontrol}(hjlfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj fubh. If }(hj fhhhNhNubh)}(h9:c:type:`damon_call_control->repeat `h]h)}(hjfh]hdamon_call_control->repeat}(hjfhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj~fubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjDfhMhj fubh of }(hj fhhhNhNubj)}(h **control**h]hcontrol}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj fubh~ is unset, further wait until the kdamond finishes handling of the request. Otherwise, return as soon as the request is made.}(hj fhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjDfhMhj\eubh)}(hXvThe kdamond executes the function with the argument in the main loop, just after a sampling of the iteration is finished. The function can hence safely access the internal data of the :c:type:`struct damon_ctx ` without additional synchronization. The return value of the function will be saved in :c:type:`damon_call_control->return_code `.h](hThe kdamond executes the function with the argument in the main loop, just after a sampling of the iteration is finished. The function can hence safely access the internal data of the }(hjfhhhNhNubh)}(h&:c:type:`struct damon_ctx `h]h)}(hjfh]hstruct damon_ctx}(hjfhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjfubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjfubhX without additional synchronization. The return value of the function will be saved in }(hjfhhhNhNubh)}(h>:c:type:`damon_call_control->return_code `h]h)}(hjfh]hdamon_call_control->return_code}(hjfhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjfubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjfhMhjfubh.}(hjfhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjfhMhj\eubh)}(h **Return**h]j)}(hjgh]hReturn}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj\eubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hj&ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj\eubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_walk (C function) c.damos_walkhNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hJint damos_walk (struct damon_ctx *ctx, struct damos_walk_control *control)h]j.)}(hIint damos_walk(struct damon_ctx *ctx, struct damos_walk_control *control)h](jH)}(hinth]hint}(hjUghhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjQghhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hjdghhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjQghhhjcghMubjW)}(h damos_walkh]j])}(h damos_walkh]h damos_walk}(hjvghhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjrgubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjQghhhjcghMubjH)}(h;(struct damon_ctx *ctx, struct damos_walk_control *control)h](jH)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjghhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjgubjF)}(h h]h }(hjghhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjgubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjghhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjgubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjgmodnameN classnameNjj)}j]j")}j"jxgsb c.damos_walkasbuh1hhjgubjF)}(h h]h }(hjghhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjgubjJ)}(hjJh]h*}(hjghhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjgubj])}(hctxh]hctx}(hjghhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjgubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjgubjH)}(h"struct damos_walk_control *controlh](j4)}(hj7h]hstruct}(hjhhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhubjF)}(h h]h }(hjhhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhubh)}(hhh]j])}(hdamos_walk_controlh]hdamos_walk_control}(hj"hhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjhubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetj$hmodnameN classnameNjj)}j]jg c.damos_walkasbuh1hhjhubjF)}(h h]h }(hj@hhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhubjJ)}(hjJh]h*}(hjNhhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjhubj])}(hcontrolh]hcontrol}(hj[hhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjhubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjgubeh}(h]h ]h"]h$]h&]hhuh1jHhjQghhhjcghMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjMghhhjcghMubah}(h]jHgah ](jjeh"]h$]h&]jj)jhuh1j'hjcghMhjJghhubj)}(hhh]h)}(h2Invoke a given functions while DAMOS walk regions.h]h2Invoke a given functions while DAMOS walk regions.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjhhhubah}(h]h ]h"]h$]h&]uh1jhjJghhhjcghMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjhjjhjjjuh1j"hhhjHhNhNubj)}(hX}**Parameters** ``struct damon_ctx *ctx`` DAMON context to call the functions for. ``struct damos_walk_control *control`` Control variable of the walk request. **Description** Ask DAMON worker thread (kdamond) of **ctx** to call a function for each region that the kdamond will apply DAMOS action to, and wait until the kdamond finishes handling of the request. The kdamond executes the given function in the main loop, for each region just after it applied any DAMOS actions of **ctx** to it. The invocation is made only within one :c:type:`damos->apply_interval_us ` since damos_walk() invocation, for each scheme. The given callback function can hence safely access the internal data of :c:type:`struct damon_ctx ` and :c:type:`struct damon_region ` that each of the scheme will apply the action for next interval, without additional synchronizations against the kdamond. If every scheme of **ctx** passed at least one :c:type:`damos->apply_interval_us `, kdamond marks the request as completed so that damos_walk() can wakeup and return. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjhh]h Parameters}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjhubj#)}(hhh](j()}(hC``struct damon_ctx *ctx`` DAMON context to call the functions for. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjhh]hstruct damon_ctx *ctx}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjhubjH)}(hhh]h)}(h(DAMON context to call the functions for.h]h(DAMON context to call the functions for.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjhubah}(h]h ]h"]h$]h&]uh1jGhjhubeh}(h]h ]h"]h$]h&]uh1j'hjhhMhjhubj()}(hM``struct damos_walk_control *control`` Control variable of the walk request. h](j.)}(h&``struct damos_walk_control *control``h]h)}(hjhh]h"struct damos_walk_control *control}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjhubjH)}(hhh]h)}(h%Control variable of the walk request.h]h%Control variable of the walk request.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMhjiubah}(h]h ]h"]h$]h&]uh1jGhjhubeh}(h]h ]h"]h$]h&]uh1j'hjihMhjhubeh}(h]h ]h"]h$]h&]uh1j"hjhubh)}(h**Description**h]j)}(hj:ih]h Description}(hjapply_interval_us ` since damos_walk() invocation, for each scheme. The given callback function can hence safely access the internal data of :c:type:`struct damon_ctx ` and :c:type:`struct damon_region ` that each of the scheme will apply the action for next interval, without additional synchronizations against the kdamond. If every scheme of **ctx** passed at least one :c:type:`damos->apply_interval_us `, kdamond marks the request as completed so that damos_walk() can wakeup and return.h](huThe kdamond executes the given function in the main loop, for each region just after it applied any DAMOS actions of }(hjqihhhNhNubj)}(h**ctx**h]hctx}(hjyihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqiubh0 to it. The invocation is made only within one }(hjqihhhNhNubh)}(h*:c:type:`damos->apply_interval_us `h]h)}(hjih]hdamos->apply_interval_us}(hjihhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjiubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjqiubh{ since damos_walk() invocation, for each scheme. The given callback function can hence safely access the internal data of }(hjqihhhNhNubh)}(h&:c:type:`struct damon_ctx `h]h)}(hjih]hstruct damon_ctx}(hjihhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjiubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhjihMhjqiubh and }(hjqihhhNhNubh)}(h,:c:type:`struct damon_region `h]h)}(hjih]hstruct damon_region}(hjihhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjiubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhjihMhjqiubh that each of the scheme will apply the action for next interval, without additional synchronizations against the kdamond. If every scheme of }(hjqihhhNhNubj)}(h**ctx**h]hctx}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqiubh passed at least one }(hjqihhhNhNubh)}(h*:c:type:`damos->apply_interval_us `h]h)}(hj jh]hdamos->apply_interval_us}(hj jhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhjihMhjqiubhT, kdamond marks the request as completed so that damos_walk() can wakeup and return.}(hjqihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjihMhjhubh)}(h **Return**h]j)}(hj2jh]hReturn}(hj4jhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0jubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjhubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjHjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjhubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j8damon_set_region_biggest_system_ram_default (C function)-c.damon_set_region_biggest_system_ram_defaulthNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hint damon_set_region_biggest_system_ram_default (struct damon_target *t, unsigned long *start, unsigned long *end, unsigned long min_region_sz)h]j.)}(hint damon_set_region_biggest_system_ram_default(struct damon_target *t, unsigned long *start, unsigned long *end, unsigned long min_region_sz)h](jH)}(hinth]hint}(hjwjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjsjhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMZ ubjF)}(h h]h }(hjjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjsjhhhjjhMZ ubjW)}(h+damon_set_region_biggest_system_ram_defaulth]j])}(h+damon_set_region_biggest_system_ram_defaulth]h+damon_set_region_biggest_system_ram_default}(hjjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjsjhhhjjhMZ ubjH)}(h_(struct damon_target *t, unsigned long *start, unsigned long *end, unsigned long min_region_sz)h](jH)}(hstruct damon_target *th](j4)}(hj7h]hstruct}(hjjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjjubjF)}(h h]h }(hjjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjjubh)}(hhh]j])}(h damon_targeth]h damon_target}(hjjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjjubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjjmodnameN classnameNjj)}j]j")}j"jjsb-c.damon_set_region_biggest_system_ram_defaultasbuh1hhjjubjF)}(h h]h }(hjjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjjubjJ)}(hjJh]h*}(hjkhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjjubj])}(hth]ht}(hj khhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjjubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjjubjH)}(hunsigned long *starth](jH)}(hunsignedh]hunsigned}(hj&khhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj"kubjF)}(h h]h }(hj4khhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj"kubjH)}(hlongh]hlong}(hjBkhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj"kubjF)}(h h]h }(hjPkhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj"kubjJ)}(hjJh]h*}(hj^khhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhj"kubj])}(hstarth]hstart}(hjkkhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj"kubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjjubjH)}(hunsigned long *endh](jH)}(hunsignedh]hunsigned}(hjkhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjkubjF)}(h h]h }(hjkhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjkubjH)}(hlongh]hlong}(hjkhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjkubjF)}(h h]h }(hjkhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjkubjJ)}(hjJh]h*}(hjkhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjkubj])}(hendh]hend}(hjkhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjkubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjjubjH)}(hunsigned long min_region_szh](jH)}(hunsignedh]hunsigned}(hjkhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjkubjF)}(h h]h }(hjkhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjkubjH)}(hlongh]hlong}(hjkhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjkubjF)}(h h]h }(hj lhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjkubj])}(h min_region_szh]h min_region_sz}(hjlhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjkubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjjubeh}(h]h ]h"]h$]h&]hhuh1jHhjsjhhhjjhMZ ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjojhhhjjhMZ ubah}(h]jjjah ](jjeh"]h$]h&]jj)jhuh1j'hjjhMZ hjljhhubj)}(hhh]h)}(hTSet the region of the given monitoring target as requested, or biggest 'System RAM'.h]hXSet the region of the given monitoring target as requested, or biggest ‘System RAM’.}(hjDlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMZ hjAlhhubah}(h]h ]h"]h$]h&]uh1jhjljhhhjjhMZ ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj\ljj\ljjjuh1j"hhhjHhNhNubj)}(hX**Parameters** ``struct damon_target *t`` The monitoring target to set the region. ``unsigned long *start`` The pointer to the start address of the region. ``unsigned long *end`` The pointer to the end address of the region. ``unsigned long min_region_sz`` Minimum region size. **Description** This function sets the region of **t** as requested by **start** and **end**. If the values of **start** and **end** are zero, however, this function finds the biggest 'System RAM' resource and sets the region to cover the resource. In the latter case, this function saves the start and end addresses of the resource in **start** and **end**, respectively. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjflh]h Parameters}(hjhlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdlubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM^ hj`lubj#)}(hhh](j()}(hD``struct damon_target *t`` The monitoring target to set the region. h](j.)}(h``struct damon_target *t``h]h)}(hjlh]hstruct damon_target *t}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM\ hjlubjH)}(hhh]h)}(h(The monitoring target to set the region.h]h(The monitoring target to set the region.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhM\ hjlubah}(h]h ]h"]h$]h&]uh1jGhjlubeh}(h]h ]h"]h$]h&]uh1j'hjlhM\ hj|lubj()}(hI``unsigned long *start`` The pointer to the start address of the region. h](j.)}(h``unsigned long *start``h]h)}(hjlh]hunsigned long *start}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM] hjlubjH)}(hhh]h)}(h/The pointer to the start address of the region.h]h/The pointer to the start address of the region.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhM] hjlubah}(h]h ]h"]h$]h&]uh1jGhjlubeh}(h]h ]h"]h$]h&]uh1j'hjlhM] hj|lubj()}(hE``unsigned long *end`` The pointer to the end address of the region. h](j.)}(h``unsigned long *end``h]h)}(hjlh]hunsigned long *end}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM^ hjlubjH)}(hhh]h)}(h-The pointer to the end address of the region.h]h-The pointer to the end address of the region.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj mhM^ hj mubah}(h]h ]h"]h$]h&]uh1jGhjlubeh}(h]h ]h"]h$]h&]uh1j'hj mhM^ hj|lubj()}(h5``unsigned long min_region_sz`` Minimum region size. h](j.)}(h``unsigned long min_region_sz``h]h)}(hj0mh]hunsigned long min_region_sz}(hj2mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.mubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM_ hj*mubjH)}(hhh]h)}(hMinimum region size.h]hMinimum region size.}(hjImhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEmhM_ hjFmubah}(h]h ]h"]h$]h&]uh1jGhj*mubeh}(h]h ]h"]h$]h&]uh1j'hjEmhM_ hj|lubeh}(h]h ]h"]h$]h&]uh1j"hj`lubh)}(h**Description**h]j)}(hjkmh]h Description}(hjmmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjimubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMa hj`lubh)}(hXfThis function sets the region of **t** as requested by **start** and **end**. If the values of **start** and **end** are zero, however, this function finds the biggest 'System RAM' resource and sets the region to cover the resource. In the latter case, this function saves the start and end addresses of the resource in **start** and **end**, respectively.h](h!This function sets the region of }(hjmhhhNhNubj)}(h**t**h]ht}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh as requested by }(hjmhhhNhNubj)}(h **start**h]hstart}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh and }(hjmhhhNhNubj)}(h**end**h]hend}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh. If the values of }(hjmhhhNhNubj)}(h **start**h]hstart}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh and }hjmsbj)}(h**end**h]hend}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh are zero, however, this function finds the biggest ‘System RAM’ resource and sets the region to cover the resource. In the latter case, this function saves the start and end addresses of the resource in }(hjmhhhNhNubj)}(h **start**h]hstart}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh and }hjmsbj)}(h**end**h]hend}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh, respectively.}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM` hj`lubh)}(h **Return**h]j)}(hjnh]hReturn}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMf hj`lubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hj&nhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMg hj`lubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j,damon_update_region_access_rate (C function)!c.damon_update_region_access_ratehNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hgvoid damon_update_region_access_rate (struct damon_region *r, bool accessed, struct damon_attrs *attrs)h]j.)}(hfvoid damon_update_region_access_rate(struct damon_region *r, bool accessed, struct damon_attrs *attrs)h](jH)}(hvoidh]hvoid}(hjUnhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjQnhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM ubjF)}(h h]h }(hjdnhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjQnhhhjcnhM ubjW)}(hdamon_update_region_access_rateh]j])}(hdamon_update_region_access_rateh]hdamon_update_region_access_rate}(hjvnhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjrnubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjQnhhhjcnhM ubjH)}(hB(struct damon_region *r, bool accessed, struct damon_attrs *attrs)h](jH)}(hstruct damon_region *rh](j4)}(hj7h]hstruct}(hjnhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjnubjF)}(h h]h }(hjnhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjnubh)}(hhh]j])}(h damon_regionh]h damon_region}(hjnhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjnubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjnmodnameN classnameNjj)}j]j")}j"jxnsb!c.damon_update_region_access_rateasbuh1hhjnubjF)}(h h]h }(hjnhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjnubjJ)}(hjJh]h*}(hjnhhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhjnubj])}(hrh]hr}(hjnhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjnubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjnubjH)}(h bool accessedh](jH)}(hjHh]hbool}(hjohhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjoubjF)}(h h]h }(hjohhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjoubj])}(haccessedh]haccessed}(hjohhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjoubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjnubjH)}(hstruct damon_attrs *attrsh](j4)}(hj7h]hstruct}(hj8ohhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj4oubjF)}(h h]h }(hjEohhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj4oubh)}(hhh]j])}(h damon_attrsh]h damon_attrs}(hjVohhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjSoubah}(h]h ]h"]h$]h&] refdomainjreftypej" reftargetjXomodnameN classnameNjj)}j]jn!c.damon_update_region_access_rateasbuh1hhj4oubjF)}(h h]h }(hjtohhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj4oubjJ)}(hjJh]h*}(hjohhhNhNubah}(h]h ]jJah"]h$]h&]uh1jJhj4oubj])}(hattrsh]hattrs}(hjohhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj4oubeh}(h]h ]h"]h$]h&]noemphhhuh1jHhjnubeh}(h]h ]h"]h$]h&]hhuh1jHhjQnhhhjcnhM ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjMnhhhjcnhM ubah}(h]jHnah ](jjeh"]h$]h&]jj)jhuh1j'hjcnhM hjJnhhubj)}(hhh]h)}(h#Update the access rate of a region.h]h#Update the access rate of a region.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjohhubah}(h]h ]h"]h$]h&]uh1jhjJnhhhjcnhM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjojjojjjuh1j"hhhjHhNhNubj)}(hX**Parameters** ``struct damon_region *r`` The DAMON region to update for its access check result. ``bool accessed`` Whether the region has accessed during last sampling interval. ``struct damon_attrs *attrs`` The damon_attrs of the DAMON context. **Description** Update the access rate of a region with the region's last sampling interval access check result. Usually this will be called by :c:type:`damon_operations->check_accesses ` callback.h](h)}(h**Parameters**h]j)}(hjoh]h Parameters}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjoubj#)}(hhh](j()}(hS``struct damon_region *r`` The DAMON region to update for its access check result. h](j.)}(h``struct damon_region *r``h]h)}(hjoh]hstruct damon_region *r}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjoubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjoubjH)}(hhh]h)}(h7The DAMON region to update for its access check result.h]h7The DAMON region to update for its access check result.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphM hjpubah}(h]h ]h"]h$]h&]uh1jGhjoubeh}(h]h ]h"]h$]h&]uh1j'hjphM hjoubj()}(hQ``bool accessed`` Whether the region has accessed during last sampling interval. h](j.)}(h``bool accessed``h]h)}(hj3ph]h bool accessed}(hj5phhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1pubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hj-pubjH)}(hhh]h)}(h>Whether the region has accessed during last sampling interval.h]h>Whether the region has accessed during last sampling interval.}(hjLphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHphM hjIpubah}(h]h ]h"]h$]h&]uh1jGhj-pubeh}(h]h ]h"]h$]h&]uh1j'hjHphM hjoubj()}(hD``struct damon_attrs *attrs`` The damon_attrs of the DAMON context. h](j.)}(h``struct damon_attrs *attrs``h]h)}(hjlph]hstruct damon_attrs *attrs}(hjnphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjpubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjfpubjH)}(hhh]h)}(h%The damon_attrs of the DAMON context.h]h%The damon_attrs of the DAMON context.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphM hjpubah}(h]h ]h"]h$]h&]uh1jGhjfpubeh}(h]h ]h"]h$]h&]uh1j'hjphM hjoubeh}(h]h ]h"]h$]h&]uh1j"hjoubh)}(h**Description**h]j)}(hjph]h Description}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjoubh)}(h`Update the access rate of a region with the region's last sampling interval access check result.h]hbUpdate the access rate of a region with the region’s last sampling interval access check result.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjoubh)}(hfUsually this will be called by :c:type:`damon_operations->check_accesses ` callback.h](hUsually this will be called by }(hjphhhNhNubh)}(h=:c:type:`damon_operations->check_accesses `h]h)}(hjph]h damon_operations->check_accesses}(hjphhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjpubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjpubh callback.}(hjphhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjphM hjoubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_initialized (C function)c.damon_initializedhNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hbool damon_initialized (void)h]j.)}(hbool damon_initialized(void)h](jH)}(hjHh]hbool}(hjqhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjqhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM ubjF)}(h h]h }(hj,qhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjqhhhj+qhM ubjW)}(hdamon_initializedh]j])}(hdamon_initializedh]hdamon_initialized}(hj>qhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj:qubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjqhhhj+qhM ubjH)}(h(void)h]jH)}(hvoidh]jH)}(hvoidh]hvoid}(hjZqhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjVqubah}(h]h ]h"]h$]h&]noemphhhuh1jHhjRqubah}(h]h ]h"]h$]h&]hhuh1jHhjqhhhj+qhM ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjqhhhj+qhM ubah}(h]jqah ](jjeh"]h$]h&]jj)jhuh1j'hj+qhM hjqhhubj)}(hhh]h)}(h$Return if DAMON is ready to be used.h]h$Return if DAMON is ready to be used.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjqhhubah}(h]h ]h"]h$]h&]uh1jhjqhhhj+qhM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjqjjqjjjuh1j"hhhjHhNhNubj)}(hh**Parameters** ``void`` no arguments **Return** true if DAMON is ready to be used, false otherwise.h](h)}(h**Parameters**h]j)}(hjqh]h Parameters}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjqubj#)}(hhh]j()}(h``void`` no arguments h](j.)}(h``void``h]h)}(hjqh]hvoid}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKhjqubjH)}(hhh]h)}(h no argumentsh]h no arguments}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhKhjqubah}(h]h ]h"]h$]h&]uh1jGhjqubeh}(h]h ]h"]h$]h&]uh1j'hjqhKhjqubah}(h]h ]h"]h$]h&]uh1j"hjqubh)}(h **Return**h]j)}(hjrh]hReturn}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKhjqubh)}(h3true if DAMON is ready to be used, false otherwise.h]h3true if DAMON is ready to be used, false otherwise.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjqubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubeh}(h] functionsah ]h"] functionsah$]h&]uh1hhhhhhhhKubeh}(h] api-referenceah ]h"] api referenceah$]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_rerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _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}nameids}(j9rj6rjHjHj1rj.ru nametypes}(j9rjHj1ruh}(j6rhjHhjj)jjjj$jjj j j j jjjjjjjj jjjU"jZ"j,&j1&j@*jE*j+j+j-j-j0j0j8j8jo:jt:j?j?jmBjrBjEjEj.rjHjHjHj,Jj1JjKjLjcNjhNjOjOjHRjMRjUjUjkWjpWjXjXj"[j'[j$\j)\j^j^j`j`jpbjubjdjdjHgjMgjjjjojjHnjMnjqjqu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.