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.hhK:hj`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_attrsuh1hhjhK:hj`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&]uh1hhjhK:hhhhubh)}(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.hhKGhhhhubj)}(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.hhKOubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhKOubjW)}(h damon_targeth]j])}(hjh]h damon_target}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhKOubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhKOubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhKOhjhhubj)}(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&]uh1jhjhhhjhKOubeh}(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; }; **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.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; };h]hstruct damon_target { struct pid *pid; unsigned int nr_regions; struct list_head regions_list; 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.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.hhKfhj 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&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK^hj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hK]hjUubeh}(h]h ]h"]h$]h&]uh1j"hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjL h]h Description}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKahhhhubh)}(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 }(hjb hhhNhNubj)}(h**pid**h]hpid}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb ubh should be set for appropriate }(hjb hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj~ h]hstruct damon_operations}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj| ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK_hjb ubh< including the virtual address spaces monitoring operations.}(hjb hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hK_hhhhubj)}(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.hhKgubjF)}(h h]h }(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj hhhj hKgubjW)}(h damos_actionh]j])}(hj h]h damos_action}(hj hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj hhhj hKgubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj hhhj hKgubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j'hj hKghj 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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKlhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKgubeh}(h]h ](jenumeh"]h$]h&]jjjj jj 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`` Call ``madvise()`` for the region with MADV_PAGEOUT. ``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)}(hj$ h]h Constants}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj" ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKphj ubj#)}(hhh](j()}(hI``DAMOS_WILLNEED`` Call ``madvise()`` for the region with MADV_WILLNEED. h](j.)}(h``DAMOS_WILLNEED``h]h)}(hjC h]hDAMOS_WILLNEED}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKshj= ubjH)}(hhh]h)}(h5Call ``madvise()`` for the region with MADV_WILLNEED.h](hCall }(hj\ hhhNhNubh)}(h ``madvise()``h]h madvise()}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ ubh# for the region with MADV_WILLNEED.}(hj\ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjX hKshjY ubah}(h]h ]h"]h$]h&]uh1jGhj= ubeh}(h]h ]h"]h$]h&]uh1j'hjX hKshj: 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.hhKvhj 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 hKvhj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKvhj: ubj()}(hG``DAMOS_PAGEOUT`` Call ``madvise()`` for the region with MADV_PAGEOUT. h](j.)}(h``DAMOS_PAGEOUT``h]h)}(hj h]h DAMOS_PAGEOUT}(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)}(h4Call ``madvise()`` for the region with MADV_PAGEOUT.h](hCall }(hj hhhNhNubh)}(h ``madvise()``h]h madvise()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh" for the region with MADV_PAGEOUT.}(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()}(hI``DAMOS_HUGEPAGE`` Call ``madvise()`` for the region with MADV_HUGEPAGE. h](j.)}(h``DAMOS_HUGEPAGE``h]h)}(hj$ h]hDAMOS_HUGEPAGE}(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)}(h5Call ``madvise()`` for the region with MADV_HUGEPAGE.h](hCall }(hj= hhhNhNubh)}(h ``madvise()``h]h madvise()}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj= ubh# for the region with MADV_HUGEPAGE.}(hj= hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj9 hK|hj: ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj9 hK|hj: ubj()}(hM``DAMOS_NOHUGEPAGE`` Call ``madvise()`` for the region with MADV_NOHUGEPAGE. h](j.)}(h``DAMOS_NOHUGEPAGE``h]h)}(hjo h]hDAMOS_NOHUGEPAGE}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjm ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhji 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&]uh1jGhji 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)}(hj h]hDAMOS_LRU_DEPRIO}(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)Deprioritize the region on its LRU lists.h]h)Deprioritize 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()}(hG``DAMOS_MIGRATE_HOT`` Migrate the regions prioritizing warmer regions. h](j.)}(h``DAMOS_MIGRATE_HOT``h]h)}(hj, h]hDAMOS_MIGRATE_HOT}(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 warmer regions.h]h0Migrate the regions prioritizing warmer regions.}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA hKhjB ubah}(h]h ]h"]h$]h&]uh1jGhj& ubeh}(h]h ]h"]h$]h&]uh1j'hjA hKhj: ubj()}(hH``DAMOS_MIGRATE_COLD`` Migrate the regions prioritizing colder regions. h](j.)}(h``DAMOS_MIGRATE_COLD``h]h)}(hje h]hDAMOS_MIGRATE_COLD}(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.hhKhj_ ubjH)}(hhh]h)}(h0Migrate the regions prioritizing colder regions.h]h0Migrate the regions prioritizing colder regions.}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjz hKhj{ ubah}(h]h ]h"]h$]h&]uh1jGhj_ ubeh}(h]h ]h"]h$]h&]uh1j'hjz 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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKhj: 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.hhKhhhhubh)}(hX8The support of each action is up to running :c:type:`struct damon_operations `. :c:type:`enum DAMON_OPS_VADDR ` and :c:type:`enum DAMON_OPS_FVADDR ` supports all actions except :c:type:`enum DAMOS_LRU_PRIO ` and :c:type:`enum DAMOS_LRU_DEPRIO `. :c:type:`enum DAMON_OPS_PADDR ` supports only :c:type:`enum DAMOS_PAGEOUT `, :c:type:`enum DAMOS_LRU_PRIO `, :c:type:`enum DAMOS_LRU_DEPRIO `, and :c:type:`DAMOS_STAT`.h](h,The support of each action is up to running }(hj0 hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj: h]hstruct damon_operations}(hj< hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj8 ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK{hj0 ubh. }(hj0 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_VADDRuh1hhjW hK{hj0 ubh and }(hj0 hhhNhNubh)}(h2:c:type:`enum DAMON_OPS_FVADDR `h]h)}(hj h]henum DAMON_OPS_FVADDR}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMON_OPS_FVADDRuh1hhjW hK{hj0 ubh supports all actions except }(hj0 hhhNhNubh)}(h.:c:type:`enum DAMOS_LRU_PRIO `h]h)}(hj h]henum DAMOS_LRU_PRIO}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_LRU_PRIOuh1hhjW hK{hj0 ubh and }hj0 sbh)}(h2:c:type:`enum DAMOS_LRU_DEPRIO `h]h)}(hj h]henum DAMOS_LRU_DEPRIO}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_LRU_DEPRIOuh1hhjW hK{hj0 ubh. }(hj0 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_PADDRuh1hhjW hK{hj0 ubh supports only }(hj0 hhhNhNubh)}(h,:c:type:`enum DAMOS_PAGEOUT `h]h)}(hj h]henum DAMOS_PAGEOUT}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj DAMOS_PAGEOUTuh1hhjW hK{hj0 ubh, }(hj0 hhhNhNubh)}(h.:c:type:`enum DAMOS_LRU_PRIO `h]h)}(hj0h]henum DAMOS_LRU_PRIO}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_LRU_PRIOuh1hhjW hK{hj0 ubh, }hj0 sbh)}(h2:c:type:`enum DAMOS_LRU_DEPRIO `h]h)}(hjSh]henum DAMOS_LRU_DEPRIO}(hjUhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_LRU_DEPRIOuh1hhjW hK{hj0 ubh, and }(hj0 hhhNhNubh)}(h:c:type:`DAMOS_STAT`h]h)}(hjvh]h DAMOS_STAT}(hjxhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjtubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj DAMOS_STATuh1hhjW hK{hj0 ubh.}(hj0 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjW hK{hhhhubj)}(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}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhKubjW)}(hdamos_quota_goal_metrich]j])}(hjh]hdamos_quota_goal_metric}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhKhjhhubj)}(hhh]h)}(h,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.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jenumeh"]h$]h&]jjjjjjjjjuh1j"hhhhhj!hNubj)}(h**Constants** ``DAMOS_QUOTA_USER_INPUT`` User-input value. ``DAMOS_QUOTA_SOME_MEM_PSI_US`` System level some memory PSI in us. ``NR_DAMOS_QUOTA_GOAL_METRICS`` Number of DAMOS quota goal metrics.h](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.hhKhjubj#)}(hhh](j()}(h-``DAMOS_QUOTA_USER_INPUT`` User-input value. h](j.)}(h``DAMOS_QUOTA_USER_INPUT``h]h)}(hj9h]hDAMOS_QUOTA_USER_INPUT}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj3ubjH)}(hhh]h)}(hUser-input value.h]hUser-input value.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhKhjOubah}(h]h ]h"]h$]h&]uh1jGhj3ubeh}(h]h ]h"]h$]h&]uh1j'hjNhKhj0ubj()}(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)}(hjrh]hDAMOS_QUOTA_SOME_MEM_PSI_US}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjpubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjlubjH)}(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&]uh1jGhjlubeh}(h]h ]h"]h$]h&]uh1j'hjhKhj0ubj()}(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'hjhKhj0ubeh}(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)}(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}(hj hhhNhNubah}(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&]uh1j3hj:hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hjLhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj:hhhjKhKubjW)}(hdamos_quota_goalh]j])}(hj8h]hdamos_quota_goal}(hj^hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjZubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj:hhhjKhKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj6hhhjKhKubah}(h]j1ah ](jjeh"]h$]h&]jj)jhuh1j'hjKhKhj3hhubj)}(hhh]h)}(h$DAMOS scheme quota auto-tuning goal.h]h$DAMOS scheme quota auto-tuning goal.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj}hhubah}(h]h ]h"]h$]h&]uh1jhj3hhhjKhKubeh}(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 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 ``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)}(hstruct damos_quota_goal { enum damos_quota_goal_metric metric; unsigned long target_value; unsigned long current_value; union { u64 last_psi_total; }; struct list_head list; };h]hstruct damos_quota_goal { enum damos_quota_goal_metric metric; unsigned long target_value; unsigned long current_value; union { u64 last_psi_total; }; 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.hhKhj ubjH)}(hhh]h)}(h6Target value of **metric** to achieve with the tuning.h](hTarget value of }(hj?hhhNhNubj)}(h **metric**h]hmetric}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh to achieve with the tuning.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj;hKhj<ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj;hKhjubj()}(h/``current_value`` Current value of **metric**. h](j.)}(h``current_value``h]h)}(hjqh]h current_value}(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)}(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&]uh1jGhjkubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj hKhjubj()}(h ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hj.h]hlist}(hj0hhhNhNubah}(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)}(hList head for siblings.h]hList head for siblings.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjDubah}(h]h ]h"]h$]h&]uh1jGhj(ubeh}(h]h ]h"]h$]h&]uh1j'hjChKhjubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjqh]h Description}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hData structure for getting the current score of the quota tuning goal. The score is calculated by how close **current_value** and **target_value** are. Then the score is entered to DAMON's internal feedback loop mechanism to get the auto-tuned quota.h](hmData structure for getting the current score of the quota tuning goal. The score is calculated by how close }(hjhhhNhNubj)}(h**current_value**h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h**target_value**h]h target_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhk are. Then the score is entered to DAMON’s internal feedback loop mechanism to get the auto-tuned quota.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hIf **metric** is DAMOS_QUOTA_USER_INPUT, **current_value** should be manually entered by the user, probably inside the kdamond callbacks. Otherwise, DAMON sets **current_value** with self-measured value of **metric**.h](hIf }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is DAMOS_QUOTA_USER_INPUT, }(hjhhhNhNubj)}(h**current_value**h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhg should be manually entered by the user, probably inside the kdamond callbacks. Otherwise, DAMON sets }(hjhhhNhNubj)}(h**current_value**h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh with self-measured value of }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.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}(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 }(hj8hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj&hhhj7hKubjW)}(h damos_quotah]j])}(hj$h]h damos_quota}(hjJhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjFubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj&hhhj7hKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj"hhhj7hKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hj7hKhjhhubj)}(hhh]h)}(h0Controls the aggressiveness of the given scheme.h]h0Controls the aggressiveness of the given scheme.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjihhubah}(h]h ]h"]h$]h&]uh1jhjhhhj7hKubeh}(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&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjubj()}(h5``ms`` Maximum milliseconds that the scheme can use. h](j.)}(h``ms``h]h)}(hjh]hms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj ubjH)}(hhh]h)}(h-Maximum milliseconds that the scheme can use.h]h-Maximum milliseconds that the scheme can use.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hKhj(ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj'hKhjubj()}(h?``sz`` Maximum bytes of memory that the action can be applied. h](j.)}(h``sz``h]h)}(hjKh]hsz}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjEubjH)}(hhh]h)}(h7Maximum bytes of memory that the action can be applied.h]h7Maximum bytes of memory that the action can be applied.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hKhjaubah}(h]h ]h"]h$]h&]uh1jGhjEubeh}(h]h ]h"]h$]h&]uh1j'hj`hKhjubj()}(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.hhKhj~ubjH)}(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&]uh1jGhj~ubeh}(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)}(hjh]h weight_sz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h/Weight of the region's size for prioritization.h]h1Weight of the region’s size for prioritization.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hKhj/ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj.hKhjubj()}(hN``weight_nr_accesses`` Weight of the region's nr_accesses for prioritization. h](j.)}(h``weight_nr_accesses``h]h)}(hjRh]hweight_nr_accesses}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjLubjH)}(hhh]h)}(h6Weight of the region's nr_accesses for prioritization.h]h8Weight of the region’s nr_accesses for prioritization.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghKhjhubah}(h]h ]h"]h$]h&]uh1jGhjLubeh}(h]h ]h"]h$]h&]uh1j'hjghKhjubj()}(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)}(hjh]h struct damos}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(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)}(hjh]hms}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmsuh1hhj hKhjubh and }(hjhhhNhNubh)}(h :c:type:`sz`h]h)}(hj5h]hsz}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3ubah}(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)}(hjXh]hms}(hjZhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjVubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmsuh1hhj hKhjubh milliseconds within }(hjhhhNhNubh)}(h:c:type:`reset_interval`h]h)}(hj{h]hreset_interval}(hj}hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjyubah}(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)}(hjh]hsz}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjszuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubh- and uses smaller one as the effective quota.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhhhhubh)}(hXIf **goals** is not empty, DAMON calculates yet another size quota based on the goals using its internal feedback loop algorithm, for every **reset_interval**. Then, if the new size quota is smaller than the effective quota, it uses the new size quota as the effective quota.h](hIf }(hj)hhhNhNubj)}(h **goals**h]hgoals}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh is not empty, DAMON calculates yet another size quota based on the goals using its internal feedback loop algorithm, for every }(hj)hhhNhNubj)}(h**reset_interval**h]hreset_interval}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubhu. Then, if the new size quota is smaller than the effective quota, it uses the new size quota as the effective quota.}(hj)hhhNhNubeh}(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}(hjdhhhNhNubah}(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 }(hj}hhhNhNubh)}(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.hhKhj}ubhL->get_scheme_score. You could customize the prioritization logic by setting }(hj}hhhNhNubh)}(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_szuh1hhjhKhj}ubh, }(hj}hhhNhNubh)}(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_accessesuh1hhjhKhj}ubh, and }(hj}hhhNhNubh)}(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_ageuh1hhjhKhj}ubh@, because monitoring operations are encouraged to respect those.}(hj}hhhNhNubeh}(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}(hj1hhhNhNubah}(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_wmark_metrich]j])}(hj+h]hdamos_wmark_metric}(hjQhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjMubah}(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 watermark metric.h]h Represents the watermark metric.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjphhubah}(h]h ]h"]h$]h&]uh1jhj&hhhj>hKubeh}(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.hhMhjubj#)}(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)}(hjh]hDAMOS_WMARK_FREE_MEM_RATE}(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+Free memory rate of the system in [0,1000].h]h+Free memory rate of the system in [0,1000].}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM hjubj()}(hB``NR_DAMOS_WMARK_METRICS`` Total number of DAMOS watermark metricsh](j.)}(h``NR_DAMOS_WMARK_METRICS``h]h)}(hj&h]hNR_DAMOS_WMARK_METRICS}(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'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.hhMhj<ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj;hMhjubeh}(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&]uh1j3hj|hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj|hhhjhMubjW)}(hdamos_watermarksh]j])}(hjzh]hdamos_watermarks}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj|hhhjhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjxhhhjhMubah}(h]jsah ](jjeh"]h$]h&]jj)jhuh1j'hjhMhjuhhubj)}(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.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jhjuhhhjhMubeh}(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.hhMhjubj)}(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.hhMhjubh)}(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.hhMhjubj#)}(hhh](j()}(h&``metric`` Metric for the watermarks. h](j.)}(h ``metric``h]h)}(hj/h]hmetric}(hj1hhhNhNubah}(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)}(hMetric for the watermarks.h]hMetric for the watermarks.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMhjEubah}(h]h ]h"]h$]h&]uh1jGhj)ubeh}(h]h ]h"]h$]h&]uh1j'hjDhMhj&ubj()}(h=``interval`` Watermarks check time interval in microseconds. h](j.)}(h ``interval``h]h)}(hjhh]hinterval}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjbubjH)}(hhh]h)}(h/Watermarks check time interval in microseconds.h]h/Watermarks check time interval in microseconds.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhj~ubah}(h]h ]h"]h$]h&]uh1jGhjbubeh}(h]h ]h"]h$]h&]uh1j'hj}hMhj&ubj()}(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.hhMhjubjH)}(hhh]h)}(hHigh watermark.h]hHigh watermark.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhj&ubj()}(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.hhMhjubjH)}(hhh]h)}(hMiddle watermark.h]hMiddle watermark.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhj&ubj()}(h``low`` Low watermark.h](j.)}(h``low``h]h)}(hjh]hlow}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj ubjH)}(hhh]h)}(hLow watermark.h]hLow watermark.}(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"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjVh]h Description}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(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 }(hjlhhhNhNubh)}(h:c:type:`metric`h]h)}(hjvh]hmetric}(hjxhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjtubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjlubh is }(hjlhhhNhNubh)}(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_NONEuh1hhjhMhjlubh, 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 }(hjlhhhNhNubh)}(h:c:type:`metric`h]h)}(hjh]hmetric}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhjhMhjlubh" of the system for at least every }(hjlhhhNhNubh)}(h:c:type:`interval`h]h)}(hjh]hinterval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjintervaluh1hhjhMhjlubh! microseconds and works as below.}(hjlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhhhhubh)}(hIf :c:type:`metric` is higher than :c:type:`high`, the scheme is inactivated. If :c:type:`metric` is between :c:type:`mid` and :c:type:`low`, the scheme is activated. If :c:type:`metric` is lower than :c:type:`low`, the scheme is inactivated.h](hIf }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjh]hmetric}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjubh is higher than }(hjhhhNhNubh)}(h:c:type:`high`h]h)}(hj5h]hhigh}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjhighuh1hhj.hMhjubh!, the scheme is inactivated. If }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjXh]hmetric}(hjZhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjVubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhj.hMhjubh is between }(hjhhhNhNubh)}(h :c:type:`mid`h]h)}(hj{h]hmid}(hj}hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjyubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmiduh1hhj.hMhjubh and }(hjhhhNhNubh)}(h :c:type:`low`h]h)}(hjh]hlow}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjlowuh1hhj.hMhjubh, the scheme is activated. If }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjh]hmetric}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhj.hMhjubh is lower than }(hjhhhNhNubh)}(h :c:type:`low`h]h)}(hjh]hlow}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjlowuh1hhj.hMhjubh, the scheme is inactivated.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj.hMhhhhubj)}(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}(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 }(hj2hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj hhhj1hM"ubjW)}(h damos_stath]j])}(hjh]h damos_stat}(hjDhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj@ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj hhhj1hM"ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhj1hM"ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hj1hM"hjhhubj)}(hhh]h)}(hStatistics on a given scheme.h]hStatistics on a given scheme.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM+hjchhubah}(h]h ]h"]h$]h&]uh1jhjhhhj1hM"ubeh}(h]h ](jstructeh"]h$]h&]jjjj~jj~jjjuh1j"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.hhM/hjubj)}(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.hhM1hjubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM:hjubj#)}(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.hhM-hjubjH)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM-hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM-hjubj()}(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}(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=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.}(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()}(hC``nr_applied`` Total number of regions that the scheme is applied. h](j.)}(h``nr_applied``h]h)}(hjEh]h nr_applied}(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)}(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&]uh1hhjZhM/hj[ubah}(h]h ]h"]h$]h&]uh1jGhj?ubeh}(h]h ]h"]h$]h&]uh1j'hjZhM/hjubj()}(hA``sz_applied`` Total size of regions that the scheme is applied. h](j.)}(h``sz_applied``h]h)}(hj~h]h sz_applied}(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.hhM0hjxubjH)}(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&]uh1hhjhM0hjubah}(h]h ]h"]h$]h&]uh1jGhjxubeh}(h]h ]h"]h$]h&]uh1j'hjhM0hjubj()}(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.hhM1hjubjH)}(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&]uh1hhjhM1hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM1hjubj()}(hJ``qt_exceeds`` Total number of times the quota of the scheme has exceeded.h](j.)}(h``qt_exceeds``h]h)}(hjh]h qt_exceeds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM2hjubjH)}(hhh]h)}(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.hhM3hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM2hjubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj3h]h Description}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM6hhhhubh)}(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 (}(hjIhhhNhNubh)}(h<:c:type:`struct damos_access_pattern `h]h)}(hjSh]hstruct damos_access_pattern}(hjUhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_access_patternuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM4hjIubh ), quotas (}(hjIhhhNhNubh)}(h*:c:type:`struct damos_quota `h]h)}(hjwh]hstruct damos_quota}(hjyhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjuubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_quotauh1hhjphM4hjIubh), watermarks (}(hjIhhhNhNubh)}(h4:c:type:`struct damos_watermarks `h]h)}(hjh]hstruct damos_watermarks}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_watermarksuh1hhjphM4hjIubh) and filters (}(hjIhhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hjh]hstruct damos_filter}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhjphM4hjIubhV) that handled on core logic can affect this. The core logic asks the operation set (}(hjIhhhNhNubh)}(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_operationsuh1hhjphM4hjIubh$) to apply the action to the region.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjphM4hhhhubh)}(hX"Applied an action to a region" in this context means the operation set (:c:type:`struct damon_operations `) successfully applied the action to the region, at least to a part of the region. The filters (:c:type:`struct damos_filter `) that handled on operation set layer and type of the action and pages of the region can affect this. For example, if a filter is set to exclude anonymous pages and the region has only anonymous pages, the region will be failed at applying the action. If the action is :c:type:`DAMOS_PAGEOUT` and all pages of the region are already paged out, the region will be failed at applying the action.h](hM“Applied an action to a region” in this context means the operation set (}(hj hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj h]hstruct damon_operations}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM;hj 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)}(hj5 h]hstruct damos_filter}(hj7 hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3 ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj. hM;hj 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)}(hjX h]h DAMOS_PAGEOUT}(hjZ hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjV ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj DAMOS_PAGEOUTuh1hhj. hM;hj ubhe and all pages of the region are already paged out, the region will be failed at applying the action.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj. hM;hhhhubj)}(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.hhMHubjF)}(h h]h }(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj hhhj hMHubjW)}(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 hMHubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj hhhj hMHubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j'hj hMHhj hhubj)}(hhh]h)}(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.hhMOhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMHubeh}(h]h ](jenumeh"]h$]h&]jjjj!jj!jjjuh1j"hhhhhj!hNubj)}(hX**Constants** ``DAMOS_FILTER_TYPE_ANON`` Anonymous pages. ``DAMOS_FILTER_TYPE_ACTIVE`` Active pages. ``DAMOS_FILTER_TYPE_MEMCG`` Specific memcg's pages. ``DAMOS_FILTER_TYPE_YOUNG`` Recently accessed pages. ``DAMOS_FILTER_TYPE_HUGEPAGE_SIZE`` Page is part of a hugepage. ``DAMOS_FILTER_TYPE_UNMAPPED`` Unmapped pages. ``DAMOS_FILTER_TYPE_ADDR`` Address range. ``DAMOS_FILTER_TYPE_TARGET`` Data Access Monitoring target. ``NR_DAMOS_FILTER_TYPES`` Number of filter types.h](h)}(h **Constants**h]j)}(hj&!h]h Constants}(hj(!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$!ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMShj !ubj#)}(hhh](j()}(h,``DAMOS_FILTER_TYPE_ANON`` Anonymous pages. h](j.)}(h``DAMOS_FILTER_TYPE_ANON``h]h)}(hjE!h]hDAMOS_FILTER_TYPE_ANON}(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.hhMVhj?!ubjH)}(hhh]h)}(hAnonymous pages.h]hAnonymous pages.}(hj^!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZ!hMVhj[!ubah}(h]h ]h"]h$]h&]uh1jGhj?!ubeh}(h]h ]h"]h$]h&]uh1j'hjZ!hMVhj"hMbhj?"ubah}(h]h ]h"]h$]h&]uh1jGhj#"ubeh}(h]h ]h"]h$]h&]uh1j'hj>"hMbhj` 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 }(hjf#hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjp#h]hstruct damon_operations}(hjr#hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjn#ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMZhjf#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’.}(hjf#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj#hMZhhhhubh)}(hXThe support of the filters that handled by :c:type:`struct damon_operations ` depend on the running :c:type:`struct damon_operations `. :c:type:`enum DAMON_OPS_PADDR ` supports both anon pages type and memcg type filters, while :c:type:`enum DAMON_OPS_VADDR ` and :c:type:`enum DAMON_OPS_FVADDR ` don't support any of the two types.h](h+The support of the filters that handled by }(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.hhM_hj#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#hM_hj#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#hM_hj#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#hM_hj#ubh and }(hj#hhhNhNubh)}(h2:c:type:`enum DAMON_OPS_FVADDR `h]h)}(hj/$h]henum DAMON_OPS_FVADDR}(hj1$hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj-$ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMON_OPS_FVADDRuh1hhj#hM_hj#ubh& don’t support any of the two types.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj#hM_hhhhubj)}(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}(hjo$hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjk$hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhubjF)}(h h]h }(hj}$hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjk$hhhj|$hMhubjW)}(h damos_filterh]j])}(hji$h]h damos_filter}(hj$hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj$ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjk$hhhj|$hMhubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjg$hhhj|$hMhubah}(h]jb$ah ](jjeh"]h$]h&]jj)jhuh1j'hj|$hMhhjd$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.hhMrhj$hhubah}(h]h ]h"]h$]h&]uh1jhjd$hhhj|$hMhubeh}(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.hhMvhj$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.hhMxhj$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.hhMthj%ubjH)}(hhh]h)}(hType of the target memory.h]hType of the target memory.}(hj7%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3%hMthj4%ubah}(h]h ]h"]h$]h&]uh1jGhj%ubeh}(h]h ]h"]h$]h&]uh1j'hj3%hMthj%ubj()}(h;``matching`` Whether this is for **type**-matching memory. h](j.)}(h ``matching``h]h)}(hjW%h]hmatching}(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.hhMuhjQ%ubjH)}(hhh]h)}(h-Whether this is for **type**-matching memory.h](hWhether this is for }(hjp%hhhNhNubj)}(h**type**h]htype}(hjx%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp%ubh-matching memory.}(hjp%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjl%hMuhjm%ubah}(h]h ]h"]h$]h&]uh1jGhjQ%ubeh}(h]h ]h"]h$]h&]uh1j'hjl%hMuhj%ubj()}(hA``allow`` Whether to include or exclude the **matching** memory. h](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.hhMvhj%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%hMvhj%ubah}(h]h ]h"]h$]h&]uh1jGhj%ubeh}(h]h ]h"]h$]h&]uh1j'hj%hMvhj%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.hhMyhj%ubjH)}(hhh]h)}(h anonymoush]h anonymous}(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()}(hI``memcg_id`` Memcg id of the question if **type** is DAMOS_FILTER_MEMCG. h](j.)}(h ``memcg_id``h]h)}(hj&&h]hmemcg_id}(hj(&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$&ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMwhj &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}(hjG&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?&ubh is DAMOS_FILTER_MEMCG.}(hj?&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj;&hMwhj<&ubah}(h]h ]h"]h$]h&]uh1jGhj &ubeh}(h]h ]h"]h$]h&]uh1j'hj;&hMwhj%ubj()}(hD``addr_range`` Address range if **type** is DAMOS_FILTER_TYPE_ADDR. h](j.)}(h``addr_range``h]h)}(hjq&h]h addr_range}(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.hhMxhjk&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&hMxhj&ubah}(h]h ]h"]h$]h&]uh1jGhjk&ubeh}(h]h ]h"]h$]h&]uh1j'hj&hMxhj%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.hhM{hj&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.hhMyhj&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&hMyhj&ubh if }(hj&hhhNhNubj)}(h**type**h]htype}(hj$'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh is DAMOS_FILTER_TYPE_TARGET.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj&hMyhj&ubah}(h]h ]h"]h$]h&]uh1jGhj&ubeh}(h]h ]h"]h$]h&]uh1j'hj&hM{hj%ubj()}(hH``sz_range`` Size range if **type** is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE. h](j.)}(h ``sz_range``h]h)}(hjN'h]hsz_range}(hjP'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL'ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM|hjH'ubjH)}(hhh]h)}(h:Size range if **type** is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.h](hSize range if }(hjg'hhhNhNubj)}(h**type**h]htype}(hjo'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjg'ubh$ is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.}(hjg'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjc'hM|hjd'ubah}(h]h ]h"]h$]h&]uh1jGhjH'ubeh}(h]h ]h"]h$]h&]uh1j'hjc'hM|hj%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.hhM|hj'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.hhM}hj'ubah}(h]h ]h"]h$]h&]uh1jGhj'ubeh}(h]h ]h"]h$]h&]uh1j'hj'hM|hj%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.hhM~hj'ubh to a memory region, DAMOS checks if each byte of the region matches to this given condition and avoid applying the action if so. Support of each filter type depends on the running }(hj'hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj (h]hstruct damon_operations}(hj"(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj(hM~hj'ubh and the type. Refer to }(hj'hhhNhNubh)}(h4:c:type:`enum damos_filter_type `h]h)}(hjC(h]henum damos_filter_type}(hjE(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjA(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_filter_typeuh1hhj(hM~hj'ubh for more details.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj(hM~hhhhubj)}(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]jv(ah ](jjeh"]h$]h&]jj)jhuh1j'hj(hMhjx(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&]uh1jhjx(hhhj(hMubeh}(h]h ](jstructeh"]h$]h&]jjjj(jj(jjjuh1j"hhhhhj!hNubj)}(hX`**Definition**:: struct damos_walk_control { void (*walk_fn)(void *data, struct damon_ctx *ctx,struct damon_target *t, struct damon_region *r, struct damos *s, unsigned long sz_filter_passed); void *data; }; **Members** ``walk_fn`` Function to be called back for each region. ``data`` Data that will be passed to walk functions.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh:}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj(ubj)}(hstruct damos_walk_control { void (*walk_fn)(void *data, struct damon_ctx *ctx,struct damon_target *t, struct damon_region *r, struct damos *s, unsigned long sz_filter_passed); void *data; };h]hstruct damos_walk_control { void (*walk_fn)(void *data, struct damon_ctx *ctx,struct damon_target *t, struct damon_region *r, struct damos *s, unsigned long sz_filter_passed); void *data; };}hj)sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj(ubh)}(h **Members**h]j)}(hj)h]hMembers}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj(ubj#)}(hhh](j()}(h8``walk_fn`` Function to be called back for each region. h](j.)}(h ``walk_fn``h]h)}(hj2)h]hwalk_fn}(hj4)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0)ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,)ubjH)}(hhh]h)}(h+Function to be called back for each region.h]h+Function to be called back for each region.}(hjK)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjG)hMhjH)ubah}(h]h ]h"]h$]h&]uh1jGhj,)ubeh}(h]h ]h"]h$]h&]uh1j'hjG)hMhj))ubj()}(h4``data`` Data that will be passed to walk functions.h](j.)}(h``data``h]h)}(hjk)h]hdata}(hjm)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji)ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhje)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&]uh1jGhje)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)}(hControl damos_walk(), which requests specific kdamond to invoke the given function to each region that eligible to apply actions of the kdamond's schemes. Refer to damos_walk() for more details.h]hControl damos_walk(), which requests specific kdamond to invoke the given function to each region that eligible to apply actions of the kdamond’s schemes. Refer to damos_walk() for more details.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_access_pattern (C struct)c.damos_access_patternhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_access_patternh]j.)}(hstruct damos_access_patternh](j4)}(hj7h]hstruct}(hj)hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj)hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj)hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj)hhhj)hMubjW)}(hdamos_access_patternh]j])}(hj)h]hdamos_access_pattern}(hj *hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj*ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj)hhhj)hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj)hhhj)hMubah}(h]j)ah ](jjeh"]h$]h&]jj)jhuh1j'hj)hMhj)hhubj)}(hhh]h)}(h*Target access pattern of the given scheme.h]h*Target access pattern of the given scheme.}(hj.*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj+*hhubah}(h]h ]h"]h$]h&]uh1jhj)hhhj)hMubeh}(h]h ](jstructeh"]h$]h&]jjjjF*jjF*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}(hjR*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjN*ubh:}(hjN*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjJ*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; };}hjk*sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjJ*ubh)}(h **Members**h]j)}(hj|*h]hMembers}(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.hhMhjJ*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 }(hj&+hhhNhNubh)}(h``->nr_accesses``h]h ->nr_accesses}(hj.+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&+ubh of target regions.}(hj&+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj"+hMhj#+ubah}(h]h ]h"]h$]h&]uh1jGhj+ubeh}(h]h ]h"]h$]h&]uh1j'hj"+hMhj*ubj()}(hA``max_nr_accesses`` Maximum ``->nr_accesses`` of target regions. h](j.)}(h``max_nr_accesses``h]h)}(hjX+h]hmax_nr_accesses}(hjZ+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjV+ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjR+ubjH)}(hhh]h)}(h,Maximum ``->nr_accesses`` of target regions.h](hMaximum }(hjq+hhhNhNubh)}(h``->nr_accesses``h]h ->nr_accesses}(hjy+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjq+ubh of target regions.}(hjq+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjm+hMhjn+ubah}(h]h ]h"]h$]h&]uh1jGhjR+ubeh}(h]h ]h"]h$]h&]uh1j'hjm+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"hjJ*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos (C struct)c.damoshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamosh]j.)}(h struct damosh](j4)}(hj7h]hstruct}(hj6,hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj2,hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjD,hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj2,hhhjC,hMubjW)}(hdamosh]j])}(hj0,h]hdamos}(hjV,hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjR,ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj2,hhhjC,hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj.,hhhjC,hMubah}(h]j),ah ](jjeh"]h$]h&]jj)jhuh1j'hjC,hMhj+,hhubj)}(hhh]h)}(h;Represents a Data Access Monitoring-based Operation Scheme.h]h;Represents 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.hhMhju,hhubah}(h]h ]h"]h$]h&]uh1jhj+,hhhjC,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 { int target_nid; }; struct list_head 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:`damo_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 ``target_nid`` Destination node if **action** is "migrate_{hot,cold}". ``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)}(hXystruct damos { struct damos_access_pattern pattern; enum damos_action action; unsigned long apply_interval_us; struct damos_quota quota; struct damos_watermarks wmarks; union { int target_nid; }; struct list_head filters; struct list_head ops_filters; void *last_applied; struct damos_stat stat; struct list_head list; };h]hXystruct damos { struct damos_access_pattern pattern; enum damos_action action; unsigned long apply_interval_us; struct damos_quota quota; struct damos_watermarks wmarks; union { int target_nid; }; struct list_head 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)}(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.``pattern`` Access pattern of target regions. h](j.)}(h ``pattern``h]h)}(hj,h]hpattern}(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!Access pattern of target regions.h]h!Access pattern 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()}(hF``action`` :c:type:`damo_action` to be applied to the target regions. h](j.)}(h ``action``h]h)}(hj-h]haction}(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::c:type:`damo_action` to be applied to the target regions.h](h)}(h:c:type:`damo_action`h]h)}(hj=-h]h damo_action}(hj?-hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj;-ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damo_actionuh1hhj3-hMhj7-ubh% to be applied to the target regions.}(hj7-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj3-hMhj4-ubah}(h]h ]h"]h$]h&]uh1jGhj-ubeh}(h]h ]h"]h$]h&]uh1j'hj3-hMhj,ubj()}(h@``apply_interval_us`` The time between applying the **action**. h](j.)}(h``apply_interval_us``h]h)}(hjv-h]happly_interval_us}(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)The time between applying the **action**.h](hThe time between applying the }(hj-hhhNhNubj)}(h **action**h]haction}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj-hMhj-ubah}(h]h ]h"]h$]h&]uh1jGhjp-ubeh}(h]h ]h"]h$]h&]uh1j'hj-hMhj,ubj()}(h5``quota`` Control the aggressiveness of this scheme. h](j.)}(h ``quota``h]h)}(hj-h]hquota}(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*Control the aggressiveness of this scheme.h]h*Control the aggressiveness of this scheme.}(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()}(hC``wmarks`` Watermarks for automated (in)activation of this scheme. h](j.)}(h ``wmarks``h]h)}(hj-h]hwmarks}(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)}(h7Watermarks for automated (in)activation of this scheme.h]h7Watermarks for automated (in)activation of this scheme.}(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``{unnamed_union}`` anonymous h](j.)}(h``{unnamed_union}``h]h)}(hj3.h]h{unnamed_union}}(hj5.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1.ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj-.ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hjL.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjH.hMhjI.ubah}(h]h ]h"]h$]h&]uh1jGhj-.ubeh}(h]h ]h"]h$]h&]uh1j'hjH.hMhj,ubj()}(hG``target_nid`` Destination node if **action** is "migrate_{hot,cold}". h](j.)}(h``target_nid``h]h)}(hjl.h]h target_nid}(hjn.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjj.ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjf.ubjH)}(hhh]h)}(h7Destination node if **action** is "migrate_{hot,cold}".h](hDestination node if }(hj.hhhNhNubj)}(h **action**h]haction}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh is “migrate_{hot,cold}”.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jGhjf.ubeh}(h]h ]h"]h$]h&]uh1j'hj.hMhj,ubj()}(ha``filters`` Additional set of :c:type:`struct damos_filter ` for :c:type:`action`. h](j.)}(h ``filters``h]h)}(hj.h]hfilters}(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)}(hTAdditional set of :c:type:`struct damos_filter ` for :c:type:`action`.h](hAdditional set of }(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.hMhj.ubh for }(hj.hhhNhNubh)}(h:c:type:`action`h]h)}(hj.h]haction}(hj.hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj.hMhj.ubh.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jGhj.ubeh}(h]h ]h"]h$]h&]uh1j'hj.hMhj,ubj()}(h^``ops_filters`` ops layer handling :c:type:`struct damos_filter ` objects list. h](j.)}(h``ops_filters``h]h)}(hj6/h]h ops_filters}(hj8/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4/ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj0/ubjH)}(hhh]h)}(hMops layer handling :c:type:`struct damos_filter ` objects list.h](hops layer handling }(hjO/hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hjY/h]hstruct damos_filter}(hj[/hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjW/ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhjK/hMhjO/ubh objects list.}(hjO/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjK/hMhjL/ubah}(h]h ]h"]h$]h&]uh1jGhj0/ubeh}(h]h ]h"]h$]h&]uh1j'hjK/hMhj,ubj()}(h>``last_applied`` Last **action** applied ops-managing entity. h](j.)}(h``last_applied``h]h)}(hj/h]h last_applied}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj/ubjH)}(hhh]h)}(h,Last **action** applied ops-managing entity.h](hLast }(hj/hhhNhNubj)}(h **action**h]haction}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh applied ops-managing entity.}(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()}(h$``stat`` Statistics of this scheme. h](j.)}(h``stat``h]h)}(hj/h]hstat}(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)}(hStatistics of this scheme.h]hStatistics of this scheme.}(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 ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hj0h]hlist}(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)}(hList head for siblings.h]hList head for siblings.}(hj/0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,0ubah}(h]h ]h"]h$]h&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hj+0hMhj,ubeh}(h]h ]h"]h$]h&]uh1j"hj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjY0h]h Description}(hj[0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjW0ubah}(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 }(hjo0hhhNhNubj)}(h**apply_interval_us**h]happly_interval_us}(hjw0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo0ubh', DAMON finds regions which fit in the }(hjo0hhhNhNubh)}(h:c:type:`pattern`h]h)}(hj0h]hpattern}(hj0hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjpatternuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjo0ubh and applies }(hjo0hhhNhNubh)}(h:c:type:`action`h]h)}(hj0h]haction}(hj0hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj0hMhjo0ubhH to those. To avoid consuming too much CPU time or IO resources for the }(hjo0hhhNhNubh)}(h:c:type:`action`h]h)}(hj0h]haction}(hj0hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj0hMhjo0ubh, }(hjo0hhhNhNubh)}(h:c:type:`quota`h]h)}(hj0h]hquota}(hj0hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjquotauh1hhj0hMhjo0ubh is used.}(hjo0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj0hMhhhhubh)}(heIf **apply_interval_us** is zero, :c:type:`damon_attrs->aggr_interval ` is used instead.h](hIf }(hj1hhhNhNubj)}(h**apply_interval_us**h]happly_interval_us}(hj$1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh is zero, }(hj1hhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hj81h]hdamon_attrs->aggr_interval}(hj:1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj61ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1ubh is used instead.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjU1hMhhhhubh)}(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 }(hj`1hhhNhNubh)}(h:c:type:`wmarks`h]h)}(hjj1h]hwmarks}(hjl1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjh1ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjwmarksuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj`1ubh. If all schemes that registered to the monitoring context are inactive, DAMON stops monitoring either, and just repeatedly checks the watermarks.}(hj`1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj1hMhhhhubh)}(h**target_nid** is used to set the migration target node for migrate_hot or migrate_cold actions, which means it's only meaningful when **action** is either "migrate_hot" or "migrate_cold".h](j)}(h**target_nid**h]h target_nid}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh{ is used to set the migration target node for migrate_hot or migrate_cold actions, which means it’s only meaningful when }(hj1hhhNhNubj)}(h **action**h]haction}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh3 is either “migrate_hot” or “migrate_cold”.}(hj1hhhNhNubeh}(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:`filters`h](hBefore applying the }(hj1hhhNhNubh)}(h:c:type:`action`h]h)}(hj1h]haction}(hj1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1ubh to a memory region, }(hj1hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj1h]hstruct damon_operations}(hj1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj1hMhj1ubh9 implementation could check pages of the region and skip }(hj1hhhNhNubh)}(h:c:type:`action`h]h)}(hj2h]haction}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj1hMhj1ubh to respect }(hj1hhhNhNubh)}(h:c:type:`filters`h]h)}(hj52h]hfilters}(hj72hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj32ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjfiltersuh1hhj1hMhj1ubeh}(h]h ]h"]h$]h&]uh1hhj1hMhhhhubh)}(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 }(hjX2hhhNhNubj)}(h **action**h]haction}(hj`2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX2ubh* can be applied depends on the underlying }(hjX2hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjt2h]hstruct damon_operations}(hjv2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjr2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjX2ubhD. Since it may not be aligned with the core layer abstract, namely }(hjX2hhhNhNubh)}(h,:c:type:`struct damon_region `h]h)}(hj2h]hstruct damon_region}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhj2hMhjX2ubh, }(hjX2hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj2h]hstruct damon_operations}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj2hMhjX2ubh could apply }(hjX2hhhNhNubj)}(h **action**h]haction}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX2ubhJ to same entity multiple times. Large folios that underlying on multiple }(hjX2hhhNhNubh)}(h:c:type:`struct damon `h]h)}(hj2h]h struct damon}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamonuh1hhj2hMhjX2ubh- region objects could be such examples. The }(hjX2hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj3h]hstruct damon_operations}(hj3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj2hMhjX2ubh can use }(hjX2hhhNhNubj)}(h**last_applied**h]h last_applied}(hj43hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX2ubh) to avoid that. DAMOS core logic unsets }(hjX2hhhNhNubj)}(h**last_applied**h]h last_applied}(hjF3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX2ubh? when each regions walking for applying the scheme is finished.}(hjX2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hMhhhhubh)}(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 }(hj^3hhhNhNubh)}(h:c:type:`action`h]h)}(hjh3h]haction}(hjj3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjf3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj^3ubh to each region, }(hj^3hhhNhNubh)}(h:c:type:`stat_count`h]h)}(hj3h]h stat_count}(hj3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj stat_countuh1hhj3hMhj^3ubh and }(hj^3hhhNhNubh)}(h:c:type:`stat_sz`h]h)}(hj3h]hstat_sz}(hj3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjstat_szuh1hhj3hMhj^3ubhP is updated to reflect the number of regions and total size of regions that the }(hj^3hhhNhNubh)}(h:c:type:`action`h]h)}(hj3h]haction}(hj3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj3hMhj^3ubh is applied.}(hj^3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj3hMhhhhubj)}(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}(hj4hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj4hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj 4hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj4hhhj4hMubjW)}(h damon_ops_idh]j])}(hj 4h]h damon_ops_id}(hj24hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj.4ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj4hhhj4hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj 4hhhj4hMubah}(h]j4ah ](jjeh"]h$]h&]jj)jhuh1j'hj4hMhj4hhubj)}(hhh]h)}(h8Identifier for each monitoring operations implementationh]h8Identifier for each monitoring operations implementation}(hjT4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hjQ4hhubah}(h]h ]h"]h$]h&]uh1jhj4hhhj4hMubeh}(h]h ](jenumeh"]h$]h&]jjjjl4jjl4jjjuh1j"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)}(hjv4h]h Constants}(hjx4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjt4ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjp4ubj#)}(hhh](j()}(hE``DAMON_OPS_VADDR`` Monitoring operations for virtual address spaces h](j.)}(h``DAMON_OPS_VADDR``h]h)}(hj4h]hDAMON_OPS_VADDR}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj4ubjH)}(hhh]h)}(h0Monitoring operations for virtual address spacesh]h0Monitoring operations for virtual address spaces}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMhj4ubah}(h]h ]h"]h$]h&]uh1jGhj4ubeh}(h]h ]h"]h$]h&]uh1j'hj4hMhj4ubj()}(h[``DAMON_OPS_FVADDR`` Monitoring operations for only fixed ranges of virtual address spaces h](j.)}(h``DAMON_OPS_FVADDR``h]h)}(hj4h]hDAMON_OPS_FVADDR}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj4ubjH)}(hhh]h)}(hEMonitoring operations for only fixed ranges of virtual address spacesh]hEMonitoring operations for only fixed ranges of virtual address spaces}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj4ubah}(h]h ]h"]h$]h&]uh1jGhj4ubeh}(h]h ]h"]h$]h&]uh1j'hj4hMhj4ubj()}(hI``DAMON_OPS_PADDR`` Monitoring operations for the physical address space h](j.)}(h``DAMON_OPS_PADDR``h]h)}(hj5h]hDAMON_OPS_PADDR}(hj 5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj5ubjH)}(hhh]h)}(h4Monitoring operations for the physical address spaceh]h4Monitoring operations for the physical address space}(hj!5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1jGhj5ubeh}(h]h ]h"]h$]h&]uh1j'hj5hMhj4ubj()}(h@``NR_DAMON_OPS`` Number of monitoring operations implementationsh](j.)}(h``NR_DAMON_OPS``h]h)}(hjA5h]h NR_DAMON_OPS}(hjC5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?5ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj;5ubjH)}(hhh]h)}(h/Number of monitoring operations implementationsh]h/Number of monitoring operations implementations}(hjZ5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjW5ubah}(h]h ]h"]h$]h&]uh1jGhj;5ubeh}(h]h ]h"]h$]h&]uh1j'hjV5hMhj4ubeh}(h]h ]h"]h$]h&]uh1j"hjp4ubeh}(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}(hj5hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj5hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM#ubjF)}(h h]h }(hj5hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj5hhhj5hM#ubjW)}(hdamon_operationsh]j])}(hj5h]hdamon_operations}(hj5hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj5ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj5hhhj5hM#ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj5hhhj5hM#ubah}(h]j5ah ](jjeh"]h$]h&]jj)jhuh1j'hj5hM#hj5hhubj)}(hhh]h)}(h*Monitoring operations for given use cases.h]h*Monitoring operations for given use cases.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj5hhubah}(h]h ]h"]h$]h&]uh1jhj5hhhj5hM#ubeh}(h]h ](jstructeh"]h$]h&]jjjj5jj5jjjuh1j"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)(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`` Clean up the context.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh:}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hj5ubj)}(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)(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)(struct damon_ctx *context); };}hj6sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM"hj5ubh)}(h **Members**h]j)}(hj+6h]hMembers}(hj-6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)6ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM.hj5ubj#)}(hhh](j()}(h*``id`` Identifier of this operations set. h](j.)}(h``id``h]h)}(hjJ6h]hid}(hjL6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjH6ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjD6ubjH)}(hhh]h)}(h"Identifier of this operations set.h]h"Identifier of this operations set.}(hjc6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_6hMhj`6ubah}(h]h ]h"]h$]h&]uh1jGhjD6ubeh}(h]h ]h"]h$]h&]uh1j'hj_6hMhjA6ubj()}(h8``init`` Initialize operations-related data structures. h](j.)}(h``init``h]h)}(hj6h]hinit}(hj6hhhNhNubah}(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.hhM hj}6ubjH)}(hhh]h)}(h.Initialize operations-related data structures.h]h.Initialize operations-related data structures.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hM hj6ubah}(h]h ]h"]h$]h&]uh1jGhj}6ubeh}(h]h ]h"]h$]h&]uh1j'hj6hM hjA6ubj()}(h6``update`` Update operations-related data structures. h](j.)}(h ``update``h]h)}(hj6h]hupdate}(hj6hhhNhNubah}(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.hhM!hj6ubjH)}(hhh]h)}(h*Update operations-related data structures.h]h*Update operations-related data structures.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hM!hj6ubah}(h]h ]h"]h$]h&]uh1jGhj6ubeh}(h]h ]h"]h$]h&]uh1j'hj6hM!hjA6ubj()}(hG``prepare_access_checks`` Prepare next access check of target regions. h](j.)}(h``prepare_access_checks``h]h)}(hj6h]hprepare_access_checks}(hj6hhhNhNubah}(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.hhM"hj6ubjH)}(hhh]h)}(h,Prepare next access check of target regions.h]h,Prepare next access check of target regions.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 7hM"hj 7ubah}(h]h ]h"]h$]h&]uh1jGhj6ubeh}(h]h ]h"]h$]h&]uh1j'hj 7hM"hjA6ubj()}(h9``check_accesses`` Check the accesses to target regions. h](j.)}(h``check_accesses``h]h)}(hj.7h]hcheck_accesses}(hj07hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,7ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM#hj(7ubjH)}(hhh]h)}(h%Check the accesses to target regions.h]h%Check the accesses to target regions.}(hjG7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjC7hM#hjD7ubah}(h]h ]h"]h$]h&]uh1jGhj(7ubeh}(h]h ]h"]h$]h&]uh1j'hjC7hM#hjA6ubj()}(h=``get_scheme_score`` Get the score of a region for a scheme. h](j.)}(h``get_scheme_score``h]h)}(hjg7h]hget_scheme_score}(hji7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhje7ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM$hja7ubjH)}(hhh]h)}(h'Get the score of a region for a scheme.h]h'Get the score of a region for a scheme.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|7hM$hj}7ubah}(h]h ]h"]h$]h&]uh1jGhja7ubeh}(h]h ]h"]h$]h&]uh1j'hj|7hM$hjA6ubj()}(h7``apply_scheme`` Apply a DAMON-based operation scheme. h](j.)}(h``apply_scheme``h]h)}(hj7h]h apply_scheme}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM%hj7ubjH)}(hhh]h)}(h%Apply a DAMON-based operation scheme.h]h%Apply a DAMON-based operation scheme.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hM%hj7ubah}(h]h ]h"]h$]h&]uh1jGhj7ubeh}(h]h ]h"]h$]h&]uh1j'hj7hM%hjA6ubj()}(h3``target_valid`` Determine if the target is valid. h](j.)}(h``target_valid``h]h)}(hj7h]h target_valid}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM&hj7ubjH)}(hhh]h)}(h!Determine if the target is valid.h]h!Determine if the target is valid.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hM&hj7ubah}(h]h ]h"]h$]h&]uh1jGhj7ubeh}(h]h ]h"]h$]h&]uh1j'hj7hM&hjA6ubj()}(h!``cleanup`` Clean up the context.h](j.)}(h ``cleanup``h]h)}(hj8h]hcleanup}(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.hhM&hj 8ubjH)}(hhh]h)}(hClean up the context.h]hClean up the context.}(hj+8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM'hj(8ubah}(h]h ]h"]h$]h&]uh1jGhj 8ubeh}(h]h ]h"]h$]h&]uh1j'hj'8hM&hjA6ubeh}(h]h ]h"]h$]h&]uh1j"hj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjU8h]h Description}(hjW8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS8ubah}(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 }(hjk8hhhNhNubh)}(h#:c:type:`damon_ctx.ops `h]h)}(hju8h]h damon_ctx.ops}(hjw8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjs8ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM(hjk8ubh . Then, the monitoring thread (}(hjk8hhhNhNubh)}(h':c:type:`damon_ctx.kdamond `h]h)}(hj8h]hdamon_ctx.kdamond}(hj8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhj8hM(hjk8ubh) calls }(hjk8hhhNhNubj)}(h**init**h]hinit}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk8ubh and }(hjk8hhhNhNubj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk8ubh! before starting the monitoring, }(hjk8hhhNhNubj)}(h **update**h]hupdate}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk8ubh after each }(hjk8hhhNhNubh)}(h7:c:type:`damon_attrs.ops_update_interval `h]h)}(hj8h]hdamon_attrs.ops_update_interval}(hj8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhj8hM(hjk8ubh, and }(hjk8hhhNhNubj)}(h**check_accesses**h]hcheck_accesses}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk8ubh, }(hjk8hhhNhNubj)}(h**target_valid**h]h target_valid}(hj%9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk8ubh and }hjk8sbj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj79hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk8ubh after each }(hjk8hhhNhNubh)}(h3:c:type:`damon_attrs.sample_interval `h]h)}(hjK9h]hdamon_attrs.sample_interval}(hjM9hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjI9ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhj8hM(hjk8ubh.}(hjk8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj8hM(hhhhubh)}(hX7Each :c:type:`struct damon_operations ` instance having valid **id** can be registered via damon_register_ops() and selected by damon_select_ops() later. **init** should initialize operations-related data structures. For example, this could be used to construct proper monitoring target regions and link those to **damon_ctx.adaptive_targets**. **update** should update the operations-related data structures. For example, this could be used to update monitoring target regions for current status. **prepare_access_checks** should manipulate the monitoring regions to be prepared for the next access check. **check_accesses** should check the accesses to each region that made after the last preparation and update the number of observed accesses of each region. It should also return max number of observed accesses that made as a result of its update. The value will be used for regions adjustment threshold. **get_scheme_score** should return the priority score of a region for a scheme as an integer in [0, :c:type:`DAMOS_MAX_SCORE`]. **apply_scheme** is called from **kdamond** when a region for user provided DAMON-based operation scheme is found. It should apply the scheme's action to the region and return bytes of the region that the action is successfully applied. It should also report how many bytes of the region has passed filters (:c:type:`struct damos_filter `) that handled by itself. **target_valid** should check whether the target is still valid for the monitoring. **cleanup** is called from **kdamond** just before its termination.h](hEach }(hjr9hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj|9h]hstruct damon_operations}(hj~9hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjz9ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM0hjr9ubh instance having valid }(hjr9hhhNhNubj)}(h**id**h]hid}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubhV can be registered via damon_register_ops() and selected by damon_select_ops() later. }(hjr9hhhNhNubj)}(h**init**h]hinit}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubh should initialize operations-related data structures. For example, this could be used to construct proper monitoring target regions and link those to }(hjr9hhhNhNubj)}(h**damon_ctx.adaptive_targets**h]hdamon_ctx.adaptive_targets}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubh. }(hjr9hhhNhNubj)}(h **update**h]hupdate}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubh should update the operations-related data structures. For example, this could be used to update monitoring target regions for current status. }(hjr9hhhNhNubj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubhT should manipulate the monitoring regions to be prepared for the next access check. }(hjr9hhhNhNubj)}(h**check_accesses**h]hcheck_accesses}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubhX 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. }(hjr9hhhNhNubj)}(h**get_scheme_score**h]hget_scheme_score}(hj :hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubhP should return the priority score of a region for a scheme as an integer in [0, }(hjr9hhhNhNubh)}(h:c:type:`DAMOS_MAX_SCORE`h]h)}(hj:h]hDAMOS_MAX_SCORE}(hj :hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_MAX_SCOREuh1hhj9hM0hjr9ubh]. }(hjr9hhhNhNubj)}(h**apply_scheme**h]h apply_scheme}(hj?:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubh is called from }(hjr9hhhNhNubj)}(h **kdamond**h]hkdamond}(hjQ:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubhX  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 (}(hjr9hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hje:h]hstruct damos_filter}(hjg:hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjc:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj9hM0hjr9ubh) that handled by itself. }(hjr9hhhNhNubj)}(h**target_valid**h]h target_valid}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubhD should check whether the target is still valid for the monitoring. }(hjr9hhhNhNubj)}(h **cleanup**h]hcleanup}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubh is called from }hjr9sbj)}(h **kdamond**h]hkdamond}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr9ubh just before its termination.}(hjr9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj9hM0hhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_callback (C struct)c.damon_callbackhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamon_callbackh]j.)}(hstruct damon_callbackh](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.hhMKubjF)}(h h]h }(hj:hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj:hhhj:hMKubjW)}(hdamon_callbackh]j])}(hj:h]hdamon_callback}(hj:hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj:ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj:hhhj:hMKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj:hhhj:hMKubah}(h]j:ah ](jjeh"]h$]h&]jj)jhuh1j'hj:hMKhj:hhubj)}(hhh]h)}(h)Monitoring events notification callbacks.h]h)Monitoring events notification callbacks.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMYhj;hhubah}(h]h ]h"]h$]h&]uh1jhj:hhhj:hMKubeh}(h]h ](jstructeh"]h$]h&]jjjj5;jj5;jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_callback { int (*after_wmarks_check)(struct damon_ctx *context); int (*after_aggregation)(struct damon_ctx *context); void (*before_terminate)(struct damon_ctx *context); }; **Members** ``after_wmarks_check`` Called after each schemes' watermarks check. ``after_aggregation`` Called after each aggregation. ``before_terminate`` Called before terminating the monitoring.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjA;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=;ubh:}(hj=;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM]hj9;ubj)}(hstruct damon_callback { int (*after_wmarks_check)(struct damon_ctx *context); int (*after_aggregation)(struct damon_ctx *context); void (*before_terminate)(struct damon_ctx *context); };h]hstruct damon_callback { int (*after_wmarks_check)(struct damon_ctx *context); int (*after_aggregation)(struct damon_ctx *context); void (*before_terminate)(struct damon_ctx *context); };}hjZ;sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM_hj9;ubh)}(h **Members**h]j)}(hjk;h]hMembers}(hjm;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhji;ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMehj9;ubj#)}(hhh](j()}(hD``after_wmarks_check`` Called after each schemes' watermarks check. h](j.)}(h``after_wmarks_check``h]h)}(hj;h]hafter_wmarks_check}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM\hj;ubjH)}(hhh]h)}(h,Called after each schemes' watermarks check.h]h.Called after each schemes’ watermarks check.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hM\hj;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj;hM\hj;ubj()}(h5``after_aggregation`` Called after each aggregation. h](j.)}(h``after_aggregation``h]h)}(hj;h]hafter_aggregation}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM]hj;ubjH)}(hhh]h)}(hCalled after each aggregation.h]hCalled after each aggregation.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hM]hj;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj;hM]hj;ubj()}(h>``before_terminate`` Called before terminating the monitoring.h](j.)}(h``before_terminate``h]h)}(hj;h]hbefore_terminate}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM]hj;ubjH)}(hhh]h)}(h)Called before terminating the monitoring.h]h)Called before terminating the monitoring.}(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'hj<hM]hj;ubeh}(h]h ]h"]h$]h&]uh1j"hj9;ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj?<h]h Description}(hjA<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.hhMahhhhubh)}(hThe monitoring thread (:c:type:`damon_ctx.kdamond `) calls **before_terminate** just before finishing the monitoring.h](hThe monitoring thread (}(hjU<hhhNhNubh)}(h':c:type:`damon_ctx.kdamond `h]h)}(hj_<h]hdamon_ctx.kdamond}(hja<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.hhM_hjU<ubh) calls }(hjU<hhhNhNubj)}(h**before_terminate**h]hbefore_terminate}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU<ubh& just before finishing the monitoring.}(hjU<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj|<hM_hhhhubh)}(hXThe monitoring thread calls **after_wmarks_check** after each DAMON-based operation schemes' watermarks check. If users need to make changes to the attributes of the monitoring context while it's deactivated due to the watermarks, this is the good place to do.h](hThe monitoring thread calls }(hj<hhhNhNubj)}(h**after_wmarks_check**h]hafter_wmarks_check}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh after each DAMON-based operation schemes’ watermarks check. If users need to make changes to the attributes of the monitoring context while it’s deactivated due to the watermarks, this is the good place to do.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMbhhhhubh)}(hXThe monitoring thread calls **after_aggregation** for each of the aggregation intervals. Therefore, users can safely access the monitoring results without additional protection. For the reason, users are recommended to use these callback for the accesses to the results.h](hThe monitoring thread calls }(hj<hhhNhNubj)}(h**after_aggregation**h]hafter_aggregation}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh for each of the aggregation intervals. Therefore, users can safely access the monitoring results without additional protection. For the reason, users are recommended to use these callback for the accesses to the results.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMghhhhubh)}(h3If any callback returns non-zero, monitoring stops.h]h3If any callback returns non-zero, monitoring stops.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMlhhhhubj)}(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.hhMqubjF)}(h h]h }(hj=hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj<hhhj=hMqubjW)}(hdamon_intervals_goalh]j])}(hj<h]hdamon_intervals_goal}(hj#=hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj=ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj<hhhj=hMqubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj<hhhj=hMqubah}(h]j<ah ](jjeh"]h$]h&]jj)jhuh1j'hj=hMqhj<hhubj)}(hhh]h)}(h&Monitoring intervals auto-tuning goal.h]h&Monitoring intervals auto-tuning goal.}(hjE=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjB=hhubah}(h]h ]h"]h$]h&]uh1jhj<hhhj=hMqubeh}(h]h ](jstructeh"]h$]h&]jjjj]=jj]=jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_intervals_goal { unsigned long access_bp; unsigned long aggrs; unsigned long min_sample_us; unsigned long max_sample_us; }; **Members** ``access_bp`` Access events observation ratio to achieve in bp. ``aggrs`` Number of aggregations to acheive **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}(hji=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje=ubh:}(hje=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhja=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.hhMhja=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.hhMhja=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 acheive **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 acheive **access_bp** within.h](h"Number of aggregations to acheive }(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)}(hj6>h]h min_sample_us}(hj8>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4>ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj0>ubjH)}(hhh]h)}(h4Minimum resulting sampling interval in microseconds.h]h4Minimum resulting sampling interval in microseconds.}(hjO>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK>hMhjL>ubah}(h]h ]h"]h$]h&]uh1jGhj0>ubeh}(h]h ]h"]h$]h&]uh1j'hjK>hMhj=ubj()}(hF``max_sample_us`` Maximum resulting sampling interval in microseconds.h](j.)}(h``max_sample_us``h]h)}(hjo>h]h max_sample_us}(hjq>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjm>ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhji>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&]uh1jGhji>ubeh}(h]h ]h"]h$]h&]uh1j'hj>hMhj=ubeh}(h]h ]h"]h$]h&]uh1j"hja=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)}(hj>h]hdamon_attrs->aggr_interval}(hj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhj>hMhj>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?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh aggregations be same to }(hj>hhhNhNubj)}(h **access_bp**h]h access_bp}(hj)?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh. The logic increases }(hj>hhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hj=?h]hdamon_attrs->aggr_interval}(hj??hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj;?ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhj>hMhj>ubh and }(hj>hhhNhNubh)}(h6:c:type:`damon_attrs->sampling_interval `h]h)}(hj`?h]hdamon_attrs->sampling_interval}(hjb?hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj^?ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhj>hMhj>ubh` in same ratio if the current access events observation ratio is lower than the target for each }(hj>hhhNhNubj)}(h **aggrs**h]haggrs}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh aggregations, and vice versa.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj>hMhhhhubh)}(hNIf **aggrs** is zero, the tuning is disabled and hence this struct is ignored.h](hIf }(hj?hhhNhNubj)}(h **aggrs**h]haggrs}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubhB is zero, the tuning is disabled and hence this struct is ignored.}(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](jdamon_attrs (C struct) c.damon_attrshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damon_attrsh]j.)}(hstruct damon_attrsh](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 damon_attrsh]j])}(hj?h]h damon_attrs}(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)}(h4Monitoring attributes for accuracy/overhead control.h]h4Monitoring attributes for accuracy/overhead control.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj@hhubah}(h]h ]h"]h$]h&]uh1jhj?hhhj?hMubeh}(h]h ](jstructeh"]h$]h&]jjjj-@jj-@jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_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}(hj9@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5@ubh:}(hj5@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1@ubj)}(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; };}hjR@sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1@ubh)}(h **Members**h]j)}(hjc@h]hMembers}(hje@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja@ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1@ubj#)}(hhh](j()}(h7``sample_interval`` The time between access samplings. h](j.)}(h``sample_interval``h]h)}(hj@h]hsample_interval}(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"The time between access samplings.h]h"The time between access samplings.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jGhj|@ubeh}(h]h ]h"]h$]h&]uh1j'hj@hMhjy@ubj()}(hA``aggr_interval`` The time between monitor results aggregations. h](j.)}(h``aggr_interval``h]h)}(hj@h]h aggr_interval}(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.The time between monitor results aggregations.h]h.The time between monitor results aggregations.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jGhj@ubeh}(h]h ]h"]h$]h&]uh1j'hj@hMhjy@ubj()}(hH``ops_update_interval`` The time between monitoring operations updates. h](j.)}(h``ops_update_interval``h]h)}(hj@h]hops_update_interval}(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/The time between monitoring operations updates.h]h/The time between monitoring operations updates.}(hj AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj AhMhj Aubah}(h]h ]h"]h$]h&]uh1jGhj@ubeh}(h]h ]h"]h$]h&]uh1j'hj AhMhjy@ubj()}(h/``intervals_goal`` Intervals auto-tuning goal. h](j.)}(h``intervals_goal``h]h)}(hj-Ah]hintervals_goal}(hj/AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+Aubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj'AubjH)}(hhh]h)}(hIntervals auto-tuning goal.h]hIntervals auto-tuning goal.}(hjFAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBAhMhjCAubah}(h]h ]h"]h$]h&]uh1jGhj'Aubeh}(h]h ]h"]h$]h&]uh1j'hjBAhMhjy@ubj()}(hF``min_nr_regions`` The minimum number of adaptive monitoring regions. h](j.)}(h``min_nr_regions``h]h)}(hjfAh]hmin_nr_regions}(hjhAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdAubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj`AubjH)}(hhh]h)}(h2The minimum number of adaptive monitoring regions.h]h2The minimum number of adaptive monitoring regions.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj|Aubah}(h]h ]h"]h$]h&]uh1jGhj`Aubeh}(h]h ]h"]h$]h&]uh1j'hj{AhMhjy@ubj()}(hE``max_nr_regions`` The maximum number of adaptive monitoring regions.h](j.)}(h``max_nr_regions``h]h)}(hjAh]hmax_nr_regions}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjAubjH)}(hhh]h)}(h2The maximum number of adaptive monitoring regions.h]h2The maximum number of adaptive monitoring regions.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjAubah}(h]h ]h"]h$]h&]uh1jGhjAubeh}(h]h ]h"]h$]h&]uh1j'hjAhMhjy@ubeh}(h]h ]h"]h$]h&]uh1j"hj1@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjAh]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hXFor each **sample_interval**, DAMON checks whether each region is accessed or not during the last **sample_interval**. If such access is found, DAMON aggregates the information by increasing :c:type:`damon_region->nr_accesses ` for **aggr_interval** time. For each **aggr_interval**, the count is reset. DAMON also checks whether the target memory regions need update (e.g., by ``mmap()`` calls from the application, in case of virtual memory monitoring) and applies the changes for each **ops_update_interval**. All time intervals are in micro-seconds. Please refer to :c:type:`struct damon_operations ` and :c:type:`struct damon_callback ` for more detail.h](h For each }(hjAhhhNhNubj)}(h**sample_interval**h]hsample_interval}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubhF, DAMON checks whether each region is accessed or not during the last }(hjAhhhNhNubj)}(h**sample_interval**h]hsample_interval}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubhK. If such access is found, DAMON aggregates the information by increasing }(hjAhhhNhNubh)}(h2:c:type:`damon_region->nr_accesses `h]h)}(hj&Bh]hdamon_region->nr_accesses}(hj(BhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj$Bubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjAubh for }(hjAhhhNhNubj)}(h**aggr_interval**h]h aggr_interval}(hjHBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh time. For each }(hjAhhhNhNubj)}(h**aggr_interval**h]h aggr_interval}(hjZBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubha, the count is reset. DAMON also checks whether the target memory regions need update (e.g., by }(hjAhhhNhNubh)}(h ``mmap()``h]hmmap()}(hjlBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAubhd calls from the application, in case of virtual memory monitoring) and applies the changes for each }(hjAhhhNhNubj)}(h**ops_update_interval**h]hops_update_interval}(hj~BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh=. All time intervals are in micro-seconds. Please refer to }(hjAhhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjBh]hstruct damon_operations}(hjBhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhjCBhMhjAubh and }(hjAhhhNhNubh)}(h0:c:type:`struct damon_callback `h]h)}(hjBh]hstruct damon_callback}(hjBhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_callbackuh1hhjCBhMhjAubh for more detail.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjCBhMhhhhubj)}(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}(hjBhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjBhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjChhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjBhhhjChMubjW)}(h damon_ctxh]j])}(hjBh]h damon_ctx}(hjChhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjCubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjBhhhjChMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjBhhhjChMubah}(h]jBah ](jjeh"]h$]h&]jj)jhuh1j'hjChMhjBhhubj)}(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.}(hj7ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj4Chhubah}(h]h ]h"]h$]h&]uh1jhjBhhhjChMubeh}(h]h ](jstructeh"]h$]h&]jjjjOCjjOCjjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_ctx { struct damon_attrs attrs; struct task_struct *kdamond; struct mutex kdamond_lock; struct damon_operations ops; struct damon_callback callback; 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. ``callback`` Set of callbacks for monitoring events notifications. ``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}(hj[ChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWCubh:}(hjWChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjSCubj)}(hstruct damon_ctx { struct damon_attrs attrs; struct task_struct *kdamond; struct mutex kdamond_lock; struct damon_operations ops; struct damon_callback callback; struct list_head adaptive_targets; struct list_head schemes; };h]hstruct damon_ctx { struct damon_attrs attrs; struct task_struct *kdamond; struct mutex kdamond_lock; struct damon_operations ops; struct damon_callback callback; struct list_head adaptive_targets; struct list_head schemes; };}hjtCsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjSCubh)}(h **Members**h]j)}(hjCh]hMembers}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjSCubj#)}(hhh](j()}(h?``attrs`` Monitoring attributes for accuracy/overhead control. h](j.)}(h ``attrs``h]h)}(hjCh]hattrs}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjCubjH)}(hhh]h)}(h4Monitoring attributes for accuracy/overhead control.h]h4Monitoring attributes for accuracy/overhead control.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjCubah}(h]h ]h"]h$]h&]uh1jGhjCubeh}(h]h ]h"]h$]h&]uh1j'hjChMhjCubj()}(h3``kdamond`` Kernel thread who does the monitoring. h](j.)}(h ``kdamond``h]h)}(hjCh]hkdamond}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjCubjH)}(hhh]h)}(h&Kernel thread who does the monitoring.h]h&Kernel thread who does the monitoring.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjCubah}(h]h ]h"]h$]h&]uh1jGhjCubeh}(h]h ]h"]h$]h&]uh1j'hjChMhjCubj()}(hB``kdamond_lock`` Mutex for the synchronizations with **kdamond**. h](j.)}(h``kdamond_lock``h]h)}(hjDh]h kdamond_lock}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjDubjH)}(hhh]h)}(h0Mutex for the synchronizations with **kdamond**.h](h$Mutex for the synchronizations with }(hj/DhhhNhNubj)}(h **kdamond**h]hkdamond}(hj7DhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/Dubh.}(hj/DhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj+DhMhj,Dubah}(h]h ]h"]h$]h&]uh1jGhjDubeh}(h]h ]h"]h$]h&]uh1j'hj+DhMhjCubj()}(h:``ops`` Set of monitoring operations for given use cases. h](j.)}(h``ops``h]h)}(hjaDh]hops}(hjcDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_Dubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj[DubjH)}(hhh]h)}(h1Set of monitoring operations for given use cases.h]h1Set of monitoring operations for given use cases.}(hjzDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvDhMhjwDubah}(h]h ]h"]h$]h&]uh1jGhj[Dubeh}(h]h ]h"]h$]h&]uh1j'hjvDhMhjCubj()}(hC``callback`` Set of callbacks for monitoring events notifications. h](j.)}(h ``callback``h]h)}(hjDh]hcallback}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjDubjH)}(hhh]h)}(h5Set of callbacks for monitoring events notifications.h]h5Set of callbacks for monitoring events notifications.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jGhjDubeh}(h]h ]h"]h$]h&]uh1j'hjDhMhjCubj()}(hO``adaptive_targets`` Head of monitoring targets (:c:type:`damon_target`) list. h](j.)}(h``adaptive_targets``h]h)}(hjDh]hadaptive_targets}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjDubjH)}(hhh]h)}(h9Head of monitoring targets (:c:type:`damon_target`) list.h](hHead of monitoring targets (}(hjDhhhNhNubh)}(h:c:type:`damon_target`h]h)}(hjDh]h damon_target}(hjDhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjDubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_targetuh1hhjDhMhjDubh) list.}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jGhjDubeh}(h]h ]h"]h$]h&]uh1j'hjDhMhjCubj()}(h3``schemes`` Head of schemes (:c:type:`damos`) list.h](j.)}(h ``schemes``h]h)}(hj/Eh]hschemes}(hj1EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-Eubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj)EubjH)}(hhh]h)}(h'Head of schemes (:c:type:`damos`) list.h](hHead of schemes (}(hjHEhhhNhNubh)}(h:c:type:`damos`h]h)}(hjREh]hdamos}(hjTEhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjPEubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjHEubh) list.}(hjHEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjoEhMhjEEubah}(h]h ]h"]h$]h&]uh1jGhj)Eubeh}(h]h ]h"]h$]h&]uh1j'hjDEhMhjCubeh}(h]h ]h"]h$]h&]uh1j"hjSCubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjEh]h Description}(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.hhMhhhhubh)}(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 }(hjEhhhNhNubj)}(h **kdamond**h]hkdamond}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.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 }(hjEhhhNhNubh)}(h::c:type:`damon_operations.target_valid `h]h)}(hjEh]hdamon_operations.target_valid}(hjEhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjEubh of }(hjEhhhNhNubj)}(h**ops**h]hops}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh]. The termination can also be explicitly requested by calling damon_stop(). The thread sets }(hjEhhhNhNubj)}(h **kdamond**h]hkdamond}(hj FhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubhr to NULL when it terminates. Therefore, users can know whether the monitoring is ongoing or terminated by reading }(hjEhhhNhNubj)}(h **kdamond**h]hkdamond}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh. Reads and writes to }(hjEhhhNhNubj)}(h **kdamond**h]hkdamond}(hj.FhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh< from outside of the monitoring thread must be protected by }(hjEhhhNhNubj)}(h**kdamond_lock**h]h kdamond_lock}(hj@FhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjEhMhhhhubh)}(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 }(hjXFhhhNhNubj)}(h **kdamond**h]hkdamond}(hj`FhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXFubh via }(hjXFhhhNhNubj)}(h**kdamond_lock**h]h kdamond_lock}(hjrFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXFubh;. Accesses to other fields must be protected by themselves.}(hjXFhhhNhNubeh}(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}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$damon_is_registered_ops (C function)c.damon_is_registered_opshNtauh1jhjFhhhNhNubj#)}(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}(hjFhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jFhjFhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK4ubjF)}(h h]h }(hjFhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjFhhhjFhK4ubjW)}(hdamon_is_registered_opsh]j])}(hdamon_is_registered_opsh]hdamon_is_registered_ops}(hjFhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjFubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjFhhhjFhK4ubhdesc_parameterlist)}(h(enum damon_ops_id id)h]hdesc_parameter)}(henum damon_ops_id idh](j4)}(hj h]henum}(hjGhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjFubjF)}(h h]h }(hjGhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjFubh)}(hhh]j])}(h damon_ops_idh]h damon_ops_id}(hjGhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjGubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetj!GmodnameN classnameNjj)}j]j!)}j!jFsbc.damon_is_registered_opsasbuh1hhjFubjF)}(h h]h }(hj?GhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjFubj])}(hidh]hid}(hjMGhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjFubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjFubah}(h]h ]h"]h$]h&]hhuh1jFhjFhhhjFhK4ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjFhhhjFhK4ubah}(h]jFah ](jjeh"]h$]h&]jj)jhuh1j'hjFhK4hjFhhubj)}(hhh]h)}(h0Check if a given damon_operations is registered.h]h0Check if a given damon_operations is registered.}(hjwGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK/hjtGhhubah}(h]h ]h"]h$]h&]uh1jhjFhhhjFhK4ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjGjjGjjjuh1j"hhhjFhNhNubj)}(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)}(hjGh]h Parameters}(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.chK3hjGubj#)}(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)}(hjGh]henum damon_ops_id id}(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.chK0hjGubjH)}(hhh]h)}(h2Id of the damon_operations to check if registered.h]h2Id of the damon_operations to check if registered.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhK0hjGubah}(h]h ]h"]h$]h&]uh1jGhjGubeh}(h]h ]h"]h$]h&]uh1j'hjGhK0hjGubah}(h]h ]h"]h$]h&]uh1j"hjGubh)}(h **Return**h]j)}(hjGh]hReturn}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK2hjGubh)}(h(true if the ops is set, false otherwise.h]h(true if the ops is set, false otherwise.}(hj HhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chK2hjGubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjFhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_register_ops (C function)c.damon_register_opshNtauh1jhjFhhhNhNubj#)}(hhh](j()}(h5int damon_register_ops (struct damon_operations *ops)h]j.)}(h4int damon_register_ops(struct damon_operations *ops)h](jF)}(hinth]hint}(hj8HhhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhj4HhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKIubjF)}(h h]h }(hjGHhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj4HhhhjFHhKIubjW)}(hdamon_register_opsh]j])}(hdamon_register_opsh]hdamon_register_ops}(hjYHhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjUHubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj4HhhhjFHhKIubjF)}(h(struct damon_operations *ops)h]jF)}(hstruct damon_operations *opsh](j4)}(hj7h]hstruct}(hjuHhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjqHubjF)}(h h]h }(hjHhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjqHubh)}(hhh]j])}(hdamon_operationsh]hdamon_operations}(hjHhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjHubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjHmodnameN classnameNjj)}j]j!)}j!j[Hsbc.damon_register_opsasbuh1hhjqHubjF)}(h h]h }(hjHhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjqHubhdesc_sig_punctuation)}(h*h]h*}(hjHhhhNhNubah}(h]h ]pah"]h$]h&]uh1jHhjqHubj])}(hopsh]hops}(hjHhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjqHubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjmHubah}(h]h ]h"]h$]h&]hhuh1jFhj4HhhhjFHhKIubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj0HhhhjFHhKIubah}(h]j+Hah ](jjeh"]h$]h&]jj)jhuh1j'hjFHhKIhj-Hhhubj)}(hhh]h)}(h.Register a monitoring operations set to DAMON.h]h.Register a monitoring operations set to DAMON.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKAhjHhhubah}(h]h ]h"]h$]h&]uh1jhj-HhhhjFHhKIubeh}(h]h ](jfunctioneh"]h$]h&]jjjjIjjIjjjuh1j"hhhjFhNhNubj)}(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)}(hjIh]h Parameters}(hj IhhhNhNubah}(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.chKEhjIubj#)}(hhh]j()}(hH``struct damon_operations *ops`` monitoring operations set to register. h](j.)}(h ``struct damon_operations *ops``h]h)}(hj=Ih]hstruct damon_operations *ops}(hj?IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;Iubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKBhj7IubjH)}(hhh]h)}(h&monitoring operations set to register.h]h&monitoring operations set to register.}(hjVIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRIhKBhjSIubah}(h]h ]h"]h$]h&]uh1jGhj7Iubeh}(h]h ]h"]h$]h&]uh1j'hjRIhKBhj4Iubah}(h]h ]h"]h$]h&]uh1j"hjIubh)}(h**Description**h]j)}(hjxIh]h Description}(hjzIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvIubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKDhjIubh)}(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 }(hjIhhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjIh]hstruct damon_operations}(hjIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjIubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKDhjIubh0->id so that others can find and use them later.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjIhKDhjIubh)}(h **Return**h]j)}(hjIh]hReturn}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKGhjIubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKGhjIubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjFhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_select_ops (C function)c.damon_select_opshNtauh1jhjFhhhNhNubj#)}(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](jF)}(hinth]hint}(hjJhhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhjJhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKdubjF)}(h h]h }(hjJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjJhhhjJhKdubjW)}(hdamon_select_opsh]j])}(hdamon_select_opsh]hdamon_select_ops}(hj(JhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj$Jubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjJhhhjJhKdubjF)}(h-(struct damon_ctx *ctx, enum damon_ops_id id)h](jF)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjDJhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj@JubjF)}(h h]h }(hjQJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj@Jubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjbJhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj_Jubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjdJmodnameN classnameNjj)}j]j!)}j!j*Jsbc.damon_select_opsasbuh1hhj@JubjF)}(h h]h }(hjJhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj@JubjH)}(hjHh]h*}(hjJhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj@Jubj])}(hctxh]hctx}(hjJhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj@Jubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjNhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj-Nubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjONhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjLNubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjQNmodnameN classnameNjj)}j]j!)}j!jNsbc.damon_set_attrsasbuh1hhj-NubjF)}(h h]h }(hjoNhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj-NubjH)}(hjHh]h*}(hj}NhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj-Nubj])}(hctxh]hctx}(hjNhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj-Nubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhj)NubjF)}(hstruct damon_attrs *attrsh](j4)}(hj7h]hstruct}(hjNhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjNubjF)}(h h]h }(hjNhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjNubh)}(hhh]j])}(h damon_attrsh]h damon_attrs}(hjNhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjNubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjNmodnameN classnameNjj)}j]jkNc.damon_set_attrsasbuh1hhjNubjF)}(h h]h }(hjNhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjNubjH)}(hjHh]h*}(hjNhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjNubj])}(hattrsh]hattrs}(hjNhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjNubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhj)Nubeh}(h]h ]h"]h$]h&]hhuh1jFhjMhhhjNhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjMhhhjNhMubah}(h]jMah ](jjeh"]h$]h&]jj)jhuh1j'hjNhMhjMhhubj)}(hhh]h)}(h"Set attributes for the monitoring.h]h"Set attributes for the monitoring.}(hj$OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj!Ohhubah}(h]h ]h"]h$]h&]uh1jhjMhhhjNhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj`->after_aggregation or :c:type:`struct damon_callback `->after_wmarks_check callbacks), or from damon_call(). Every time interval is in micro-seconds. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjFOh]h Parameters}(hjHOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDOubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj@Oubj#)}(hhh](j()}(h-``struct damon_ctx *ctx`` monitoring context h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjeOh]hstruct damon_ctx *ctx}(hjgOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcOubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj_OubjH)}(hhh]h)}(hmonitoring contexth]hmonitoring context}(hj~OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzOhMhj{Oubah}(h]h ]h"]h$]h&]uh1jGhj_Oubeh}(h]h ]h"]h$]h&]uh1j'hjzOhMhj\Oubj()}(h4``struct damon_attrs *attrs`` monitoring attributes h](j.)}(h``struct damon_attrs *attrs``h]h)}(hjOh]hstruct damon_attrs *attrs}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjOubjH)}(hhh]h)}(hmonitoring attributesh]hmonitoring attributes}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjOubah}(h]h ]h"]h$]h&]uh1jGhjOubeh}(h]h ]h"]h$]h&]uh1j'hjOhMhj\Oubeh}(h]h ]h"]h$]h&]uh1j"hj@Oubh)}(h**Description**h]j)}(hjOh]h Description}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj@Oubh)}(hX-This function should be called while the kdamond is not running, an access check results aggregation is not ongoing (e.g., from :c:type:`struct damon_callback `->after_aggregation or :c:type:`struct damon_callback `->after_wmarks_check callbacks), or 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 }(hjOhhhNhNubh)}(h0:c:type:`struct damon_callback `h]h)}(hjOh]hstruct damon_callback}(hjOhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjOubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_callbackuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjOubh->after_aggregation or }(hjOhhhNhNubh)}(h0:c:type:`struct damon_callback `h]h)}(hjPh]hstruct damon_callback}(hjPhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjPubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_callbackuh1hhjPhMhjOubh6->after_wmarks_check callbacks), or from damon_call().}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjPhMhj@Oubh)}(h(Every time interval is in micro-seconds.h]h(Every time interval is in micro-seconds.}(hjDPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj@Oubh)}(h **Return**h]j)}(hjUPh]hReturn}(hjWPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSPubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj@Oubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjkPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj@Oubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjFhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_set_schemes (C function)c.damon_set_schemeshNtauh1jhjFhhhNhNubj#)}(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](jF)}(hvoidh]hvoid}(hjPhhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhjPhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hjPhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPhhhjPhMubjW)}(hdamon_set_schemesh]j])}(hdamon_set_schemesh]hdamon_set_schemes}(hjPhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjPhhhjPhMubjF)}(hC(struct damon_ctx *ctx, struct damos **schemes, ssize_t nr_schemes)h](jF)}(hstruct damon_ctx *ctxh](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_ctxh]h damon_ctx}(hjPhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjPmodnameN classnameNjj)}j]j!)}j!jPsbc.damon_set_schemesasbuh1hhjPubjF)}(h h]h }(hjQhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPubjH)}(hjHh]h*}(hj#QhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjPubj])}(hctxh]hctx}(hj0QhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjPubjF)}(hstruct damos **schemesh](j4)}(hj7h]hstruct}(hjIQhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjEQubjF)}(h h]h }(hjVQhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjEQubh)}(hhh]j])}(hdamosh]hdamos}(hjgQhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjdQubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjiQmodnameN classnameNjj)}j]jQc.damon_set_schemesasbuh1hhjEQubjF)}(h h]h }(hjQhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjEQubjH)}(hjHh]h*}(hjQhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjEQubjH)}(hjHh]h*}(hjQhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjEQubj])}(hschemesh]hschemes}(hjQhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjEQubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjPubjF)}(hssize_t nr_schemesh](h)}(hhh]j])}(hssize_th]hssize_t}(hjQhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjQubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjQmodnameN classnameNjj)}j]jQc.damon_set_schemesasbuh1hhjQubjF)}(h h]h }(hjQhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjQubj])}(h nr_schemesh]h nr_schemes}(hjQhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjQubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjPubeh}(h]h ]h"]h$]h&]hhuh1jFhjPhhhjPhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjPhhhjPhMubah}(h]jPah ](jjeh"]h$]h&]jj)jhuh1j'hjPhMhjPhhubj)}(hhh]h)}(h3Set data access monitoring based operation schemes.h]h3Set data access monitoring based operation schemes.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjRhhubah}(h]h ]h"]h$]h&]uh1jhjPhhhjPhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj7Rjj7Rjjjuh1j"hhhjFhNhNubj)}(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)}(hjARh]h Parameters}(hjCRhhhNhNubah}(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.chMhj;Rubj#)}(hhh](j()}(h-``struct damon_ctx *ctx`` monitoring context h](j.)}(h``struct damon_ctx *ctx``h]h)}(hj`Rh]hstruct damon_ctx *ctx}(hjbRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^Rubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjZRubjH)}(hhh]h)}(hmonitoring contexth]hmonitoring context}(hjyRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuRhMhjvRubah}(h]h ]h"]h$]h&]uh1jGhjZRubeh}(h]h ]h"]h$]h&]uh1j'hjuRhMhjWRubj()}(h0``struct damos **schemes`` array of the schemes h](j.)}(h``struct damos **schemes``h]h)}(hjRh]hstruct damos **schemes}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjRubjH)}(hhh]h)}(harray of the schemesh]harray of the schemes}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1jGhjRubeh}(h]h ]h"]h$]h&]uh1j'hjRhMhjWRubj()}(h8``ssize_t nr_schemes`` number of entries in **schemes** h](j.)}(h``ssize_t nr_schemes``h]h)}(hjRh]hssize_t nr_schemes}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjRubjH)}(hhh]h)}(h number of entries in **schemes**h](hnumber of entries in }(hjRhhhNhNubj)}(h **schemes**h]hschemes}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubeh}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1jGhjRubeh}(h]h ]h"]h$]h&]uh1j'hjRhMhjWRubeh}(h]h ]h"]h$]h&]uh1j"hj;Rubh)}(h**Description**h]j)}(hjSh]h Description}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj;Rubh)}(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.}(hj1ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj;Rubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjFhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%damos_commit_quota_goals (C function)c.damos_commit_quota_goalshNtauh1jhjFhhhNhNubj#)}(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](jF)}(hinth]hint}(hj`ShhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhj\ShhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM ubjF)}(h h]h }(hjoShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj\ShhhjnShM ubjW)}(hdamos_commit_quota_goalsh]j])}(hdamos_commit_quota_goalsh]hdamos_commit_quota_goals}(hjShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj}Subah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj\ShhhjnShM ubjF)}(h2(struct damos_quota *dst, struct damos_quota *src)h](jF)}(hstruct damos_quota *dsth](j4)}(hj7h]hstruct}(hjShhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjSubjF)}(h h]h }(hjShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjSubh)}(hhh]j])}(h damos_quotah]h damos_quota}(hjShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjSubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjSmodnameN classnameNjj)}j]j!)}j!jSsbc.damos_commit_quota_goalsasbuh1hhjSubjF)}(h h]h }(hjShhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjSubjH)}(hjHh]h*}(hjShhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjSubj])}(hdsth]hdst}(hjShhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjSubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjSubjF)}(hstruct damos_quota *srch](j4)}(hj7h]hstruct}(hjThhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj TubjF)}(h h]h }(hjThhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj Tubh)}(hhh]j])}(h damos_quotah]h damos_quota}(hj-ThhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj*Tubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetj/TmodnameN classnameNjj)}j]jSc.damos_commit_quota_goalsasbuh1hhj TubjF)}(h h]h }(hjKThhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj TubjH)}(hjHh]h*}(hjYThhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj Tubj])}(hsrch]hsrc}(hjfThhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj Tubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjSubeh}(h]h ]h"]h$]h&]hhuh1jFhj\ShhhjnShM ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjXShhhjnShM ubah}(h]jSSah ](jjeh"]h$]h&]jj)jhuh1j'hjnShM hjUShhubj)}(hhh]h)}(h*Commit DAMOS quota goals to another quota.h]h*Commit DAMOS quota goals to another quota.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjThhubah}(h]h ]h"]h$]h&]uh1jhjUShhhjnShM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjTjjTjjjuh1j"hhhjFhNhNubj)}(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 callbacks.h](h)}(h**Parameters**h]j)}(hjTh]h Parameters}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjTubj#)}(hhh](j()}(h@``struct damos_quota *dst`` The commit destination DAMOS quota. h](j.)}(h``struct damos_quota *dst``h]h)}(hjTh]hstruct damos_quota *dst}(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#The commit destination DAMOS quota.h]h#The commit destination DAMOS quota.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThMhjTubah}(h]h ]h"]h$]h&]uh1jGhjTubeh}(h]h ]h"]h$]h&]uh1j'hjThMhjTubj()}(h;``struct damos_quota *src`` The commit source DAMOS quota. h](j.)}(h``struct damos_quota *src``h]h)}(hj Uh]hstruct damos_quota *src}(hj UhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjUubjH)}(hhh]h)}(hThe commit source DAMOS quota.h]hThe commit source DAMOS quota.}(hj#UhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhMhj Uubah}(h]h ]h"]h$]h&]uh1jGhjUubeh}(h]h ]h"]h$]h&]uh1j'hjUhMhjTubeh}(h]h ]h"]h$]h&]uh1j"hjTubh)}(h**Description**h]j)}(hjEUh]h Description}(hjGUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCUubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjTubh)}(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[UhhhNhNubj)}(h**src**h]hsrc}(hjcUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[Uubh to }(hj[UhhhNhNubj)}(h**dst**h]hdst}(hjuUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[Uubh. Users should use this function for quota goals-level parameters update of running DAMON contexts, instead of manual in-place updates.}(hj[UhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjTubh)}(hYThis function should be called from parameters-update safe context, like DAMON callbacks.h]hYThis function should be called from parameters-update safe context, like DAMON callbacks.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjTubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjFhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)damos_filters_default_reject (C function)c.damos_filters_default_rejecthNtauh1jhjFhhhNhNubj#)}(hhh](j()}(h=bool damos_filters_default_reject (struct list_head *filters)h]j.)}(h_hM6ubjW)}(h damon_callh]j])}(h damon_callh]h damon_call}(hjQ_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjM_ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj,_hhhj>_hM6ubjF)}(h;(struct damon_ctx *ctx, struct damon_call_control *control)h](jF)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjm_hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hji_ubjF)}(h h]h }(hjz_hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhji_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!jS_sb c.damon_callasbuh1hhji_ubjF)}(h h]h }(hj_hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhji_ubjH)}(hjHh]h*}(hj_hhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhji_ubj])}(hctxh]hctx}(hj_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hji_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhje_ubjF)}(h"struct damon_call_control *controlh](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])}(hdamon_call_controlh]hdamon_call_control}(hj_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj_ubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetj_modnameN classnameNjj)}j]j_ c.damon_callasbuh1hhj_ubjF)}(h h]h }(hj`hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj_ubjH)}(hjHh]h*}(hj)`hhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj_ubj])}(hcontrolh]hcontrol}(hj6`hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhje_ubeh}(h]h ]h"]h$]h&]hhuh1jFhj,_hhhj>_hM6ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj(_hhhj>_hM6ubah}(h]j#_ah ](jjeh"]h$]h&]jj)jhuh1j'hj>_hM6hj%_hhubj)}(hhh]h)}(h9Invoke a given function on DAMON worker thread (kdamond).h]h9Invoke a given function on DAMON worker thread (kdamond).}(hj``hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM%hj]`hhubah}(h]h ]h"]h$]h&]uh1jhj%_hhhj>_hM6ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjx`jjx`jjjuh1j"hhhjFhNhNubj)}(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**, and wait until the kdamond finishes handling of the request. 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)}(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()}(hB``struct damon_ctx *ctx`` DAMON context to call the function for. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hj`h]hstruct damon_ctx *ctx}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM&hj`ubjH)}(hhh]h)}(h'DAMON context to call the function for.h]h'DAMON context to call the function for.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hM&hj`ubah}(h]h ]h"]h$]h&]uh1jGhj`ubeh}(h]h ]h"]h$]h&]uh1j'hj`hM&hj`ubj()}(hM``struct damon_call_control *control`` Control variable of the call request. h](j.)}(h&``struct damon_call_control *control``h]h)}(hj`h]h"struct damon_call_control *control}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM'hj`ubjH)}(hhh]h)}(h%Control variable of the call request.h]h%Control variable of the call request.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hM'hj`ubah}(h]h ]h"]h$]h&]uh1jGhj`ubeh}(h]h ]h"]h$]h&]uh1j'hj`hM'hj`ubeh}(h]h ]h"]h$]h&]uh1j"hj|`ubh)}(h**Description**h]j)}(hjah]h Description}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM)hj|`ubh)}(hX1Ask 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**, and wait until the kdamond finishes handling of the request.h](h%Ask DAMON worker thread (kdamond) of }(hj+ahhhNhNubj)}(h**ctx**h]hctx}(hj3ahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+aubhG to call a function with an argument data that respectively passed via }(hj+ahhhNhNubh)}(h5:c:type:`damon_call_control->fn `h]h)}(hjGah]hdamon_call_control->fn}(hjIahhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjEaubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM)hj+aubh and }(hj+ahhhNhNubh)}(h7:c:type:`damon_call_control->data `h]h)}(hjkah]hdamon_call_control->data}(hjmahhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjiaubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjdahM)hj+aubh of }(hj+ahhhNhNubj)}(h **control**h]hcontrol}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+aubh>, and wait until the kdamond finishes handling of the request.}(hj+ahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjdahM)hj|`ubh)}(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 }(hjahhhNhNubh)}(h&:c:type:`struct damon_ctx `h]h)}(hjah]hstruct damon_ctx}(hjahhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjaubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM.hjaubhX without additional synchronization. The return value of the function will be saved in }(hjahhhNhNubh)}(h>:c:type:`damon_call_control->return_code `h]h)}(hjah]hdamon_call_control->return_code}(hjahhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjaubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjahM.hjaubh.}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjahM.hj|`ubh)}(h **Return**h]j)}(hjah]hReturn}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM4hj|`ubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM4hj|`ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjFhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_walk (C function) c.damos_walkhNtauh1jhjFhhhNhNubj#)}(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](jF)}(hinth]hint}(hj@bhhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhjapply_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)}(hjch]h Parameters}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMOhjcubj#)}(hhh](j()}(hC``struct damon_ctx *ctx`` DAMON context to call the functions for. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjch]hstruct damon_ctx *ctx}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMLhjcubjH)}(hhh]h)}(h(DAMON context to call the functions for.h]h(DAMON context to call the functions for.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchMLhjcubah}(h]h ]h"]h$]h&]uh1jGhjcubeh}(h]h ]h"]h$]h&]uh1j'hjchMLhjcubj()}(hM``struct damos_walk_control *control`` Control variable of the walk request. h](j.)}(h&``struct damos_walk_control *control``h]h)}(hjch]h"struct damos_walk_control *control}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMMhjcubjH)}(hhh]h)}(h%Control variable of the walk request.h]h%Control variable of the walk request.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchMMhjdubah}(h]h ]h"]h$]h&]uh1jGhjcubeh}(h]h ]h"]h$]h&]uh1j'hjchMMhjcubeh}(h]h ]h"]h$]h&]uh1j"hjcubh)}(h**Description**h]j)}(hj%dh]h Description}(hj'dhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#dubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMOhjcubh)}(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 }(hj;dhhhNhNubj)}(h**ctx**h]hctx}(hjCdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;dubh 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.}(hj;dhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMOhjcubh)}(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\dhhhNhNubj)}(h**ctx**h]hctx}(hjddhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\dubh0 to it. The invocation is made only within one }(hj\dhhhNhNubh)}(h*:c:type:`damos->apply_interval_us `h]h)}(hjxdh]hdamos->apply_interval_us}(hjzdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjvdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMShj\dubh{ since damos_walk() invocation, for each scheme. The given callback function can hence safely access the internal data of }(hj\dhhhNhNubh)}(h&:c:type:`struct damon_ctx `h]h)}(hjdh]hstruct damon_ctx}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhjdhMShj\dubh and }(hj\dhhhNhNubh)}(h,:c:type:`struct damon_region `h]h)}(hjdh]hstruct damon_region}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhjdhMShj\dubh that each of the scheme will apply the action for next interval, without additional synchronizations against the kdamond. If every scheme of }(hj\dhhhNhNubj)}(h**ctx**h]hctx}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\dubh passed at least one }(hj\dhhhNhNubh)}(h*:c:type:`damos->apply_interval_us `h]h)}(hjdh]hdamos->apply_interval_us}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhjdhMShj\dubhT, kdamond marks the request as completed so that damos_walk() can wakeup and return.}(hj\dhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjdhMShjcubh)}(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.chM]hjcubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hj3ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM]hjcubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjFhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j8damon_set_region_biggest_system_ram_default (C function)-c.damon_set_region_biggest_system_ram_defaulthNtauh1jhjFhhhNhNubj#)}(hhh](j()}(hrint damon_set_region_biggest_system_ram_default (struct damon_target *t, unsigned long *start, unsigned long *end)h]j.)}(hqint damon_set_region_biggest_system_ram_default(struct damon_target *t, unsigned long *start, unsigned long *end)h](jF)}(hinth]hint}(hjbehhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhj^ehhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM ubjF)}(h h]h }(hjqehhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj^ehhhjpehM ubjW)}(h+damon_set_region_biggest_system_ram_defaulth]j])}(h+damon_set_region_biggest_system_ram_defaulth]h+damon_set_region_biggest_system_ram_default}(hjehhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjeubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj^ehhhjpehM ubjF)}(hB(struct damon_target *t, unsigned long *start, unsigned long *end)h](jF)}(hstruct damon_target *th](j4)}(hj7h]hstruct}(hjehhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjeubjF)}(h h]h }(hjehhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjeubh)}(hhh]j])}(h damon_targeth]h damon_target}(hjehhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjeubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjemodnameN classnameNjj)}j]j!)}j!jesb-c.damon_set_region_biggest_system_ram_defaultasbuh1hhjeubjF)}(h h]h }(hjehhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjeubjH)}(hjHh]h*}(hjehhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjeubj])}(hth]ht}(hjehhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjeubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjeubjF)}(hunsigned long *starth](jF)}(hunsignedh]hunsigned}(hjfhhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhj fubjF)}(h h]h }(hjfhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj fubjF)}(hlongh]hlong}(hj-fhhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhj fubjF)}(h h]h }(hj;fhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj fubjH)}(hjHh]h*}(hjIfhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhj fubj])}(hstarth]hstart}(hjVfhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj fubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjeubjF)}(hunsigned long *endh](jF)}(hunsignedh]hunsigned}(hjofhhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhjkfubjF)}(h h]h }(hj}fhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjkfubjF)}(hlongh]hlong}(hjfhhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhjkfubjF)}(h h]h }(hjfhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjkfubjH)}(hjHh]h*}(hjfhhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjkfubj])}(hendh]hend}(hjfhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjkfubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjeubeh}(h]h ]h"]h$]h&]hhuh1jFhj^ehhhjpehM ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjZehhhjpehM ubah}(h]jUeah ](jjeh"]h$]h&]jj)jhuh1j'hjpehM hjWehhubj)}(hhh]h)}(hTSet the region of the given monitoring target as requested, or biggest 'System RAM'.h]hXSet the region of the given monitoring target as requested, or biggest ‘System RAM’.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjfhhubah}(h]h ]h"]h$]h&]uh1jhjWehhhjpehM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjfjjfjjjuh1j"hhhjFhNhNubj)}(hX**Parameters** ``struct damon_target *t`` The monitoring target to set the region. ``unsigned long *start`` The pointer to the start address of the region. ``unsigned long *end`` The pointer to the end address of the region. **Description** This function sets the region of **t** as requested by **start** and **end**. If the values of **start** and **end** are zero, however, this function finds the biggest 'System RAM' resource and sets the region to cover the resource. In the latter case, this function saves the start and end addresses of the resource in **start** and **end**, respectively. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjgh]h Parameters}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjfubj#)}(hhh](j()}(hD``struct damon_target *t`` The monitoring target to set the region. h](j.)}(h``struct damon_target *t``h]h)}(hjgh]hstruct damon_target *t}(hj!ghhhNhNubah}(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.chM hjgubjH)}(hhh]h)}(h(The monitoring target to set the region.h]h(The monitoring target to set the region.}(hj8ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4ghM hj5gubah}(h]h ]h"]h$]h&]uh1jGhjgubeh}(h]h ]h"]h$]h&]uh1j'hj4ghM hjgubj()}(hI``unsigned long *start`` The pointer to the start address of the region. h](j.)}(h``unsigned long *start``h]h)}(hjXgh]hunsigned long *start}(hjZghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVgubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjRgubjH)}(hhh]h)}(h/The pointer to the start address of the region.h]h/The pointer to the start address of the region.}(hjqghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmghM hjngubah}(h]h ]h"]h$]h&]uh1jGhjRgubeh}(h]h ]h"]h$]h&]uh1j'hjmghM hjgubj()}(hE``unsigned long *end`` The pointer to the end address of the region. h](j.)}(h``unsigned long *end``h]h)}(hjgh]hunsigned long *end}(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.chM hjgubjH)}(hhh]h)}(h-The pointer to the end address of the region.h]h-The pointer to the end address of the region.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghM hjgubah}(h]h ]h"]h$]h&]uh1jGhjgubeh}(h]h ]h"]h$]h&]uh1j'hjghM hjgubeh}(h]h ]h"]h$]h&]uh1j"hjfubh)}(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.chM hjfubh)}(hXfThis function sets the region of **t** as requested by **start** and **end**. If the values of **start** and **end** are zero, however, this function finds the biggest 'System RAM' resource and sets the region to cover the resource. In the latter case, this function saves the start and end addresses of the resource in **start** and **end**, respectively.h](h!This function sets the region of }(hjghhhNhNubj)}(h**t**h]ht}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubh as requested by }(hjghhhNhNubj)}(h **start**h]hstart}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubh and }(hjghhhNhNubj)}(h**end**h]hend}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubh. If the values of }(hjghhhNhNubj)}(h **start**h]hstart}(hj hhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubh and }hjgsbj)}(h**end**h]hend}(hj2hhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubh are zero, however, this function finds the biggest ‘System RAM’ resource and sets the region to cover the resource. In the latter case, this function saves the start and end addresses of the resource in }(hjghhhNhNubj)}(h **start**h]hstart}(hjDhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubh and }hjgsbj)}(h**end**h]hend}(hjVhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubh, respectively.}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjfubh)}(h **Return**h]j)}(hjqhh]hReturn}(hjshhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjohubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjfubh)}(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.chM hjfubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjFhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j,damon_update_region_access_rate (C function)!c.damon_update_region_access_ratehNtauh1jhjFhhhNhNubj#)}(hhh](j()}(hgvoid damon_update_region_access_rate (struct damon_region *r, bool accessed, struct damon_attrs *attrs)h]j.)}(hfvoid damon_update_region_access_rate(struct damon_region *r, bool accessed, struct damon_attrs *attrs)h](jF)}(hvoidh]hvoid}(hjhhhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhjhhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM` ubjF)}(h h]h }(hjhhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhhjhhM` ubjW)}(hdamon_update_region_access_rateh]j])}(hdamon_update_region_access_rateh]hdamon_update_region_access_rate}(hjhhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjhubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhhjhhM` ubjF)}(hB(struct damon_region *r, bool accessed, struct damon_attrs *attrs)h](jF)}(hstruct damon_region *rh](j4)}(hj7h]hstruct}(hjhhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhubjF)}(h h]h }(hjihhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhubh)}(hhh]j])}(h damon_regionh]h damon_region}(hjihhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjiubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjimodnameN classnameNjj)}j]j!)}j!jhsb!c.damon_update_region_access_rateasbuh1hhjhubjF)}(h h]h }(hj1ihhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhubjH)}(hjHh]h*}(hj?ihhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjhubj])}(hrh]hr}(hjLihhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjhubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjhubjF)}(h bool accessedh](jF)}(hjFh]hbool}(hjeihhhNhNubah}(h]h ]jFah"]h$]h&]uh1jFhjaiubjF)}(h h]h }(hjrihhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjaiubj])}(haccessedh]haccessed}(hjihhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjaiubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjhubjF)}(hstruct damon_attrs *attrsh](j4)}(hj7h]hstruct}(hjihhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjiubjF)}(h h]h }(hjihhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjiubh)}(hhh]j])}(h damon_attrsh]h damon_attrs}(hjihhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjiubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjimodnameN classnameNjj)}j]j-i!c.damon_update_region_access_rateasbuh1hhjiubjF)}(h h]h }(hjihhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjiubjH)}(hjHh]h*}(hjihhhNhNubah}(h]h ]jHah"]h$]h&]uh1jHhjiubj])}(hattrsh]hattrs}(hjihhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjiubeh}(h]h ]h"]h$]h&]noemphhhuh1jFhjhubeh}(h]h ]h"]h$]h&]hhuh1jFhjhhhhjhhM` ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhhjhhM` ubah}(h]jhah ](jjeh"]h$]h&]jj)jhuh1j'hjhhM` hjhhhubj)}(hhh]h)}(h#Update the access rate of a region.h]h#Update the access rate of a region.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMV hjjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhhjhhM` ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj2jjj2jjjjuh1j"hhhjFhNhNubj)}(hX**Parameters** ``struct damon_region *r`` The DAMON region to update for its access check result. ``bool accessed`` Whether the region has accessed during last sampling interval. ``struct damon_attrs *attrs`` The damon_attrs of the DAMON context. **Description** Update the access rate of a region with the region's last sampling interval access check result. Usually this will be called by :c:type:`damon_operations->check_accesses ` callback.h](h)}(h**Parameters**h]j)}(hjjhhhNhNubah}(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.chMZ hj6jubj#)}(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)}(hj[jh]hstruct damon_region *r}(hj]jhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYjubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMW hjUjubjH)}(hhh]h)}(h7The DAMON region to update for its access check result.h]h7The DAMON region to update for its access check result.}(hjtjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjpjhMW hjqjubah}(h]h ]h"]h$]h&]uh1jGhjUjubeh}(h]h ]h"]h$]h&]uh1j'hjpjhMW hjRjubj()}(hQ``bool accessed`` Whether the region has accessed during last sampling interval. h](j.)}(h``bool accessed``h]h)}(hjjh]h bool accessed}(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.chMX hjjubjH)}(hhh]h)}(h>Whether the region has accessed during last sampling interval.h]h>Whether the region has accessed during last sampling interval.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMX hjjubah}(h]h ]h"]h$]h&]uh1jGhjjubeh}(h]h ]h"]h$]h&]uh1j'hjjhMX hjRjubj()}(hD``struct damon_attrs *attrs`` The damon_attrs of the DAMON context. h](j.)}(h``struct damon_attrs *attrs``h]h)}(hjjh]hstruct damon_attrs *attrs}(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.chMY hjjubjH)}(hhh]h)}(h%The damon_attrs of the DAMON context.h]h%The damon_attrs of the DAMON context.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMY hjjubah}(h]h ]h"]h$]h&]uh1jGhjjubeh}(h]h ]h"]h$]h&]uh1j'hjjhMY hjRjubeh}(h]h ]h"]h$]h&]uh1j"hj6jubh)}(h**Description**h]j)}(hjkh]h Description}(hj khhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM[ hj6jubh)}(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.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM[ hj6jubh)}(hfUsually this will be called by :c:type:`damon_operations->check_accesses ` callback.h](hUsually this will be called by }(hj-khhhNhNubh)}(h=:c:type:`damon_operations->check_accesses `h]h)}(hj7kh]h damon_operations->check_accesses}(hj9khhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5kubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM^ hj-kubh callback.}(hj-khhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjTkhM^ hj6jubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjFhhhNhNubeh}(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_handlerjkerror_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}(jskjpkjFjFjkkjhku nametypes}(jskjFjkkuh}(jpkhjFhjj)jjjj$jjj j jjj1j6jj"j$j)jsjxjjj j jb$jg$jv(j{(j)j)j),j.,j4j 4j5j5j:j:j<j<j?j?jBjBjhkjFjFjFj+Hj0HjIjIjbLjgLjMjMjPjPjSSjXSjUjUj WjWjgYjlYjiZjnZj]j]j#_j(_j3bj8bjUejZejhjhu 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.