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)}(hX**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. ``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()}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjHubeh}(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)}(hMMetrics equal to larger than **NR_DAMOS_QUOTA_GOAL_METRICS** are unsupported.h](hMetrics equal to larger than }(hjhhhNhNubj)}(h**NR_DAMOS_QUOTA_GOAL_METRICS**h]hNR_DAMOS_QUOTA_GOAL_METRICS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh are unsupported.}(hjhhhNhNubeh}(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}(hj:hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj6hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hjHhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj6hhhjGhKubjW)}(hdamos_quota_goalh]j])}(hj4h]hdamos_quota_goal}(hjZhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjVubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj6hhhjGhKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj2hhhjGhKubah}(h]j-ah ](jjeh"]h$]h&]jj)jhuh1j'hjGhKhj/hhubj)}(hhh]h)}(h$DAMOS scheme quota auto-tuning goal.h]h$DAMOS scheme quota auto-tuning goal.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjyhhubah}(h]h ]h"]h$]h&]uh1jhj/hhhjGhKubeh}(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; unsigned short 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.hhKhjubj)}(hX&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; unsigned short memcg_id; }; }; struct list_head list; };h]hX&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; unsigned short memcg_id; }; }; struct list_head list; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubh)}(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.hhKhjubj#)}(hhh](j()}(h8``metric`` Metric to be used for representing the goal. 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.hhKhjubjH)}(hhh]h)}(h,Metric to be used for representing the goal.h]h,Metric to be used for representing the goal.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubj()}(hH``target_value`` Target value of **metric** to achieve with the tuning. h](j.)}(h``target_value``h]h)}(hj"h]h target_value}(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.hhKhjubjH)}(hhh]h)}(h6Target value of **metric** to achieve with the tuning.h](hTarget value of }(hj;hhhNhNubj)}(h **metric**h]hmetric}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh to achieve with the tuning.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj7hKhj8ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj7hKhjubj()}(h/``current_value`` Current value of **metric**. h](j.)}(h``current_value``h]h)}(hjmh]h current_value}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjgubjH)}(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&]uh1jGhjgubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubj()}(h``{unnamed_union}`` anonymous h](j.)}(h``{unnamed_union}``h]h)}(hjh]h{unnamed_union}}(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'hjhKhjubj()}(h+``last_psi_total`` Last measured total PSI h](j.)}(h``last_psi_total``h]h)}(hjh]hlast_psi_total}(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)}(hLast measured total PSIh]hLast measured total PSI}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubj()}(h``{unnamed_struct}`` anonymous h](j.)}(h``{unnamed_struct}``h]h)}(hj*h]h{unnamed_struct}}(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?hKhjubj()}(h``nid`` Node id. h](j.)}(h``nid``h]h)}(hjch]hnid}(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)}(hNode id.h]hNode id.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhKhjyubah}(h]h ]h"]h$]h&]uh1jGhj]ubeh}(h]h ]h"]h$]h&]uh1j'hjxhKhjubj()}(h``memcg_id`` Memcg id. h](j.)}(h ``memcg_id``h]h)}(hjh]hmemcg_id}(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 Memcg id.h]h Memcg id.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubj()}(h ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hjh]hlist}(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)}(hList head for siblings.h]hList head for siblings.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(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 }(hj.hhhNhNubj)}(h**current_value**h]h current_value}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh and }(hj.hhhNhNubj)}(h**target_value**h]h target_value}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubhk are. Then the score is entered to DAMON’s internal feedback loop mechanism to get the auto-tuned quota.}(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_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 }(hjahhhNhNubj)}(h **metric**h]hmetric}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh is DAMOS_QUOTA_USER_INPUT, }(hjahhhNhNubj)}(h**current_value**h]h current_value}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubhg should be manually entered by the user, probably inside the kdamond callbacks. Otherwise, DAMON sets }(hjahhhNhNubj)}(h**current_value**h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh with self-measured value of }(hjahhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh.}(hjahhhNhNubeh}(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 }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) is DAMOS_QUOTA_NODE_MEM_{USED,FREE}_BP, }(hjhhhNhNubj)}(h**nid**h]hnid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhK represents the node id of the target node to account the used/free memory.}(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_MEMCG_{USED,FREE}_BP, **nid** and **memcg_id** represents the node id and the cgroup to account the used memory for.h](hIf }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh+ is DAMOS_QUOTA_NODE_MEMCG_{USED,FREE}_BP, }(hjhhhNhNubj)}(h**nid**h]hnid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h **memcg_id**h]hmemcg_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhF represents the node id and the cgroup to account the used memory for.}(hjhhhNhNubeh}(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}(hjIhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjEhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hjWhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjEhhhjVhKubjW)}(h damos_quotah]j])}(hjCh]h damos_quota}(hjihhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjeubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjEhhhjVhKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjAhhhjVhKubah}(h]j<ah ](jjeh"]h$]h&]jj)jhuh1j'hjVhKhj>hhubj)}(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&]uh1jhj>hhhjVhKubeh}(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}(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.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; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubh)}(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.hhKhjubj#)}(hhh](j()}(h:``reset_interval`` Charge reset interval in milliseconds. h](j.)}(h``reset_interval``h]h)}(hjh]hreset_interval}(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&Charge reset interval in milliseconds.h]h&Charge reset interval in milliseconds.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj hKhjubj()}(h5``ms`` Maximum milliseconds that the scheme can use. h](j.)}(h``ms``h]h)}(hj1h]hms}(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+ubjH)}(hhh]h)}(h-Maximum milliseconds that the scheme can use.h]h-Maximum milliseconds that the scheme can use.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhKhjGubah}(h]h ]h"]h$]h&]uh1jGhj+ubeh}(h]h ]h"]h$]h&]uh1j'hjFhKhjubj()}(h?``sz`` Maximum bytes of memory that the action can be applied. h](j.)}(h``sz``h]h)}(hjjh]hsz}(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)}(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&]uh1jGhjdubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubj()}(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 (}(hjhhhNhNubh)}(h:c:type:`damos_quota_goal`h]h)}(hjh]hdamos_quota_goal}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_quota_goaluh1hhjhKhjubh) list.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubj()}(h'``esz`` Effective size quota in bytes. h](j.)}(h``esz``h]h)}(hjh]hesz}(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)}(hEffective size quota in bytes.h]hEffective size quota in bytes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubj()}(h>``weight_sz`` Weight of the region's size for prioritization. h](j.)}(h ``weight_sz``h]h)}(hj8h]h weight_sz}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj2ubjH)}(hhh]h)}(h/Weight of the region's size for prioritization.h]h1Weight of the region’s size for prioritization.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhKhjNubah}(h]h ]h"]h$]h&]uh1jGhj2ubeh}(h]h ]h"]h$]h&]uh1j'hjMhKhjubj()}(hN``weight_nr_accesses`` Weight of the region's nr_accesses for prioritization. h](j.)}(h``weight_nr_accesses``h]h)}(hjqh]hweight_nr_accesses}(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)}(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&]uh1jGhjkubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubj()}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(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)}(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 }(hjhhhNhNubh)}(h:c:type:`struct damos `h]h)}(hj h]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.hhKhjubh->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 }(hjhhhNhNubh)}(h :c:type:`ms`h]h)}(hj1h]hms}(hj3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmsuh1hhj*hKhjubh and }(hjhhhNhNubh)}(h :c:type:`sz`h]h)}(hjTh]hsz}(hjVhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjRubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjszuh1hhj*hKhjubhI, respectively. If the time quota is set, DAMON tries to use only up to }(hjhhhNhNubh)}(h :c:type:`ms`h]h)}(hjwh]hms}(hjyhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjuubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmsuh1hhj*hKhjubh milliseconds within }(hjhhhNhNubh)}(h:c:type:`reset_interval`h]h)}(hjh]hreset_interval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjreset_intervaluh1hhj*hKhjubh` for applying the action. If the size quota is set, DAMON tries to apply the action only up to }(hjhhhNhNubh)}(h :c:type:`sz`h]h)}(hjh]hsz}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjszuh1hhj*hKhjubh bytes within }(hjhhhNhNubh)}(h:c:type:`reset_interval`h]h)}(hjh]hreset_interval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjreset_intervaluh1hhj*hKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj*hKhhhhubh)}(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.}(hjhhhNhNubah}(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)}(hj h]hsz}(hj"hhhNhNubah}(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&]uh1hhj=hKhhhhubh)}(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 }(hjHhhhNhNubj)}(h **goals**h]hgoals}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh is not empty, DAMON calculates yet another size quota based on the goals using its internal feedback loop algorithm, for every }(hjHhhhNhNubj)}(h**reset_interval**h]hreset_interval}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubhu. Then, if the new size quota is smaller than the effective quota, it uses the new size quota as the effective quota.}(hjHhhhNhNubeh}(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 }(hj{hhhNhNubj)}(h**esz**h]hesz}(hjhhhNhNubah}(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.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)}(hjh]h weight_sz}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj weight_szuh1hhjhKhjubh, }(hjhhhNhNubh)}(h:c:type:`weight_nr_accesses`h]h)}(hjh]hweight_nr_accesses}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjweight_nr_accessesuh1hhjhKhjubh, 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_ageuh1hhjhKhjubh@, because monitoring operations are encouraged to respect those.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhhhhubj)}(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}(hjPhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjLhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj^hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLhhhj]hMubjW)}(hdamos_wmark_metrich]j])}(hjJh]hdamos_wmark_metric}(hjphhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjlubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjLhhhj]hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjHhhhj]hMubah}(h]jCah ](jjeh"]h$]h&]jj)jhuh1j'hj]hMhjEhhubj)}(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.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jhjEhhhj]hMubeh}(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)}(hjh]h Constants}(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 hjubj#)}(hhh](j()}(h@``DAMOS_WMARK_NONE`` Ignore the watermarks of the given scheme. h](j.)}(h``DAMOS_WMARK_NONE``h]h)}(hjh]hDAMOS_WMARK_NONE}(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*Ignore the watermarks of the given scheme.h]h*Ignore the watermarks of the given scheme.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM#hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM#hjubj()}(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&hjubjH)}(hhh]h)}(h+Free memory rate of the system in [0,1000].h]h+Free memory rate of the system in [0,1000].}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hM&hj"ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj!hM&hjubj()}(hB``NR_DAMOS_WMARK_METRICS`` Total number of DAMOS watermark metricsh](j.)}(h``NR_DAMOS_WMARK_METRICS``h]h)}(hjEh]hNR_DAMOS_WMARK_METRICS}(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'Total number of DAMOS watermark metricsh]h'Total number of DAMOS watermark metrics}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM)hj[ubah}(h]h ]h"]h$]h&]uh1jGhj?ubeh}(h]h ]h"]h$]h&]uh1j'hjZhM(hjubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(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&]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)}(hdamos_watermarksh]j])}(hjh]hdamos_watermarks}(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)}(h1Controls when a given scheme should be activated.h]h1Controls when a given scheme should be activated.}(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&]uh1jhjhhhjhM.ubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1j"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}(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.hhM-hjubj)}(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.hhM/hjubh)}(h **Members**h]j)}(hj/h]hMembers}(hj1hhhNhNubah}(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.hhM7hjubj#)}(hhh](j()}(h&``metric`` Metric for the watermarks. h](j.)}(h ``metric``h]h)}(hjNh]hmetric}(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.hhM+hjHubjH)}(hhh]h)}(hMetric for the watermarks.h]hMetric for the watermarks.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchM+hjdubah}(h]h ]h"]h$]h&]uh1jGhjHubeh}(h]h ]h"]h$]h&]uh1j'hjchM+hjEubj()}(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.hhM,hjubjH)}(hhh]h)}(h/Watermarks check time interval in microseconds.h]h/Watermarks check time interval in microseconds.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM,hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM,hjEubj()}(h``high`` High watermark. h](j.)}(h``high``h]h)}(hjh]hhigh}(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)}(hHigh watermark.h]hHigh watermark.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM-hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM-hjEubj()}(h``mid`` Middle watermark. h](j.)}(h``mid``h]h)}(hjh]hmid}(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)}(hMiddle watermark.h]hMiddle watermark.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM.hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM.hjEubj()}(h``low`` Low watermark.h](j.)}(h``low``h]h)}(hj2h]hlow}(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.hhM.hj,ubjH)}(hhh]h)}(hLow watermark.h]hLow watermark.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM/hjHubah}(h]h ]h"]h$]h&]uh1jGhj,ubeh}(h]h ]h"]h$]h&]uh1j'hjGhM.hjEubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjuh]h Description}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM2hhhhubh)}(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}(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.hhM/hjubh is }(hjhhhNhNubh)}(h:c:type:`DAMOS_WMARK_NONE`h]h)}(hjh]hDAMOS_WMARK_NONE}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_WMARK_NONEuh1hhjhM/hjubh, 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)}(hjh]hmetric}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhjhM/hjubh" of the system for at least every }(hjhhhNhNubh)}(h:c:type:`interval`h]h)}(hjh]hinterval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjintervaluh1hhjhM/hjubh! microseconds and works as below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM/hhhhubh)}(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 }(hj&hhhNhNubh)}(h:c:type:`metric`h]h)}(hj0h]hmetric}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM4hj&ubh is higher than }(hj&hhhNhNubh)}(h:c:type:`high`h]h)}(hjTh]hhigh}(hjVhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjRubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjhighuh1hhjMhM4hj&ubh!, the scheme is inactivated. If }(hj&hhhNhNubh)}(h:c:type:`metric`h]h)}(hjwh]hmetric}(hjyhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjuubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhjMhM4hj&ubh is between }(hj&hhhNhNubh)}(h :c:type:`mid`h]h)}(hjh]hmid}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmiduh1hhjMhM4hj&ubh and }(hj&hhhNhNubh)}(h :c:type:`low`h]h)}(hjh]hlow}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjlowuh1hhjMhM4hj&ubh, the scheme is activated. If }(hj&hhhNhNubh)}(h:c:type:`metric`h]h)}(hjh]hmetric}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhjMhM4hj&ubh is lower than }(hj&hhhNhNubh)}(h :c:type:`low`h]h)}(hjh]hlow}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjlowuh1hhjMhM4hj&ubh, the scheme is inactivated.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjMhM4hhhhubj)}(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}(hjChhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj?hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM;ubjF)}(h h]h }(hjQhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj?hhhjPhM;ubjW)}(h damos_stath]j])}(hj=h]h damos_stat}(hjchhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj_ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj?hhhjPhM;ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj;hhhjPhM;ubah}(h]j6ah ](jjeh"]h$]h&]jj)jhuh1j'hjPhM;hj8hhubj)}(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.hhMEhjhhubah}(h]h ]h"]h$]h&]uh1jhj8hhhjPhM;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; }; **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.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.hhMIhjubj)}(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; };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; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMKhjubh)}(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.hhMThjubj#)}(hhh](j()}(hM``nr_tried`` Total number of regions that the scheme is tried to be applied. h](j.)}(h ``nr_tried``h]h)}(hjh]hnr_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.hhMGhjubjH)}(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&]uh1hhjhMGhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMGhjubj()}(hK``sz_tried`` Total size of regions that the scheme is tried to be applied. h](j.)}(h ``sz_tried``h]h)}(hj+h]hsz_tried}(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.hhMHhj%ubjH)}(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.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMHhjAubah}(h]h ]h"]h$]h&]uh1jGhj%ubeh}(h]h ]h"]h$]h&]uh1j'hj@hMHhjubj()}(hC``nr_applied`` Total number of regions that the scheme is applied. h](j.)}(h``nr_applied``h]h)}(hjdh]h nr_applied}(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.hhMIhj^ubjH)}(hhh]h)}(h3Total number of regions that the scheme is applied.h]h3Total number of regions that the scheme is applied.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhMIhjzubah}(h]h ]h"]h$]h&]uh1jGhj^ubeh}(h]h ]h"]h$]h&]uh1j'hjyhMIhjubj()}(hA``sz_applied`` Total size of regions that the scheme is applied. h](j.)}(h``sz_applied``h]h)}(hjh]h sz_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.hhMJhjubjH)}(hhh]h)}(h1Total size of regions that the scheme is applied.h]h1Total size of regions that the scheme is applied.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMJhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMJhjubj()}(hR``sz_ops_filter_passed`` Total bytes that passed ops layer-handled DAMOS filters. h](j.)}(h``sz_ops_filter_passed``h]h)}(hjh]hsz_ops_filter_passed}(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.hhMKhjubjH)}(hhh]h)}(h8Total bytes that passed ops layer-handled DAMOS filters.h]h8Total bytes that passed ops layer-handled DAMOS filters.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMKhjubj()}(hJ``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.hhMLhj 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&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMMhj% ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj$ hMLhjubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjR h]h Description}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMPhhhhubh)}(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 (}(hjh hhhNhNubh)}(h<:c:type:`struct damos_access_pattern `h]h)}(hjr h]hstruct damos_access_pattern}(hjt hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjp ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_access_patternuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMMhjh ubh ), quotas (}(hjh hhhNhNubh)}(h*:c:type:`struct damos_quota `h]h)}(hj h]hstruct damos_quota}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_quotauh1hhj hMMhjh ubh), watermarks (}(hjh hhhNhNubh)}(h4:c:type:`struct damos_watermarks `h]h)}(hj h]hstruct damos_watermarks}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_watermarksuh1hhj hMMhjh ubh) and filters (}(hjh 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 hMMhjh ubhV) that handled on core logic can affect this. The core logic asks the operation set (}(hjh 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 hMMhjh ubh$) to apply the action to the region.}(hjh hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hMMhhhhubh)}(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)}(hj0!h]hstruct damon_operations}(hj2!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.hhMThj&!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)}(hjT!h]hstruct damos_filter}(hjV!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjR!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhjM!hMThj&!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)}(hjw!h]h DAMOS_PAGEOUT}(hjy!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhju!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj DAMOS_PAGEOUTuh1hhjM!hMThj&!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&]uh1hhjM!hMThhhhubj)}(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}(hj!hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj!hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMaubjF)}(h h]h }(hj!hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj!hhhj!hMaubjW)}(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!hhhj!hMaubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj!hhhj!hMaubah}(h]j!ah ](jjeh"]h$]h&]jj)jhuh1j'hj!hMahj!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.hhMihj!hhubah}(h]h ]h"]h$]h&]uh1jhj!hhhj!hMaubeh}(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)}(hjE"h]h Constants}(hjG"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC"ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMmhj?"ubj#)}(hhh](j()}(h,``DAMOS_FILTER_TYPE_ANON`` Anonymous pages. h](j.)}(h``DAMOS_FILTER_TYPE_ANON``h]h)}(hjd"h]hDAMOS_FILTER_TYPE_ANON}(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.hhMphj^"ubjH)}(hhh]h)}(hAnonymous pages.h]hAnonymous pages.}(hj}"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy"hMphjz"ubah}(h]h ]h"]h$]h&]uh1jGhj^"ubeh}(h]h ]h"]h$]h&]uh1j'hjy"hMphj["ubj()}(h+``DAMOS_FILTER_TYPE_ACTIVE`` Active pages. h](j.)}(h``DAMOS_FILTER_TYPE_ACTIVE``h]h)}(hj"h]hDAMOS_FILTER_TYPE_ACTIVE}(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.hhMshj"ubjH)}(hhh]h)}(h Active pages.h]h Active pages.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMshj"ubah}(h]h ]h"]h$]h&]uh1jGhj"ubeh}(h]h ]h"]h$]h&]uh1j'hj"hMshj["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.hhMvhj"ubjH)}(hhh]h)}(hSpecific memcg's pages.h]hSpecific memcg’s pages.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMvhj"ubah}(h]h ]h"]h$]h&]uh1jGhj"ubeh}(h]h ]h"]h$]h&]uh1j'hj"hMvhj["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.hhMyhj #ubjH)}(hhh]h)}(hRecently accessed pages.h]hRecently accessed pages.}(hj(#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$#hMyhj%#ubah}(h]h ]h"]h$]h&]uh1jGhj #ubeh}(h]h ]h"]h$]h&]uh1j'hj$#hMyhj["ubj()}(h@``DAMOS_FILTER_TYPE_HUGEPAGE_SIZE`` Page is part of a hugepage. h](j.)}(h#``DAMOS_FILTER_TYPE_HUGEPAGE_SIZE``h]h)}(hjH#h]hDAMOS_FILTER_TYPE_HUGEPAGE_SIZE}(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)}(hPage is part of a hugepage.h]hPage is part of a hugepage.}(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()}(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.}(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_ADDR`` Address range. h](j.)}(h``DAMOS_FILTER_TYPE_ADDR``h]h)}(hj#h]hDAMOS_FILTER_TYPE_ADDR}(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)}(hAddress range.h]hAddress range.}(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_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.}(hjE$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjB$ubah}(h]h ]h"]h$]h&]uh1jGhj&$ubeh}(h]h ]h"]h$]h&]uh1j'hjA$hMhj["ubeh}(h]h ]h"]h$]h&]uh1j"hj?"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjo$h]h Description}(hjq$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm$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 }(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.hhMshj$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’.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj$hMshhhhubh)}(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 }(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.hhMxhj$ubh depend 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$hMxhj$ubh. }(hj$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$hMxhj$ubh= supports both anon pages type and memcg type filters, while }(hj$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$hMxhj$ubh and }(hj$hhhNhNubh)}(h2:c:type:`enum DAMON_OPS_FVADDR `h]h)}(hjN%h]henum DAMON_OPS_FVADDR}(hjP%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjL%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMON_OPS_FVADDRuh1hhj$hMxhj$ubh& don’t support any of the two types.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj$hMxhhhhubj)}(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}(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)}(h damos_filterh]j])}(hj%h]h damos_filter}(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"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.hhMhj%hhubah}(h]h ]h"]h$]h&]uh1jhj%hhhj%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 { unsigned short 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 { unsigned short 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 { unsigned short 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.hhMhj7&ubjH)}(hhh]h)}(hType of the target memory.h]hType of the target memory.}(hjV&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR&hMhjS&ubah}(h]h ]h"]h$]h&]uh1jGhj7&ubeh}(h]h ]h"]h$]h&]uh1j'hjR&hMhj4&ubj()}(h;``matching`` Whether this is for **type**-matching memory. h](j.)}(h ``matching``h]h)}(hjv&h]hmatching}(hjx&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjt&ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjp&ubjH)}(hhh]h)}(h-Whether this is for **type**-matching memory.h](hWhether this is for }(hj&hhhNhNubj)}(h**type**h]htype}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh-matching memory.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jGhjp&ubeh}(h]h ]h"]h$]h&]uh1j'hj&hMhj4&ubj()}(hA``allow`` Whether to include or exclude the **matching** memory. Th](j.)}(h ``allow``h]h)}(hj&h]hallow}(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)}(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&]uh1jGhj&ubeh}(h]h ]h"]h$]h&]uh1j'hj&hMhj4&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!'hKhj4&ubj()}(hI``memcg_id`` Memcg id of the question if **type** is DAMOS_FILTER_MEMCG. h](j.)}(h ``memcg_id``h]h)}(hjE'h]hmemcg_id}(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)}(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}(hjf'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^'ubh is DAMOS_FILTER_MEMCG.}(hj^'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjZ'hMhj['ubah}(h]h ]h"]h$]h&]uh1jGhj?'ubeh}(h]h ]h"]h$]h&]uh1j'hjZ'hMhj4&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&]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)}(h4Address range if **type** is DAMOS_FILTER_TYPE_ADDR.h](hAddress range if }(hj'hhhNhNubj)}(h**type**h]htype}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh is DAMOS_FILTER_TYPE_ADDR.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubah}(h]h ]h"]h$]h&]uh1jGhj'ubeh}(h]h ]h"]h$]h&]uh1j'hj'hMhj4&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}(hjC(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'hMhj4&ubj()}(hH``sz_range`` Size range if **type** is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE. h](j.)}(h ``sz_range``h]h)}(hjm(h]hsz_range}(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)}(h:Size range if **type** is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.h](hSize range if }(hj(hhhNhNubj)}(h**type**h]htype}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh$ is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jGhjg(ubeh}(h]h ]h"]h$]h&]uh1j'hj(hMhj4&ubj()}(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.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.hhMhj(ubah}(h]h ]h"]h$]h&]uh1jGhj(ubeh}(h]h ]h"]h$]h&]uh1j'hj(hMhj4&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}(hjA)hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj=)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj8)hMhj)ubh and the type. Refer to }(hj)hhhNhNubh)}(h4:c:type:`enum damos_filter_type `h]h)}(hjb)h]henum damos_filter_type}(hjd)hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj`)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_filter_typeuh1hhj8)hMhj)ubh for more details.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj8)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}(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_walk_controlh]j])}(hj)h]hdamos_walk_control}(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)}(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&]uh1jhj)hhhj)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)}(hj2*h]hMembers}(hj4*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0*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)}(hjQ*h]hwalk_fn}(hjS*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjO*ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjK*ubjH)}(hhh]h)}(h+Function to be called back for each region.h]h+Function to be called back for each region.}(hjj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf*hMhjg*ubah}(h]h ]h"]h$]h&]uh1jGhjK*ubeh}(h]h ]h"]h$]h&]uh1j'hjf*hMhjH*ubj()}(h4``data`` Data that will be passed to walk functions.h](j.)}(h``data``h]h)}(hj*h]hdata}(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+Data that will be passed to walk functions.h]h+Data that will be passed to walk functions.}(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*hMhjH*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)}(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.}(hjM+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjJ+hhubah}(h]h ]h"]h$]h&]uh1jhj+hhhj+hMubeh}(h]h ](jstructeh"]h$]h&]jjjje+jje+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}(hjq+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm+ubh:}(hjm+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhji+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; };}hj+sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhji+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.hhMhji+ubj#)}(hhh](j()}(h2``min_sz_region`` Minimum size of target regions. h](j.)}(h``min_sz_region``h]h)}(hj+h]h min_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)}(hMinimum size of target regions.h]hMinimum 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()}(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 }(hjE,hhhNhNubh)}(h``->nr_accesses``h]h ->nr_accesses}(hjM,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE,ubh of target regions.}(hjE,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjA,hMhjB,ubah}(h]h ]h"]h$]h&]uh1jGhj&,ubeh}(h]h ]h"]h$]h&]uh1j'hjA,hMhj+ubj()}(hA``max_nr_accesses`` Maximum ``->nr_accesses`` of target regions. h](j.)}(h``max_nr_accesses``h]h)}(hjw,h]hmax_nr_accesses}(hjy,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhju,ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjq,ubjH)}(hhh]h)}(h,Maximum ``->nr_accesses`` of target regions.h](hMaximum }(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&]uh1jGhjq,ubeh}(h]h ]h"]h$]h&]uh1j'hj,hMhj+ubj()}(h2``min_age_region`` Minimum age of target regions. h](j.)}(h``min_age_region``h]h)}(hj,h]hmin_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)}(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&]uh1jGhj,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"hji+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}(hjU-hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjQ-hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjc-hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjQ-hhhjb-hMubjW)}(hdamos_migrate_destsh]j])}(hjO-h]hdamos_migrate_dests}(hju-hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjq-ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjQ-hhhjb-hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjM-hhhjb-hMubah}(h]jH-ah ](jjeh"]h$]h&]jj)jhuh1j'hjb-hMhjJ-hhubj)}(hhh]h)}(h.Migration destination nodes and their weights.h]h.Migration destination nodes and their weights.}(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&]uh1jhjJ-hhhjb-hMubeh}(h]h ](jstructeh"]h$]h&]jjjj-jj-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}(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)}(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.hhMhj7.ubjH)}(hhh]h)}(h/Array of migration weights for **node_id_arr**.h](hArray of migration weights for }(hjV.hhhNhNubj)}(h**node_id_arr**h]h node_id_arr}(hj^.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjV.ubh.}(hjV.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjR.hMhjS.ubah}(h]h ]h"]h$]h&]uh1jGhj7.ubeh}(h]h ]h"]h$]h&]uh1j'hjR.hMhj-ubj()}(hE``nr_dests`` Length of the **node_id_arr** and **weight_arr** arrays.h](j.)}(h ``nr_dests``h]h)}(hj.h]hnr_dests}(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)}(h8Length of the **node_id_arr** and **weight_arr** arrays.h](hLength of the }(hj.hhhNhNubj)}(h**node_id_arr**h]h node_id_arr}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh and }(hj.hhhNhNubj)}(h**weight_arr**h]h weight_arr}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh arrays.}(hj.hhhNhNubeh}(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)}(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}(hjq/hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjm/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&]uh1jEhjm/hhhj~/hMubjW)}(hdamosh]j])}(hjk/h]hdamos}(hj/hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj/ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjm/hhhj~/hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hji/hhhj~/hMubah}(h]jd/ah ](jjeh"]h$]h&]jj)jhuh1j'hj~/hMhjf/hhubj)}(hhh]h)}(h;Represents a Data Access Monitoring-based Operation Scheme.h]h;Represents a Data Access Monitoring-based Operation 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&]uh1jhjf/hhhj~/hMubeh}(h]h ](jstructeh"]h$]h&]jjjj/jj/jjjuh1j"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; 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. ``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 { 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; 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; 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)}(hj0h]hMembers}(hj0hhhNhNubah}(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.``pattern`` Access pattern of target regions. h](j.)}(h ``pattern``h]h)}(hj 0h]hpattern}(hj"0hhhNhNubah}(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.}(hj90hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj50hMhj60ubah}(h]h ]h"]h$]h&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hj50hMhj0ubj()}(hG``action`` :c:type:`damos_action` to be applied to the target regions. h](j.)}(h ``action``h]h)}(hjY0h]haction}(hj[0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjW0ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjS0ubjH)}(hhh]h)}(h;:c:type:`damos_action` to be applied to the target regions.h](h)}(h:c:type:`damos_action`h]h)}(hjx0h]h damos_action}(hjz0hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjv0ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_actionuh1hhjn0hMhjr0ubh% to be applied to the target regions.}(hjr0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjn0hMhjo0ubah}(h]h ]h"]h$]h&]uh1jGhjS0ubeh}(h]h ]h"]h$]h&]uh1j'hjn0hMhj0ubj()}(h@``apply_interval_us`` The time between applying the **action**. h](j.)}(h``apply_interval_us``h]h)}(hj0h]happly_interval_us}(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)The time between applying the **action**.h](hThe time between applying the }(hj0hhhNhNubj)}(h **action**h]haction}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hj0hMhj0ubj()}(h5``quota`` Control the aggressiveness of this scheme. h](j.)}(h ``quota``h]h)}(hj0h]hquota}(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*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&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hj1hMhj0ubj()}(hC``wmarks`` Watermarks for automated (in)activation of this scheme. h](j.)}(h ``wmarks``h]h)}(hj51h]hwmarks}(hj71hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj31ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj/1ubjH)}(hhh]h)}(h7Watermarks for automated (in)activation of this scheme.h]h7Watermarks for automated (in)activation of this scheme.}(hjN1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ1hMhjK1ubah}(h]h ]h"]h$]h&]uh1jGhj/1ubeh}(h]h ]h"]h$]h&]uh1j'hjJ1hMhj0ubj()}(h``{unnamed_union}`` anonymous h](j.)}(h``{unnamed_union}``h]h)}(hjn1h]h{unnamed_union}}(hjp1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl1ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjh1ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hKhj1ubah}(h]h ]h"]h$]h&]uh1jGhjh1ubeh}(h]h ]h"]h$]h&]uh1j'hj1hKhj0ubj()}(h``{unnamed_struct}`` anonymous h](j.)}(h``{unnamed_struct}``h]h)}(hj1h]h{unnamed_struct}}(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.hhKhj1ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hKhj1ubah}(h]h ]h"]h$]h&]uh1jGhj1ubeh}(h]h ]h"]h$]h&]uh1j'hj1hKhj0ubj()}(hG``target_nid`` Destination node if **action** is "migrate_{hot,cold}". h](j.)}(h``target_nid``h]h)}(hj1h]h target_nid}(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)}(h7Destination node if **action** is "migrate_{hot,cold}".h](hDestination node if }(hj1hhhNhNubj)}(h **action**h]haction}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh is “migrate_{hot,cold}”.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jGhj1ubeh}(h]h ]h"]h$]h&]uh1j'hj1hMhj0ubj()}(hK``migrate_dests`` Destination nodes if **action** is "migrate_{hot,cold}". h](j.)}(h``migrate_dests``h]h)}(hj+2h]h migrate_dests}(hj-2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)2ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj%2ubjH)}(hhh]h)}(h8Destination nodes if **action** is "migrate_{hot,cold}".h](hDestination nodes if }(hjD2hhhNhNubj)}(h **action**h]haction}(hjL2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD2ubh is “migrate_{hot,cold}”.}(hjD2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj@2hMhjA2ubah}(h]h ]h"]h$]h&]uh1jGhj%2ubeh}(h]h ]h"]h$]h&]uh1j'hj@2hMhj0ubj()}(hf``core_filters`` Additional set of :c:type:`struct damos_filter ` for :c:type:`action`. h](j.)}(h``core_filters``h]h)}(hjv2h]h core_filters}(hjx2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjt2ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjp2ubjH)}(hhh]h)}(hTAdditional set of :c:type:`struct damos_filter ` for :c:type:`action`.h](hAdditional set of }(hj2hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hj2h]hstruct damos_filter}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj2hMhj2ubh for }(hj2hhhNhNubh)}(h:c:type:`action`h]h)}(hj2h]haction}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj2hMhj2ubh.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jGhjp2ubeh}(h]h ]h"]h$]h&]uh1j'hj2hMhj0ubj()}(h^``ops_filters`` ops layer handling :c:type:`struct damos_filter ` objects list. h](j.)}(h``ops_filters``h]h)}(hj2h]h ops_filters}(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)}(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_filteruh1hhj 3hMhj3ubh objects list.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj 3hMhj 3ubah}(h]h ]h"]h$]h&]uh1jGhj2ubeh}(h]h ]h"]h$]h&]uh1j'hj 3hMhj0ubj()}(h>``last_applied`` Last **action** applied ops-managing entity. h](j.)}(h``last_applied``h]h)}(hjQ3h]h last_applied}(hjS3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjO3ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjK3ubjH)}(hhh]h)}(h,Last **action** applied ops-managing entity.h](hLast }(hjj3hhhNhNubj)}(h **action**h]haction}(hjr3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjj3ubh applied ops-managing entity.}(hjj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjf3hMhjg3ubah}(h]h ]h"]h$]h&]uh1jGhjK3ubeh}(h]h ]h"]h$]h&]uh1j'hjf3hMhj0ubj()}(h$``stat`` Statistics of this scheme. h](j.)}(h``stat``h]h)}(hj3h]hstat}(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)}(hStatistics of this scheme.h]hStatistics of this scheme.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj3ubah}(h]h ]h"]h$]h&]uh1jGhj3ubeh}(h]h ]h"]h$]h&]uh1j'hj3hMhj0ubj()}(h ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hj3h]hlist}(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)}(hList head for siblings.h]hList head for siblings.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj3ubah}(h]h ]h"]h$]h&]uh1jGhj3ubeh}(h]h ]h"]h$]h&]uh1j'hj3hMhj0ubeh}(h]h ]h"]h$]h&]uh1j"hj/ubeh}(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 }(hj.4hhhNhNubj)}(h**apply_interval_us**h]happly_interval_us}(hj64hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.4ubh', DAMON finds regions which fit in the }(hj.4hhhNhNubh)}(h:c:type:`pattern`h]h)}(hjJ4h]hpattern}(hjL4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjH4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjpatternuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj.4ubh and applies }(hj.4hhhNhNubh)}(h:c:type:`action`h]h)}(hjn4h]haction}(hjp4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjl4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhjg4hMhj.4ubhH to those. To avoid consuming too much CPU time or IO resources for the }(hj.4hhhNhNubh)}(h:c:type:`action`h]h)}(hj4h]haction}(hj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhjg4hMhj.4ubh, }(hj.4hhhNhNubh)}(h:c:type:`quota`h]h)}(hj4h]hquota}(hj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjquotauh1hhjg4hMhj.4ubh is used.}(hj.4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjg4hMhhhhubh)}(heIf **apply_interval_us** is zero, :c:type:`damon_attrs->aggr_interval ` is used instead.h](hIf }(hj4hhhNhNubj)}(h**apply_interval_us**h]happly_interval_us}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh is zero, }(hj4hhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hj4h]hdamon_attrs->aggr_interval}(hj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj4ubh is used instead.}(hj4hhhNhNubeh}(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 }(hj5hhhNhNubh)}(h:c:type:`wmarks`h]h)}(hj)5h]hwmarks}(hj+5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj'5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjwmarksuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj5ubh. If all schemes that registered to the monitoring context are inactive, DAMON stops monitoring either, and just repeatedly checks the watermarks.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjF5hMhhhhubh)}(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}(hjU5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQ5ubhl specifies multiple migration target nodes with different weights for migrate_hot or migrate_cold actions. }(hjQ5hhhNhNubj)}(h**target_nid**h]h target_nid}(hjg5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQ5ubh is ignored if this is set.}(hjQ5hhhNhNubeh}(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}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubhW is used to set the migration target node for migrate_hot or migrate_cold actions, and }(hj5hhhNhNubj)}(h**migrate_dests**h]h migrate_dests}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh is unset.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(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 }(hj5hhhNhNubh)}(h:c:type:`action`h]h)}(hj5h]haction}(hj5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj5ubh to a memory region, }(hj5hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj5h]hstruct damon_operations}(hj5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj5hMhj5ubh9 implementation could check pages of the region and skip }(hj5hhhNhNubh)}(h:c:type:`action`h]h)}(hj6h]haction}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj5hMhj5ubh to respect }(hj5hhhNhNubh)}(h:c:type:`core_filters`h]h)}(hj#6h]h core_filters}(hj%6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj!6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj core_filtersuh1hhj5hMhj5ubeh}(h]h ]h"]h$]h&]uh1hhj5hMhhhhubh)}(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 }(hjF6hhhNhNubj)}(h **action**h]haction}(hjN6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF6ubh* can be applied depends on the underlying }(hjF6hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjb6h]hstruct damon_operations}(hjd6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj`6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hjF6ubhD. Since it may not be aligned with the core layer abstract, namely }(hjF6hhhNhNubh)}(h,:c:type:`struct damon_region `h]h)}(hj6h]hstruct damon_region}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhj6hM hjF6ubh, }(hjF6hhhNhNubh)}(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_operationsuh1hhj6hM hjF6ubh could apply }(hjF6hhhNhNubj)}(h **action**h]haction}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF6ubhJ to same entity multiple times. Large folios that underlying on multiple }(hjF6hhhNhNubh)}(h:c:type:`struct damon `h]h)}(hj6h]h struct damon}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamonuh1hhj6hM hjF6ubh- region objects could be such examples. The }(hjF6hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj7h]hstruct damon_operations}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj6hM hjF6ubh can use }(hjF6hhhNhNubj)}(h**last_applied**h]h last_applied}(hj"7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF6ubh) to avoid that. DAMOS core logic unsets }(hjF6hhhNhNubj)}(h**last_applied**h]h last_applied}(hj47hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF6ubh? when each regions walking for applying the scheme is finished.}(hjF6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj6hM hhhhubh)}(hAfter applying the :c:type:`action` to each region, :c:type:`stat_count` and :c:type:`stat_sz` is updated to reflect the number of regions and total size of regions that the :c:type:`action` is applied.h](hAfter applying the }(hjL7hhhNhNubh)}(h:c:type:`action`h]h)}(hjV7h]haction}(hjX7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjT7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjL7ubh to each region, }(hjL7hhhNhNubh)}(h:c:type:`stat_count`h]h)}(hjz7h]h stat_count}(hj|7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjx7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj stat_countuh1hhjs7hMhjL7ubh and }(hjL7hhhNhNubh)}(h:c:type:`stat_sz`h]h)}(hj7h]hstat_sz}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjstat_szuh1hhjs7hMhjL7ubhP is updated to reflect the number of regions and total size of regions that the }(hjL7hhhNhNubh)}(h:c:type:`action`h]h)}(hj7h]haction}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhjs7hMhjL7ubh is applied.}(hjL7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjs7hMhhhhubj)}(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&]uh1j3hj7hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj8hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj7hhhj 8hMubjW)}(h damon_ops_idh]j])}(hj7h]h damon_ops_id}(hj 8hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj8ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj7hhhj 8hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj7hhhj 8hMubah}(h]j7ah ](jjeh"]h$]h&]jj)jhuh1j'hj 8hMhj7hhubj)}(hhh]h)}(h8Identifier for each monitoring operations implementationh]h8Identifier for each monitoring operations implementation}(hjB8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM=hj?8hhubah}(h]h ]h"]h$]h&]uh1jhj7hhhj 8hMubeh}(h]h ](jenumeh"]h$]h&]jjjjZ8jjZ8jjjuh1j"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)}(hjd8h]h Constants}(hjf8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb8ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMAhj^8ubj#)}(hhh](j()}(hE``DAMON_OPS_VADDR`` Monitoring operations for virtual address spaces h](j.)}(h``DAMON_OPS_VADDR``h]h)}(hj8h]hDAMON_OPS_VADDR}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMDhj}8ubjH)}(hhh]h)}(h0Monitoring operations for virtual address spacesh]h0Monitoring operations for virtual address spaces}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMDhj8ubah}(h]h ]h"]h$]h&]uh1jGhj}8ubeh}(h]h ]h"]h$]h&]uh1j'hj8hMDhjz8ubj()}(h[``DAMON_OPS_FVADDR`` Monitoring operations for only fixed ranges of virtual address spaces h](j.)}(h``DAMON_OPS_FVADDR``h]h)}(hj8h]hDAMON_OPS_FVADDR}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMHhj8ubjH)}(hhh]h)}(hEMonitoring operations for only fixed ranges of virtual address spacesh]hEMonitoring operations for only fixed ranges of virtual address spaces}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMGhj8ubah}(h]h ]h"]h$]h&]uh1jGhj8ubeh}(h]h ]h"]h$]h&]uh1j'hj8hMHhjz8ubj()}(hI``DAMON_OPS_PADDR`` Monitoring operations for the physical address space h](j.)}(h``DAMON_OPS_PADDR``h]h)}(hj8h]hDAMON_OPS_PADDR}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMKhj8ubjH)}(hhh]h)}(h4Monitoring operations for the physical address spaceh]h4Monitoring operations for the physical address space}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 9hMKhj 9ubah}(h]h ]h"]h$]h&]uh1jGhj8ubeh}(h]h ]h"]h$]h&]uh1j'hj 9hMKhjz8ubj()}(h@``NR_DAMON_OPS`` Number of monitoring operations implementationsh](j.)}(h``NR_DAMON_OPS``h]h)}(hj/9h]h NR_DAMON_OPS}(hj19hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-9ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMMhj)9ubjH)}(hhh]h)}(h/Number of monitoring operations implementationsh]h/Number of monitoring operations implementations}(hjH9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMNhjE9ubah}(h]h ]h"]h$]h&]uh1jGhj)9ubeh}(h]h ]h"]h$]h&]uh1j'hjD9hMMhjz8ubeh}(h]h ]h"]h$]h&]uh1j"hj^8ubeh}(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}(hj9hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj9hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMSubjF)}(h h]h }(hj9hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj9hhhj9hMSubjW)}(hdamon_operationsh]j])}(hj9h]hdamon_operations}(hj9hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj9ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj9hhhj9hMSubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj9hhhj9hMSubah}(h]j|9ah ](jjeh"]h$]h&]jj)jhuh1j'hj9hMShj~9hhubj)}(hhh]h)}(h*Monitoring operations for given use cases.h]h*Monitoring operations for given use cases.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMMhj9hhubah}(h]h ]h"]h$]h&]uh1jhj~9hhhj9hMSubeh}(h]h ](jstructeh"]h$]h&]jjjj9jj9jjjuh1j"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); void (*cleanup)(struct damon_ctx *context); }; **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. ``cleanup`` Clean up the context.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh:}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMQhj9ubj)}(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); void (*cleanup)(struct damon_ctx *context); };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); void (*cleanup)(struct damon_ctx *context); };}hj:sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMShj9ubh)}(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.hhM`hj9ubj#)}(hhh](j()}(h*``id`` Identifier of this operations set. h](j.)}(h``id``h]h)}(hj8:h]hid}(hj::hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6:ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMPhj2:ubjH)}(hhh]h)}(h"Identifier of this operations set.h]h"Identifier of this operations set.}(hjQ:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjM:hMPhjN:ubah}(h]h ]h"]h$]h&]uh1jGhj2:ubeh}(h]h ]h"]h$]h&]uh1j'hjM:hMPhj/:ubj()}(h8``init`` Initialize operations-related data structures. h](j.)}(h``init``h]h)}(hjq:h]hinit}(hjs:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo:ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMQhjk:ubjH)}(hhh]h)}(h.Initialize operations-related data structures.h]h.Initialize operations-related data structures.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hMQhj:ubah}(h]h ]h"]h$]h&]uh1jGhjk:ubeh}(h]h ]h"]h$]h&]uh1j'hj:hMQhj/: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.hhMRhj:ubjH)}(hhh]h)}(h*Update operations-related data structures.h]h*Update operations-related data structures.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hMRhj:ubah}(h]h ]h"]h$]h&]uh1jGhj:ubeh}(h]h ]h"]h$]h&]uh1j'hj:hMRhj/: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.hhMShj: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:hMShj:ubah}(h]h ]h"]h$]h&]uh1jGhj:ubeh}(h]h ]h"]h$]h&]uh1j'hj:hMShj/: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.hhMThj;ubjH)}(hhh]h)}(h%Check the accesses to target regions.h]h%Check the accesses to target regions.}(hj5;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1;hMThj2;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj1;hMThj/:ubj()}(h=``get_scheme_score`` Get the score of a region for a scheme. h](j.)}(h``get_scheme_score``h]h)}(hjU;h]hget_scheme_score}(hjW;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjS;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMUhjO;ubjH)}(hhh]h)}(h'Get the score of a region for a scheme.h]h'Get the score of a region for a scheme.}(hjn;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjj;hMUhjk;ubah}(h]h ]h"]h$]h&]uh1jGhjO;ubeh}(h]h ]h"]h$]h&]uh1j'hjj;hMUhj/: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.hhMVhj;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;hMVhj;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj;hMVhj/: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.hhMWhj;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;hMWhj;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj;hMWhj/: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.hhMXhj;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&]uh1hhj<hMXhj<ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj<hMXhj/:ubj()}(h!``cleanup`` Clean up the context.h](j.)}(h ``cleanup``h]h)}(hj9<h]hcleanup}(hj;<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7<ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMXhj3<ubjH)}(hhh]h)}(hClean up the context.h]hClean up the context.}(hjR<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMYhjO<ubah}(h]h ]h"]h$]h&]uh1jGhj3<ubeh}(h]h ]h"]h$]h&]uh1j'hjN<hMXhj/:ubeh}(h]h ]h"]h$]h&]uh1j"hj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj|<h]h Description}(hj~<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz<ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM\hhhhubh)}(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 }(hj<hhhNhNubh)}(h#:c:type:`damon_ctx.ops `h]h)}(hj<h]h damon_ctx.ops}(hj<hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMYhj<ubh . Then, the monitoring thread (}(hj<hhhNhNubh)}(h':c:type:`damon_ctx.kdamond `h]h)}(hj<h]hdamon_ctx.kdamond}(hj<hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhj<hMYhj<ubh) calls }(hj<hhhNhNubj)}(h**init**h]hinit}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh and }(hj<hhhNhNubj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh! before starting the monitoring, }(hj<hhhNhNubj)}(h **update**h]hupdate}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh after each }(hj<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_attrsuh1hhj<hMYhj<ubh, and }(hj<hhhNhNubj)}(h**check_accesses**h]hcheck_accesses}(hj:=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh, }(hj<hhhNhNubj)}(h**target_valid**h]h target_valid}(hjL=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh and }hj<sbj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj^=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh after each }(hj<hhhNhNubh)}(h3:c:type:`damon_attrs.sample_interval `h]h)}(hjr=h]hdamon_attrs.sample_interval}(hjt=hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjp=ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhj<hMYhj<ubh.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj<hMYhhhhubh)}(hX{Each :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. **cleanup** is called from **kdamond** just before its termination.h](hEach }(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.hhMahj=ubh instance having valid }(hj=hhhNhNubj)}(h**id**h]hid}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubhV can be registered via damon_register_ops() and selected by damon_select_ops() later. }(hj=hhhNhNubj)}(h**init**h]hinit}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh should initialize operations-related data structures. For example, this could be used to construct proper monitoring target regions and link those to }(hj=hhhNhNubj)}(h**damon_ctx.adaptive_targets**h]hdamon_ctx.adaptive_targets}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh. }(hj=hhhNhNubj)}(h **update**h]hupdate}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh should update the operations-related data structures. For example, this could be used to update monitoring target regions for current status. }(hj=hhhNhNubj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj >hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubhT should manipulate the monitoring regions to be prepared for the next access check. }(hj=hhhNhNubj)}(h**check_accesses**h]hcheck_accesses}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=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. }(hj=hhhNhNubj)}(h**get_scheme_score**h]hget_scheme_score}(hj1>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubhP should return the priority score of a region for a scheme as an integer in [0, }(hj=hhhNhNubh)}(h:c:type:`DAMOS_MAX_SCORE`h]h)}(hjE>h]hDAMOS_MAX_SCORE}(hjG>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjC>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_MAX_SCOREuh1hhj=hMahj=ubh]. }(hj=hhhNhNubj)}(h**apply_scheme**h]h apply_scheme}(hjf>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh is called from }(hj=hhhNhNubj)}(h **kdamond**h]hkdamond}(hjx>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=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 (}(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=hMahj=ubh) that handled by itself. }(hj=hhhNhNubj)}(h**target_valid**h]h target_valid}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubhD should check whether the target is still valid for the monitoring. }(hj=hhhNhNubj)}(h**cleanup_target**h]hcleanup_target}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh2 is called before the target will be deallocated. }(hj=hhhNhNubj)}(h **cleanup**h]hcleanup}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh is called from }hj=sbj)}(h **kdamond**h]hkdamond}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh just before its termination.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj=hMahhhhubj)}(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.hhM}ubjF)}(h h]h }(hj"?hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj?hhhj!?hM}ubjW)}(hdamon_intervals_goalh]j])}(hj?h]hdamon_intervals_goal}(hj4?hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj0?ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj?hhhj!?hM}ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj ?hhhj!?hM}ubah}(h]j?ah ](jjeh"]h$]h&]jj)jhuh1j'hj!?hM}hj ?hhubj)}(hhh]h)}(h&Monitoring intervals auto-tuning goal.h]h&Monitoring intervals auto-tuning goal.}(hjV?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjS?hhubah}(h]h ]h"]h$]h&]uh1jhj ?hhhj!?hM}ubeh}(h]h ](jstructeh"]h$]h&]jjjjn?jjn?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}(hjz?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjv?ubh:}(hjv?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjr?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.hhMhjr?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.hhMhjr?ubj#)}(hhh](j()}(h@``access_bp`` Access events observation ratio to achieve in bp. h](j.)}(h ``access_bp``h]h)}(hj?h]h access_bp}(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)}(h1Access events observation ratio to achieve in bp.h]h1Access events observation ratio to achieve in bp.}(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()}(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@hMhj?ubj()}(hG``min_sample_us`` Minimum resulting sampling interval in microseconds. h](j.)}(h``min_sample_us``h]h)}(hjG@h]h min_sample_us}(hjI@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE@ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjA@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&]uh1jGhjA@ubeh}(h]h ]h"]h$]h&]uh1j'hj\@hMhj?ubj()}(hF``max_sample_us`` Maximum resulting sampling interval in microseconds.h](j.)}(h``max_sample_us``h]h)}(hj@h]h max_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.hhMhjz@ubjH)}(hhh]h)}(h4Maximum resulting sampling interval in microseconds.h]h4Maximum resulting sampling interval in microseconds.}(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&]uh1jGhjz@ubeh}(h]h ]h"]h$]h&]uh1j'hj@hMhj?ubeh}(h]h ]h"]h$]h&]uh1j"hjr?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'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 }(hj@hhhNhNubh)}(h4: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_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj@ubh and }(hj@hhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hjAh]hdamon_attrs->aggr_interval}(hj AhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjAubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjAhMhj@ubhh aiming the ratio in bp (1/10,000) of DAMON-observed access events to theoretical maximum amount within }(hj@hhhNhNubj)}(h **aggrs**h]haggrs}(hj(AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh aggregations be same to }(hj@hhhNhNubj)}(h **access_bp**h]h access_bp}(hj:AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh. The logic increases }(hj@hhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hjNAh]hdamon_attrs->aggr_interval}(hjPAhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjLAubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjAhMhj@ubh and }(hj@hhhNhNubh)}(h6:c:type:`damon_attrs->sampling_interval `h]h)}(hjqAh]hdamon_attrs->sampling_interval}(hjsAhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjoAubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjAhMhj@ubh` in same ratio if the current access events observation ratio is lower than the target for each }(hj@hhhNhNubj)}(h **aggrs**h]haggrs}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh aggregations, and vice versa.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjAhMhhhhubh)}(hNIf **aggrs** is zero, the tuning is disabled and hence this struct is ignored.h](hIf }(hjAhhhNhNubj)}(h **aggrs**h]haggrs}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubhB is zero, the tuning is disabled and hence this struct is ignored.}(hjAhhhNhNubeh}(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}(hjAhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjAhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjAhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjAhhhjAhMubjW)}(h damon_attrsh]j])}(hjAh]h damon_attrs}(hjBhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjBubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjAhhhjAhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjAhhhjAhMubah}(h]jAah ](jjeh"]h$]h&]jj)jhuh1j'hjAhMhjAhhubj)}(hhh]h)}(h4Monitoring attributes for accuracy/overhead control.h]h4Monitoring attributes for accuracy/overhead control.}(hj&BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj#Bhhubah}(h]h ]h"]h$]h&]uh1jhjAhhhjAhMubeh}(h]h ](jstructeh"]h$]h&]jjjj>Bjj>Bjjjuh1j"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}(hjJBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFBubh:}(hjFBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBBubj)}(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; };}hjcBsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBBubh)}(h **Members**h]j)}(hjtBh]hMembers}(hjvBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrBubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBBubj#)}(hhh](j()}(h7``sample_interval`` The time between access samplings. h](j.)}(h``sample_interval``h]h)}(hjBh]hsample_interval}(hjBhhhNhNubah}(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.hhMhjBubjH)}(hhh]h)}(h"The time between access samplings.h]h"The time between access samplings.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMhjBubah}(h]h ]h"]h$]h&]uh1jGhjBubeh}(h]h ]h"]h$]h&]uh1j'hjBhMhjBubj()}(hA``aggr_interval`` The time between monitor results aggregations. h](j.)}(h``aggr_interval``h]h)}(hjBh]h aggr_interval}(hjBhhhNhNubah}(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.hhMhjBubjH)}(hhh]h)}(h.The time between monitor results aggregations.h]h.The time between monitor results aggregations.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMhjBubah}(h]h ]h"]h$]h&]uh1jGhjBubeh}(h]h ]h"]h$]h&]uh1j'hjBhMhjBubj()}(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.hhMhjBubjH)}(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&]uh1jGhjBubeh}(h]h ]h"]h$]h&]uh1j'hjChMhjBubj()}(h/``intervals_goal`` Intervals auto-tuning goal. h](j.)}(h``intervals_goal``h]h)}(hj>Ch]hintervals_goal}(hj@ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnr_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 }(hj DhhhNhNubj)}(h**sample_interval**h]hsample_interval}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj DubhF, DAMON checks whether each region is accessed or not during the last }(hj DhhhNhNubj)}(h**sample_interval**h]hsample_interval}(hj#DhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj DubhK. If such access is found, DAMON aggregates the information by increasing }(hj DhhhNhNubh)}(h2:c:type:`damon_region->nr_accesses `h]h)}(hj7Dh]hdamon_region->nr_accesses}(hj9DhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5Dubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj Dubh for }(hj DhhhNhNubj)}(h**aggr_interval**h]h aggr_interval}(hjYDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Dubh time. For each }(hj DhhhNhNubj)}(h**aggr_interval**h]h aggr_interval}(hjkDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Dubha, the count is reset. DAMON also checks whether the target memory regions need update (e.g., by }(hj DhhhNhNubh)}(h ``mmap()``h]hmmap()}(hj}DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj Dubhd calls from the application, in case of virtual memory monitoring) and applies the changes for each }(hj DhhhNhNubj)}(h**ops_update_interval**h]hops_update_interval}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Dubh=. All time intervals are in micro-seconds. Please refer to }(hj DhhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjDh]hstruct damon_operations}(hjDhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjDubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhjTDhMhj Dubh and }(hj DhhhNhNubh)}(h8:c:type:`struct damon_call_control `h]h)}(hjDh]hstruct damon_call_control}(hjDhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjDubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjTDhMhj Dubh for more detail.}(hj DhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjTDhMhhhhubj)}(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}(hj&EhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj"Eubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjEhhhjEhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjDhhhjEhMubah}(h]jDah ](jjeh"]h$]h&]jj)jhuh1j'hjEhMhjDhhubj)}(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.}(hjHEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjEEhhubah}(h]h ]h"]h$]h&]uh1jhjDhhhjEhMubeh}(h]h ](jstructeh"]h$]h&]jjjj`Ejj`Ejjjuh1j"hhhhhj!hNubj)}(hX9**Definition**:: struct damon_ctx { struct damon_attrs attrs; struct task_struct *kdamond; struct mutex kdamond_lock; struct damon_operations ops; unsigned long addr_unit; unsigned long min_sz_region; struct list_head adaptive_targets; struct list_head schemes; }; **Members** ``attrs`` Monitoring attributes for accuracy/overhead control. ``kdamond`` Kernel thread who does the monitoring. ``kdamond_lock`` Mutex for the synchronizations with **kdamond**. ``ops`` Set of monitoring operations for given use cases. ``addr_unit`` Scale factor for core to ops address conversion. ``min_sz_region`` 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}(hjlEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhEubh:}(hjhEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjdEubj)}(hXstruct damon_ctx { struct damon_attrs attrs; struct task_struct *kdamond; struct mutex kdamond_lock; struct damon_operations ops; unsigned long addr_unit; unsigned long min_sz_region; struct list_head adaptive_targets; struct list_head schemes; };h]hXstruct damon_ctx { struct damon_attrs attrs; struct task_struct *kdamond; struct mutex kdamond_lock; struct damon_operations ops; unsigned long addr_unit; unsigned long min_sz_region; struct list_head adaptive_targets; struct list_head schemes; };}hjEsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjdEubh)}(h **Members**h]j)}(hjEh]hMembers}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjdEubj#)}(hhh](j()}(h?``attrs`` Monitoring attributes for accuracy/overhead control. h](j.)}(h ``attrs``h]h)}(hjEh]hattrs}(hjEhhhNhNubah}(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.hhMhjEubjH)}(hhh]h)}(h4Monitoring attributes for accuracy/overhead control.h]h4Monitoring attributes for accuracy/overhead control.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhMhjEubah}(h]h ]h"]h$]h&]uh1jGhjEubeh}(h]h ]h"]h$]h&]uh1j'hjEhMhjEubj()}(h3``kdamond`` Kernel thread who does the monitoring. h](j.)}(h ``kdamond``h]h)}(hjEh]hkdamond}(hjEhhhNhNubah}(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.hhMhjEubjH)}(hhh]h)}(h&Kernel thread who does the monitoring.h]h&Kernel thread who does the monitoring.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jGhjEubeh}(h]h ]h"]h$]h&]uh1j'hjFhMhjEubj()}(hB``kdamond_lock`` Mutex for the synchronizations with **kdamond**. h](j.)}(h``kdamond_lock``h]h)}(hj'Fh]h kdamond_lock}(hj)FhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%Fubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj!FubjH)}(hhh]h)}(h0Mutex for the synchronizations with **kdamond**.h](h$Mutex for the synchronizations with }(hj@FhhhNhNubj)}(h **kdamond**h]hkdamond}(hjHFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@Fubh.}(hj@FhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_targetuh1hhj2GhMhj6Gubh) list.}(hj6GhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2GhMhj3Gubah}(h]h ]h"]h$]h&]uh1jGhjGubeh}(h]h ]h"]h$]h&]uh1j'hj2GhMhjEubj()}(h3``schemes`` Head of schemes (:c:type:`damos`) list.h](j.)}(h ``schemes``h]h)}(hjyGh]hschemes}(hj{GhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwGubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjsGubjH)}(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.hhMhjGubh) list.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjGhMhjGubah}(h]h ]h"]h$]h&]uh1jGhjsGubeh}(h]h ]h"]h$]h&]uh1j'hjGhMhjEubeh}(h]h ]h"]h$]h&]uh1j"hjdEubeh}(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.hhM hhhhubh)}(hFor each monitoring context, one kernel thread for the monitoring is created. The pointer to the thread is stored in **kdamond**.h](hvFor each monitoring context, one kernel thread for the monitoring is created. The pointer to the thread is stored in }(hjGhhhNhNubj)}(h **kdamond**h]hkdamond}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hXCOnce started, the monitoring thread 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(). The thread sets **kdamond** to NULL when it terminates. Therefore, users can know whether the monitoring is ongoing or terminated by reading **kdamond**. Reads and writes to **kdamond** from outside of the monitoring thread must be protected by **kdamond_lock**.h](hOnce started, the monitoring thread 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(). The thread sets }(hjHhhhNhNubj)}(h **kdamond**h]hkdamond}(hjTHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubhr to NULL when it terminates. Therefore, users can know whether the monitoring is ongoing or terminated by reading }(hjHhhhNhNubj)}(h **kdamond**h]hkdamond}(hjfHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh. Reads and writes to }(hjHhhhNhNubj)}(h **kdamond**h]hkdamond}(hjxHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh< from outside of the monitoring thread must be protected by }(hjHhhhNhNubj)}(h**kdamond_lock**h]h kdamond_lock}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj=HhMhhhhubh)}(hNote that the monitoring thread protects only **kdamond** via **kdamond_lock**. Accesses to other fields must be protected by themselves.h](h.Note that the monitoring thread protects only }(hjHhhhNhNubj)}(h **kdamond**h]hkdamond}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh via }(hjHhhhNhNubj)}(h**kdamond_lock**h]h kdamond_lock}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh;. Accesses to other fields must be protected by themselves.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubeh}(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}(hj IhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jIhjIhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK+ubjF)}(h h]h }(hjIhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjIhhhjIhK+ubjW)}(hdamon_is_registered_opsh]j])}(hdamon_is_registered_opsh]hdamon_is_registered_ops}(hj+IhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj'Iubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjIhhhjIhK+ubhdesc_parameterlist)}(h(enum damon_ops_id id)h]hdesc_parameter)}(henum damon_ops_id idh](j4)}(hj h]henum}(hjKIhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjGIubjF)}(h h]h }(hjXIhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjGIubh)}(hhh]j])}(h damon_ops_idh]h damon_ops_id}(hjiIhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjfIubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetjkImodnameN classnameNjj)}j]j#")}j&"j-Isbc.damon_is_registered_opsasbuh1hhjGIubjF)}(h h]h }(hjIhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjGIubj])}(hidh]hid}(hjIhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjGIubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjAIubah}(h]h ]h"]h$]h&]hhuh1j?IhjIhhhjIhK+ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjHhhhjIhK+ubah}(h]jHah ](jjeh"]h$]h&]jj)jhuh1j'hjIhK+hjHhhubj)}(hhh]h)}(h0Check if a given damon_operations is registered.h]h0Check if a given damon_operations is registered.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK+hjIhhubah}(h]h ]h"]h$]h&]uh1jhjHhhhjIhK+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)}(hjJh]henum damon_ops_id id}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubah}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhK,hjJubah}(h]h ]h"]h$]h&]uh1jGhjIubeh}(h]h ]h"]h$]h&]uh1j'hjJhK,hjIubah}(h]h ]h"]h$]h&]uh1j"hjIubh)}(h **Return**h]j)}(hj=Jh]hReturn}(hj?JhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;Jubah}(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.}(hjSJhhhNhNubah}(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](jI)}(hinth]hint}(hjJhhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj~JhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK=ubjF)}(h h]h }(hjJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj~JhhhjJhK=ubjW)}(hdamon_register_opsh]j])}(hdamon_register_opsh]hdamon_register_ops}(hjJhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjJubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj~JhhhjJhK=ubj@I)}(h(struct damon_operations *ops)h]jFI)}(hstruct damon_operations *opsh](j4)}(hj7h]hstruct}(hjJhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjJubjF)}(h h]h }(hjJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjJubh)}(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&"jJsbc.damon_register_opsasbuh1hhjJubjF)}(h h]h }(hjJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjJubhdesc_sig_punctuation)}(h*h]h*}(hj KhhhNhNubah}(h]h ]pah"]h$]h&]uh1j KhjJubj])}(hopsh]hops}(hjKhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjJubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjJubah}(h]h ]h"]h$]h&]hhuh1j?Ihj~JhhhjJhK=ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjzJhhhjJhK=ubah}(h]juJah ](jjeh"]h$]h&]jj)jhuh1j'hjJhK=hjwJhhubj)}(hhh]h)}(h.Register a monitoring operations set to DAMON.h]h.Register a monitoring operations set to DAMON.}(hjFKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK=hjCKhhubah}(h]h ]h"]h$]h&]uh1jhjwJhhhjJhK=ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj^Kjj^Kjjjuh1j"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)}(hjhKh]h Parameters}(hjjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfKubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKAhjbKubj#)}(hhh]j()}(hH``struct damon_operations *ops`` monitoring operations set to register. h](j.)}(h ``struct damon_operations *ops``h]h)}(hjKh]hstruct damon_operations *ops}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK>hjKubjH)}(hhh]h)}(h&monitoring operations set to register.h]h&monitoring operations set to register.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhK>hjKubah}(h]h ]h"]h$]h&]uh1jGhjKubeh}(h]h ]h"]h$]h&]uh1j'hjKhK>hj~Kubah}(h]h ]h"]h$]h&]uh1j"hjbKubh)}(h**Description**h]j)}(hjKh]h Description}(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.chK@hjbKubh)}(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?hjbKubh)}(h **Return**h]j)}(hj Lh]hReturn}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Lubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKBhjbKubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hj"LhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKChjbKubeh}(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](jI)}(hinth]hint}(hjQLhhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhjMLhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKWubjF)}(h h]h }(hj`LhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjMLhhhj_LhKWubjW)}(hdamon_select_opsh]j])}(hdamon_select_opsh]hdamon_select_ops}(hjrLhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjnLubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjMLhhhj_LhKWubj@I)}(h-(struct damon_ctx *ctx, enum damon_ops_id id)h](jFI)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjLhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjLubjF)}(h h]h }(hjLhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjLhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjLubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetjLmodnameN classnameNjj)}j]j#")}j&"jtLsbc.damon_select_opsasbuh1hhjLubjF)}(h h]h }(hjLhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLubj K)}(hjKh]h*}(hjLhhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjLubj])}(hctxh]hctx}(hjLhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjLubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjLubjFI)}(henum damon_ops_id idh](j4)}(hj h]henum}(hjMhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjLubjF)}(h h]h }(hj MhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjLubh)}(hhh]j])}(h damon_ops_idh]h damon_ops_id}(hjMhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjMubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetj MmodnameN classnameNjj)}j]jLc.damon_select_opsasbuh1hhjLubjF)}(h h]h }(hjPhhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj:PhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hjMPhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj:PhhhjLPhMubjW)}(hdamon_set_attrsh]j])}(hdamon_set_attrsh]hdamon_set_attrs}(hj_PhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj[Pubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj:PhhhjLPhMubj@I)}(h2(struct damon_ctx *ctx, struct damon_attrs *attrs)h](jFI)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hj{PhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjwPubjF)}(h h]h }(hjPhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjwPubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjPhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetjPmodnameN classnameNjj)}j]j#")}j&"jaPsbc.damon_set_attrsasbuh1hhjwPubjF)}(h h]h }(hjPhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjwPubj K)}(hjKh]h*}(hjPhhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjwPubj])}(hctxh]hctx}(hjPhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjwPubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjsPubjFI)}(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}(hj QhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjQubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetj QmodnameN classnameNjj)}j]jPc.damon_set_attrsasbuh1hhjPubjF)}(h h]h }(hj)QhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPubj K)}(hjKh]h*}(hj7QhhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjPubj])}(hattrsh]hattrs}(hjDQhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjsPubeh}(h]h ]h"]h$]h&]hhuh1j?Ihj:PhhhjLPhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj6PhhhjLPhMubah}(h]j1Pah ](jjeh"]h$]h&]jj)jhuh1j'hjLPhMhj3Phhubj)}(hhh]h)}(h"Set attributes for the monitoring.h]h"Set attributes for the monitoring.}(hjnQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjkQhhubah}(h]h ]h"]h$]h&]uh1jhj3PhhhjLPhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjQjjQjjjuh1j"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)}(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.chMhjQubj#)}(hhh](j()}(h-``struct damon_ctx *ctx`` monitoring context h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjQh]hstruct damon_ctx *ctx}(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 contexth]hmonitoring context}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhMhjQubah}(h]h ]h"]h$]h&]uh1jGhjQubeh}(h]h ]h"]h$]h&]uh1j'hjQhMhjQubj()}(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}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhMhjQubah}(h]h ]h"]h$]h&]uh1jGhjQubeh}(h]h ]h"]h$]h&]uh1j'hjQhMhjQubeh}(h]h ]h"]h$]h&]uh1j"hjQubh)}(h**Description**h]j)}(hj#Rh]h Description}(hj%RhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!Rubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjQubh)}(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().}(hj9RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjQubh)}(h(Every time interval is in micro-seconds.h]h(Every time interval is in micro-seconds.}(hjHRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjQubh)}(h **Return**h]j)}(hjYRh]hReturn}(hj[RhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWRubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjQubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjoRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjQubeh}(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](jI)}(hvoidh]hvoid}(hjRhhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhjRhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hjRhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjRhhhjRhMubjW)}(hdamon_set_schemesh]j])}(hdamon_set_schemesh]hdamon_set_schemes}(hjRhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjRubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjRhhhjRhMubj@I)}(hC(struct damon_ctx *ctx, struct damos **schemes, ssize_t nr_schemes)h](jFI)}(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&"jRsbc.damon_set_schemesasbuh1hhjRubjF)}(h h]h }(hjShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjRubj K)}(hjKh]h*}(hj'ShhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjRubj])}(hctxh]hctx}(hj4ShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjRubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjRubjFI)}(hstruct damos **schemesh](j4)}(hj7h]hstruct}(hjMShhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjISubjF)}(h h]h }(hjZShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjISubh)}(hhh]j])}(hdamosh]hdamos}(hjkShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjhSubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetjmSmodnameN classnameNjj)}j]jSc.damon_set_schemesasbuh1hhjISubjF)}(h h]h }(hjShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjISubj K)}(hjKh]h*}(hjShhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjISubj K)}(hjKh]h*}(hjShhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjISubj])}(hschemesh]hschemes}(hjShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjISubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjRubjFI)}(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]jSc.damon_set_schemesasbuh1hhjSubjF)}(h h]h }(hjShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjSubj])}(h nr_schemesh]h nr_schemes}(hjShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjSubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjRubeh}(h]h ]h"]h$]h&]hhuh1j?IhjRhhhjRhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjRhhhjRhMubah}(h]jRah ](jjeh"]h$]h&]jj)jhuh1j'hjRhMhjRhhubj)}(hhh]h)}(h3Set data access monitoring based operation schemes.h]h3Set data access monitoring based operation schemes.}(hj#ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj Thhubah}(h]h ]h"]h$]h&]uh1jhjRhhhjRhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj;Tjj;Tjjjuh1j"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)}(hjETh]h Parameters}(hjGThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCTubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj?Tubj#)}(hhh](j()}(h-``struct damon_ctx *ctx`` monitoring context h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjdTh]hstruct damon_ctx *ctx}(hjfThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbTubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj^TubjH)}(hhh]h)}(hmonitoring contexth]hmonitoring context}(hj}ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyThMhjzTubah}(h]h ]h"]h$]h&]uh1jGhj^Tubeh}(h]h ]h"]h$]h&]uh1j'hjyThMhj[Tubj()}(h0``struct damos **schemes`` array of the schemes h](j.)}(h``struct damos **schemes``h]h)}(hjTh]hstruct damos **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)}(harray of the schemesh]harray of the schemes}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThMhjTubah}(h]h ]h"]h$]h&]uh1jGhjTubeh}(h]h ]h"]h$]h&]uh1j'hjThMhj[Tubj()}(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'hjThMhj[Tubeh}(h]h ]h"]h$]h&]uh1j"hj?Tubh)}(h**Description**h]j)}(hjUh]h Description}(hj!UhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj?Tubh)}(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.}(hj5UhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj?Tubeh}(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](jI)}(hinth]hint}(hjdUhhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj`UhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM*ubjF)}(h h]h }(hjsUhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj`UhhhjrUhM*ubjW)}(hdamos_commit_quota_goalsh]j])}(hdamos_commit_quota_goalsh]hdamos_commit_quota_goals}(hjUhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjUubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj`UhhhjrUhM*ubj@I)}(h2(struct damos_quota *dst, struct damos_quota *src)h](jFI)}(hstruct damos_quota *dsth](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]j#")}j&"jUsbc.damos_commit_quota_goalsasbuh1hhjUubjF)}(h h]h }(hjUhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjUubj K)}(hjKh]h*}(hjUhhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjUubj])}(hdsth]hdst}(hjUhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjUubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjUubjFI)}(hstruct damos_quota *srch](j4)}(hj7h]hstruct}(hjVhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjVubjF)}(h h]h }(hj VhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjVubh)}(hhh]j])}(h damos_quotah]h damos_quota}(hj1VhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj.Vubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetj3VmodnameN classnameNjj)}j]jUc.damos_commit_quota_goalsasbuh1hhjVubjF)}(h h]h }(hjOVhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjVubj K)}(hjKh]h*}(hj]VhhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjVubj])}(hsrch]hsrc}(hjjVhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjVubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjUubeh}(h]h ]h"]h$]h&]hhuh1j?Ihj`UhhhjrUhM*ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj\UhhhjrUhM*ubah}(h]jWUah ](jjeh"]h$]h&]jj)jhuh1j'hjrUhM*hjYUhhubj)}(hhh]h)}(h*Commit DAMOS quota goals to another quota.h]h*Commit DAMOS quota goals to another quota.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM*hjVhhubah}(h]h ]h"]h$]h&]uh1jhjYUhhhjrUhM*ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjVjjVjjjuh1j"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)}(hjVh]h Parameters}(hjVhhhNhNubah}(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.chM.hjVubj#)}(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.chM+hjVubjH)}(hhh]h)}(h#The commit destination DAMOS quota.h]h#The commit destination DAMOS quota.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhM+hjVubah}(h]h ]h"]h$]h&]uh1jGhjVubeh}(h]h ]h"]h$]h&]uh1j'hjVhM+hjVubj()}(h;``struct damos_quota *src`` The commit source DAMOS quota. h](j.)}(h``struct damos_quota *src``h]h)}(hjWh]hstruct damos_quota *src}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj Wubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM,hjWubjH)}(hhh]h)}(hThe commit source DAMOS quota.h]hThe commit source DAMOS quota.}(hj'WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#WhM,hj$Wubah}(h]h ]h"]h$]h&]uh1jGhjWubeh}(h]h ]h"]h$]h&]uh1j'hj#WhM,hjVubeh}(h]h ]h"]h$]h&]uh1j"hjVubh)}(h**Description**h]j)}(hjIWh]h Description}(hjKWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGWubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM.hjVubh)}(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 }(hj_WhhhNhNubj)}(h**src**h]hsrc}(hjgWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_Wubh to }(hj_WhhhNhNubj)}(h**dst**h]hdst}(hjyWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_Wubh. Users should use this function for quota goals-level parameters update of running DAMON contexts, instead of manual in-place updates.}(hj_WhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM-hjVubh)}(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().}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM1hjVubeh}(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.)}(hYsbc.damon_commit_ctxasbuh1hhjTYubjF)}(h h]h }(hjYhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjTYubj K)}(hjKh]h*}(hjYhhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjTYubj])}(hdsth]hdst}(hjYhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjTYubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjPYubjFI)}(hstruct damon_ctx *srch](j4)}(hj7h]hstruct}(hjYhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjYubjF)}(h h]h }(hjYhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjYubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjYhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjYubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetjYmodnameN classnameNjj)}j]jYc.damon_commit_ctxasbuh1hhjYubjF)}(h h]h }(hjZhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjYubj K)}(hjKh]h*}(hjZhhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjYubj])}(hsrch]hsrc}(hj!ZhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjYubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjPYubeh}(h]h ]h"]h$]h&]hhuh1j?IhjYhhhj)YhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjYhhhj)YhMubah}(h]jYah ](jjeh"]h$]h&]jj)jhuh1j'hj)YhMhjYhhubj)}(hhh]h)}(h0Commit parameters of a DAMON context to another.h]h0Commit parameters of a DAMON context to another.}(hjKZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjHZhhubah}(h]h ]h"]h$]h&]uh1jhjYhhhj)YhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjcZjjcZjjjuh1j"hhhjHhNhNubj)}(hX**Parameters** ``struct damon_ctx *dst`` The commit destination DAMON context. ``struct damon_ctx *src`` The commit source DAMON context. **Description** This function copies user-specified parameters from **src** to **dst** and update the internal status and results accordingly. Users should use this function for context-level parameters update of running context, 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)}(hjmZh]h Parameters}(hjoZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkZubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjgZubj#)}(hhh](j()}(h@``struct damon_ctx *dst`` The commit destination DAMON context. h](j.)}(h``struct damon_ctx *dst``h]h)}(hjZh]hstruct damon_ctx *dst}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjZubjH)}(hhh]h)}(h%The commit destination DAMON context.h]h%The commit destination DAMON context.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhMhjZubah}(h]h ]h"]h$]h&]uh1jGhjZubeh}(h]h ]h"]h$]h&]uh1j'hjZhMhjZubj()}(h;``struct damon_ctx *src`` The commit source DAMON context. h](j.)}(h``struct damon_ctx *src``h]h)}(hjZh]hstruct damon_ctx *src}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjZubjH)}(hhh]h)}(h The commit source DAMON context.h]h The commit source DAMON context.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhMhjZubah}(h]h ]h"]h$]h&]uh1jGhjZubeh}(h]h ]h"]h$]h&]uh1j'hjZhMhjZubeh}(h]h ]h"]h$]h&]uh1j"hjgZubh)}(h**Description**h]j)}(hj[h]h Description}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjgZubh)}(hThis function copies user-specified parameters from **src** to **dst** and update the internal status and results accordingly. Users should use this function for context-level parameters update of running context, instead of manual in-place updates.h](h4This function copies user-specified parameters from }(hj[hhhNhNubj)}(h**src**h]hsrc}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubh to }(hj[hhhNhNubj)}(h**dst**h]hdst}(hj0[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubh and update the internal status and results accordingly. Users should use this function for context-level parameters update of running context, instead of manual in-place updates.}(hj[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjgZubh)}(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().}(hjI[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjgZubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"damon_nr_running_ctxs (C function)c.damon_nr_running_ctxshNtauh1jhjHhhhNhNubj#)}(hhh](j()}(h int damon_nr_running_ctxs (void)h]j.)}(hint damon_nr_running_ctxs(void)h](jI)}(hinth]hint}(hjx[hhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhjt[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&]uh1jEhjt[hhhj[hMubjW)}(hdamon_nr_running_ctxsh]j])}(hdamon_nr_running_ctxsh]hdamon_nr_running_ctxs}(hj[hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj[ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjt[hhhj[hMubj@I)}(h(void)h]jFI)}(hvoidh]jI)}(hvoidh]hvoid}(hj[hhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj[ubah}(h]h ]h"]h$]h&]noemphhhuh1jEIhj[ubah}(h]h ]h"]h$]h&]hhuh1j?Ihjt[hhhj[hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjp[hhhj[hMubah}(h]jk[ah ](jjeh"]h$]h&]jj)jhuh1j'hj[hMhjm[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&]uh1jhjm[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.chMhj[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.chMhj\ubjH)}(hhh]h)}(h no argumentsh]h no arguments}(hj9\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKhj6\ubah}(h]h ]h"]h$]h&]uh1jGhj\ubeh}(h]h ]h"]h$]h&]uh1j'hj5\hMhj\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](jI)}(hinth]hint}(hjz\hhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhjv\hhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM8ubjF)}(h h]h }(hj\hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjv\hhhj\hM8ubjW)}(h damon_starth]j])}(h damon_starth]h damon_start}(hj\hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj\ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjv\hhhj\hM8ubj@I)}(h6(struct damon_ctx **ctxs, int nr_ctxs, bool exclusive)h](jFI)}(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\hj\ubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetj\modnameN classnameNjj)}j]j#")}j&"j\sb c.damon_startasbuh1hhj\ubjF)}(h h]h }(hj\hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj\ubj K)}(hjKh]h*}(hj]hhhNhNubah}(h]h ]jKah"]h$]h&]uh1j Khj\ubj K)}(hjKh]h*}(hj]hhhNhNubah}(h]h ]jKah"]h$]h&]uh1j Khj\ubj])}(hctxsh]hctxs}(hj]hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj\ubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhj\ubjFI)}(h int nr_ctxsh](jI)}(hinth]hint}(hj6]hhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj2]ubjF)}(h h]h }(hjD]hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj2]ubj])}(hnr_ctxsh]hnr_ctxs}(hjR]hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj2]ubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhj\ubjFI)}(hbool exclusiveh](jI)}(hj Ih]hbool}(hjk]hhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhjg]ubjF)}(h h]h }(hjx]hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjg]ubj])}(h exclusiveh]h exclusive}(hj]hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjg]ubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhj\ubeh}(h]h ]h"]h$]h&]hhuh1j?Ihjv\hhhj\hM8ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjr\hhhj\hM8ubah}(h]jm\ah ](jjeh"]h$]h&]jj)jhuh1j'hj\hM8hjo\hhubj)}(hhh]h)}(h5Starts the monitorings for a given group of contexts.h]h5Starts 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.chM8hj]hhubah}(h]h ]h"]h$]h&]uh1jhjo\hhhj\hM8ubeh}(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.chM<hj]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.chM9hj]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^hM9hj^ubah}(h]h ]h"]h$]h&]uh1jGhj]ubeh}(h]h ]h"]h$]h&]uh1j'hj^hM9hj]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.chM:hj$^ubjH)}(hhh]h)}(hsize of **ctxs**h](hsize of }(hjC^hhhNhNubj)}(h**ctxs**h]hctxs}(hjK^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC^ubeh}(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()}(h8``bool exclusive`` exclusiveness of this contexts group h](j.)}(h``bool exclusive``h]h)}(hjq^h]hbool exclusive}(hjs^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo^ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM;hjk^ubjH)}(hhh]h)}(h$exclusiveness of this contexts grouph]h$exclusiveness of this contexts group}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hM;hj^ubah}(h]h ]h"]h$]h&]uh1jGhjk^ubeh}(h]h ]h"]h$]h&]uh1j'hj^hM;hj]ubeh}(h]h ]h"]h$]h&]uh1j"hj]ubh)}(h**Description**h]j)}(hj^h]h Description}(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]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 }(hj^hhhNhNubj)}(h **exclusive**h]h exclusive}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^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.}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM<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.chMChj]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.chMDhj]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](jI)}(hinth]hint}(hj*_hhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj&_hhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMwubjF)}(h h]h }(hj9_hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj&_hhhj8_hMwubjW)}(h damon_stoph]j])}(h damon_stoph]h damon_stop}(hjK_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjG_ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj&_hhhj8_hMwubj@I)}(h&(struct damon_ctx **ctxs, int nr_ctxs)h](jFI)}(hstruct damon_ctx **ctxsh](j4)}(hj7h]hstruct}(hjg_hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjc_ubjF)}(h h]h }(hjt_hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjc_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&"jM_sb c.damon_stopasbuh1hhjc_ubjF)}(h h]h }(hj_hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjc_ubj K)}(hjKh]h*}(hj_hhhNhNubah}(h]h ]jKah"]h$]h&]uh1j Khjc_ubj K)}(hjKh]h*}(hj_hhhNhNubah}(h]h ]jKah"]h$]h&]uh1j Khjc_ubj])}(hctxsh]hctxs}(hj_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjc_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhj__ubjFI)}(h int nr_ctxsh](jI)}(hinth]hint}(hj_hhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj_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&]noemphhhuh1jEIhj__ubeh}(h]h ]h"]h$]h&]hhuh1j?Ihj&_hhhj8_hMwubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj"_hhhj8_hMwubah}(h]j_ah ](jjeh"]h$]h&]jj)jhuh1j'hj8_hMwhj_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.chMwhj)`hhubah}(h]h ]h"]h$]h&]uh1jhj_hhhj8_hMwubeh}(h]h ](jfunctioneh"]h$]h&]jjjjD`jjD`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)}(hjN`h]h Parameters}(hjP`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL`ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM{hjH`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)}(hjm`h]hstruct damon_ctx **ctxs}(hjo`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjk`ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMxhjg`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&]uh1hhj`hMxhj`ubah}(h]h ]h"]h$]h&]uh1jGhjg`ubeh}(h]h ]h"]h$]h&]uh1j'hj`hMxhjd`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.chMyhj`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`hMyhj`ubah}(h]h ]h"]h$]h&]uh1jGhj`ubeh}(h]h ]h"]h$]h&]uh1j'hj`hMyhjd`ubeh}(h]h ]h"]h$]h&]uh1j"hjH`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.chM{hjH`ubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM{hjH`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](jI)}(hj Ih]hbool}(hj4ahhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj0ahhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hjBahhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj0ahhhjAahMubjW)}(hdamon_is_runningh]j])}(hdamon_is_runningh]hdamon_is_running}(hjTahhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPaubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj0ahhhjAahMubj@I)}(h(struct damon_ctx *ctx)h]jFI)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjpahhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjlaubjF)}(h h]h }(hj}ahhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjlaubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjahhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjaubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetjamodnameN classnameNjj)}j]j#")}j&"jVasbc.damon_is_runningasbuh1hhjlaubjF)}(h h]h }(hjahhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjlaubj K)}(hjKh]h*}(hjahhhNhNubah}(h]h ]jKah"]h$]h&]uh1j Khjlaubj])}(hctxh]hctx}(hjahhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjlaubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjhaubah}(h]h ]h"]h$]h&]hhuh1j?Ihj0ahhhjAahMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj,ahhhjAahMubah}(h]j'aah ](jjeh"]h$]h&]jj)jhuh1j'hjAahMhj)ahhubj)}(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)ahhhjAahMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj bjj bjjjuh1j"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)}(hjbh]h Parameters}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjbubj#)}(hhh]j()}(h?``struct damon_ctx *ctx`` The DAMON context to see if running. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hj4bh]hstruct damon_ctx *ctx}(hj6bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2bubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj.bubjH)}(hhh]h)}(h$The DAMON context to see if running.h]h$The DAMON context to see if running.}(hjMbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIbhMhjJbubah}(h]h ]h"]h$]h&]uh1jGhj.bubeh}(h]h ]h"]h$]h&]uh1j'hjIbhMhj+bubah}(h]h ]h"]h$]h&]uh1j"hjbubh)}(h **Return**h]j)}(hjobh]hReturn}(hjqbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmbubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjbubh)}(h,true if **ctx** is running, false otherwise.h](htrue if }(hjbhhhNhNubj)}(h**ctx**h]hctx}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubh is running, false otherwise.}(hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjbubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjHhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_call (C function) c.damon_callhNtauh1jhjHhhhNhNubj#)}(hhh](j()}(hJint damon_call (struct damon_ctx *ctx, struct damon_call_control *control)h]j.)}(hIint damon_call(struct damon_ctx *ctx, struct damon_call_control *control)h](jI)}(hinth]hint}(hjbhhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhjbhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hjbhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjbhhhjbhMubjW)}(h damon_callh]j])}(h damon_callh]h damon_call}(hjbhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjbubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjbhhhjbhMubj@I)}(h;(struct damon_ctx *ctx, struct damon_call_control *control)h](jFI)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjchhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjbubjF)}(h h]h }(hjchhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjbubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hj!chhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjcubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetj#cmodnameN classnameNjj)}j]j#")}j&"jbsb c.damon_callasbuh1hhjbubjF)}(h h]h }(hjAchhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjbubj K)}(hjKh]h*}(hjOchhhNhNubah}(h]h ]jKah"]h$]h&]uh1j Khjbubj])}(hctxh]hctx}(hj\chhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjbubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjbubjFI)}(h"struct damon_call_control *controlh](j4)}(hj7h]hstruct}(hjuchhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjqcubjF)}(h h]h }(hjchhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjqcubh)}(hhh]j])}(hdamon_call_controlh]hdamon_call_controlP}(hjchhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjcubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetjcmodnameN classnameNjj)}j]j=c c.damon_callasbuh1hhjqcubjF)}(h h]h }(hjchhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjqcubj K)}(hjKh]h*}(hjchhhNhNubah}(h]h ]jKah"]h$]h&]uh1j Khjqcubj])}(hcontrolh]hcontrol}(hjchhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjqcubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhjbubeh}(h]h ]h"]h$]h&]hhuh1j?IhjbhhhjbhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjbhhhjbhMubah}(h]jbah ](jjeh"]h$]h&]jj)jhuh1j'hjbhMhjbhhubj)}(hhh]h)}(h9Invoke a given function on DAMON worker thread (kdamond).h]h9Invoke a given function on DAMON worker thread (kdamond).}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjchhubah}(h]h ]h"]h$]h&]uh1jhjbhhhjbhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjdjjdjjjuh1j"hhhjHhNhNubj)}(hX'**Parameters** ``struct damon_ctx *ctx`` DAMON context to call the function for. ``struct damon_call_control *control`` Control variable of the call request. **Description** Ask 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. 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)}(hjdh]h Parameters}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjdubj#)}(hhh](j()}(hB``struct damon_ctx *ctx`` DAMON context to call the function for. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hj7dh]hstruct damon_ctx *ctx}(hj9dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5dubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj1dubjH)}(hhh]h)}(h'DAMON context to call the function for.h]h'DAMON context to call the function for.}(hjPdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLdhMhjMdubah}(h]h ]h"]h$]h&]uh1jGhj1dubeh}(h]h ]h"]h$]h&]uh1j'hjLdhMhj.dubj()}(hM``struct damon_call_control *control`` Control variable of the call request. h](j.)}(h&``struct damon_call_control *control``h]h)}(hjpdh]h"struct damon_call_control *control}(hjrdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjndubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjjdubjH)}(hhh]h)}(h%Control variable of the call request.h]h%Control variable of the call request.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhMhjdubah}(h]h ]h"]h$]h&]uh1jGhjjdubeh}(h]h ]h"]h$]h&]uh1j'hjdhMhj.dubeh}(h]h ]h"]h$]h&]uh1j"hjdubh)}(h**Description**h]j)}(hjdh]h Description}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjdubh)}(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 }(hjdhhhNhNubj)}(h**ctx**h]hctx}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubhG to call a function with an argument data that respectively passed via }(hjdhhhNhNubh)}(h5:c:type:`damon_call_control->fn `h]h)}(hjdh]hdamon_call_control->fn}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjdubh and }(hjdhhhNhNubh)}(h7:c:type:`damon_call_control->data `h]h)}(hjeh]hdamon_call_control->data}(hjehhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjdhMhjdubh of }(hjdhhhNhNubj)}(h **control**h]hcontrol}(hj"ehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubh. If }(hjdhhhNhNubh)}(h9:c:type:`damon_call_control->repeat `h]h)}(hj6eh]hdamon_call_control->repeat}(hj8ehhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj4eubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjdhMhjdubh of }(hjdhhhNhNubj)}(h **control**h]hcontrol}(hjWehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubh~ is unset, further wait until the kdamond finishes handling of the request. Otherwise, return as soon as the request is made.}(hjdhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjdhMhjdubh)}(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 }(hjoehhhNhNubh)}(h&:c:type:`struct damon_ctx `h]h)}(hjyeh]hstruct damon_ctx}(hj{ehhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjweubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjoeubhX without additional synchronization. The return value of the function will be saved in }(hjoehhhNhNubh)}(h>:c:type:`damon_call_control->return_code `h]h)}(hjeh]hdamon_call_control->return_code}(hjehhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjehMhjoeubh.}(hjoehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjehMhjdubh)}(h **Return**h]j)}(hjeh]hReturn}(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.chMhjdubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjdubeh}(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](jI)}(hinth]hint}(hj fhhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhjfhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hjfhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjfhhhjfhMubjW)}(h damos_walkh]j])}(h damos_walkh]h damos_walk}(hj,fhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj(fubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjfhhhjfhMubj@I)}(h;(struct damon_ctx *ctx, struct damos_walk_control *control)h](jFI)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjHfhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjDfubjF)}(h h]h }(hjUfhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjDfubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjffhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjcfubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetjhfmodnameN classnameNjj)}j]j#")}j&"j.fsb c.damos_walkasbuh1hhjDfubjF)}(h h]h }(hjfhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjDfubj K)}(hjKh]h*}(hjfhhhNhNubah}(h]h ]jKah"]h$]h&]uh1j KhjDfubj])}(hctxh]hctx}(hjfhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjDfubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhj@fubjFI)}(h"struct damos_walk_control *controlh](j4)}(hj7h]hstruct}(hjfhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjfubjF)}(h h]h }(hjfhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjfubh)}(hhh]j])}(hdamos_walk_controlh]hdamos_walk_control}(hjfhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjfubah}(h]h ]h"]h$]h&] refdomainjreftypej&" reftargetjfmodnameN classnameNjj)}j]jf c.damos_walkasbuh1hhjfubjF)}(h h]h }(hjfhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjfubj K)}(hjKh]h*}(hjghhhNhNubah}(h]h ]jKah"]h$]h&]uh1j Khjfubj])}(hcontrolh]hcontrol}(hjghhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjfubeh}(h]h ]h"]h$]h&]noemphhhuh1jEIhj@fubeh}(h]h ]h"]h$]h&]hhuh1j?IhjfhhhjfhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjfhhhjfhMubah}(h]jeah ](jjeh"]h$]h&]jj)jhuh1j'hjfhMhjfhhubj)}(hhh]h)}(h2Invoke a given functions while DAMOS walk regions.h]h2Invoke a given functions while DAMOS walk regions.}(hj;ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj8ghhubah}(h]h ]h"]h$]h&]uh1jhjfhhhjfhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjSgjjSgjjjuh1j"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)}(hj]gh]h Parameters}(hj_ghhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[gubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjWgubj#)}(hhh](j()}(hC``struct damon_ctx *ctx`` DAMON context to call the functions for. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hj|gh]hstruct damon_ctx *ctx}(hj~ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzgubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjvgubjH)}(hhh]h)}(h(DAMON context to call the functions for.h]h(DAMON context to call the functions for.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjgubah}(h]h ]h"]h$]h&]uh1jGhjvgubeh}(h]h ]h"]h$]h&]uh1j'hjghMhjsgubj()}(hM``struct damos_walk_control *control`` Control variable of the walk request. h](j.)}(h&``struct damos_walk_control *control``h]h)}(hjgh]h"struct damos_walk_control *control}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjgubjH)}(hhh]h)}(h%Control variable of the walk request.h]h%Control variable of the walk request.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjgubah}(h]h ]h"]h$]h&]uh1jGhjgubeh}(h]h ]h"]h$]h&]uh1j'hjghMhjsgubeh}(h]h ]h"]h$]h&]uh1j"hjWgubh)}(h**Description**h]j)}(hjgh]h Description}(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.chMhjWgubh)}(hAsk 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.h](h%Ask DAMON worker thread (kdamond) of }(hjhhhhNhNubj)}(h**ctx**h]hctx}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubh 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.}(hjhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjWgubh)}(hXThe 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.h](huThe kdamond executes the given function in the main loop, for each region just after it applied any DAMOS actions of }(hj'hhhhNhNubj)}(h**ctx**h]hctx}(hj/hhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'hubh0 to it. The invocation is made only within one }(hj'hhhhNhNubh)}(h*:c:type:`damos->apply_interval_us `h]h)}(hjChh]hdamos->apply_interval_us}(hjEhhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjAhubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj'hubh{ since damos_walk() invocation, for each scheme. The given callback function can hence safely access the internal data of }(hj'hhhhNhNubh)}(h&:c:type:`struct damon_ctx `h]h)}(hjghh]hstruct damon_ctx}(hjihhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjehubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhj`hhMhj'hubh and }(hj'hhhhNhNubh)}(h,:c:type:`struct damon_region `h]h)}(hjhh]hstruct damon_region}(hjhhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjhubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhj`hhMhj'hubh that each of the scheme will apply the action for next interval, without additional synchronizations against the kdamond. If every scheme of }(hj'hhhhNhNubj)}(h**ctx**h]hctx}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'hubh passed at least one }(hj'hhhhNhNubh)}(h*:c:type:`damos->apply_interval_us `h]h)}(hjhh]hdamos->apply_interval_us}(hjhhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjhubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhj`hhMhj'hubhT, kdamond marks the request as completed so that damos_walk() can wakeup and return.}(hj'hhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj`hhMhjWgubh)}(h **Return**h]j)}(hjhh]hReturn}(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.chMhjWgubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjWgubeh}(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_sz_region)h]j.)}(hint damon_set_region_biggest_system_ram_default(struct damon_target *t, unsigned long *start, unsigned long *end, unsigned long min_sz_region)h](jI)}(hinth]hint}(hj-ihhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj)ihhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM ubjF)}(h h]h }(hjcheck_accesses ` callback.h](h)}(h**Parameters**h]j)}(hjnh]h Parameters}(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.chMM hjnubj#)}(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)}(hjnh]hstruct damon_region *r}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMJ hjnubjH)}(hhh]h)}(h7The DAMON region to update for its access check result.h]h7The DAMON region to update for its access check result.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhMJ hjnubah}(h]h ]h"]h$]h&]uh1jGhjnubeh}(h]h ]h"]h$]h&]uh1j'hjnhMJ hjnubj()}(hQ``bool accessed`` Whether the region has accessed during last sampling interval. h](j.)}(h``bool accessed``h]h)}(hjnh]h bool accessed}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMK hjnubjH)}(hhh]h)}(h>Whether the region has accessed during last sampling interval.h]h>Whether the region has accessed during last sampling interval.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhMK hjnubah}(h]h ]h"]h$]h&]uh1jGhjnubeh}(h]h ]h"]h$]h&]uh1j'hjnhMK hjnubj()}(hD``struct damon_attrs *attrs`` The damon_attrs of the DAMON context. h](j.)}(h``struct damon_attrs *attrs``h]h)}(hj"oh]hstruct damon_attrs *attrs}(hj$ohhhNhNubah}(h]h ]h"]h$]h&]uh1hhj oubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chML hjoubjH)}(hhh]h)}(h%The damon_attrs of the DAMON context.h]h%The damon_attrs of the DAMON context.}(hj;ohhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7ohML hj8oubah}(h]h ]h"]h$]h&]uh1jGhjoubeh}(h]h ]h"]h$]h&]uh1j'hj7ohML hjnubeh}(h]h ]h"]h$]h&]uh1j"hjnubh)}(h**Description**h]j)}(hj]oh]h Description}(hj_ohhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[oubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMN hjnubh)}(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.}(hjsohhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMM hjnubh)}(hfUsually this will be called by :c:type:`damon_operations->check_accesses ` callback.h](hUsually this will be called by }(hjohhhNhNubh)}(h=:c:type:`damon_operations->check_accesses `h]h)}(hjoh]h damon_operations->check_accesses}(hjohhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjoubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMP hjoubh callback.}(hjohhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjohMP hjnubeh}(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](jI)}(hj Ih]hbool}(hjohhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhjohhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMg ubjF)}(h h]h }(hjohhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjohhhjohMg ubjW)}(hdamon_initializedh]j])}(hdamon_initializedh]hdamon_initialized}(hjohhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjoubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjohhhjohMg ubj@I)}(h(void)h]jFI)}(hvoidh]jI)}(hvoidh]hvoid}(hjphhhNhNubah}(h]h ]jIah"]h$]h&]uh1jIhj pubah}(h]h ]h"]h$]h&]noemphhhuh1jEIhjpubah}(h]h ]h"]h$]h&]hhuh1j?IhjohhhjohMg ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjohhhjohMg ubah}(h]joah ](jjeh"]h$]h&]jj)jhuh1j'hjohMg hjohhubj)}(hhh]h)}(h$Return if DAMON is ready to be used.h]h$Return if DAMON is ready to be used.}(hj:phhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMg hj7phhubah}(h]h ]h"]h$]h&]uh1jhjohhhjohMg ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjRpjjRpjjjuh1j"hhhjHhNhNubj)}(hh**Parameters** ``void`` no arguments **Return** true if DAMON is ready to be used, false otherwise.h](h)}(h**Parameters**h]j)}(hj\ph]h Parameters}(hj^phhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZpubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMk hjVpubj#)}(hhh]j()}(h``void`` no arguments h](j.)}(h``void``h]h)}(hj{ph]hvoid}(hj}phhhNhNubah}(h]h ]h"]h$]h&]uh1hhjypubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKhjupubjH)}(hhh]h)}(h no argumentsh]h no arguments}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphKhjpubah}(h]h ]h"]h$]h&]uh1jGhjupubeh}(h]h ]h"]h$]h&]uh1j'hjphKhjrpubah}(h]h ]h"]h$]h&]uh1j"hjVpubh)}(h **Return**h]j)}(hjph]hReturn}(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.chKhjVpubh)}(h3true if DAMON is ready to be used, false otherwise.h]h3true if DAMON is ready to be used, false otherwise.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMi hjVpubeh}(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_handlerjqerror_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}(jpjpjHjHjpjpu nametypes}(jpjHjpuh}(jphjHhjj)jjjj$jjj j j j j-j2j<jAjCjHjjj6j;j!j!j%j%j)j)j*j+jH-jM-jd/ji/j7j7j|9j9j?j ?jAjAjDjDjpjHjHjHjuJjzJjDLjILjNjNj1Pj6PjRjRjWUj\UjWjWjYjYjk[jp[jm\jr\j_j"_j'aj,ajbjbjejfj ij%ijljmjojou 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.