sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget /translations/zh_CN/mm/damon/apimodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/zh_TW/mm/damon/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/it_IT/mm/damon/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ja_JP/mm/damon/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ko_KR/mm/damon/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/sp_SP/mm/damon/apimodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh:/var/lib/git/docbuild/linux/Documentation/mm/damon/api.rsthKubhsection)}(hhh](htitle)}(h API Referenceh]h API Reference}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hKernel space programs can use every feature of DAMON using below APIs. All you need to do is including ``damon.h``, which is located in ``include/linux/`` of the source tree.h](hhKernel space programs can use every feature of DAMON using below APIs. All you need to do is including }(hhhhhNhNubhliteral)}(h ``damon.h``h]hdamon.h}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh, which is located in }(hhhhhNhNubh)}(h``include/linux/``h]hinclude/linux/}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh of the source tree.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Structuresh]h Structures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singledamon_addr_range (C struct)c.damon_addr_rangehNtauh1jhhhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhNubhdesc)}(hhh](hdesc_signature)}(hdamon_addr_rangeh]hdesc_signature_line)}(hstruct damon_addr_rangeh](hdesc_sig_keyword)}(hstructh]hstruct}(hj5hhhNhNubah}(h]h ]kah"]h$]h&]uh1j3hj/hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubhdesc_sig_space)}(h h]h }(hjGhhhNhNubah}(h]h ]wah"]h$]h&]uh1jEhj/hhhjDhKubh desc_name)}(hdamon_addr_rangeh]h desc_sig_name)}(hj+h]hdamon_addr_range}(hj^hhhNhNubah}(h]h ]nah"]h$]h&]uh1j\hjXubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jVhj/hhhjDhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1j-sphinx_line_type declaratorhj)hhhjDhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j'hjDhKhj$hhubh desc_content)}(hhh]h)}(h5Represents an address region of [**start**, **end**).h](h!Represents an address region of [}(hjhhhNhNubhstrong)}(h **start**h]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h**end**h]hend}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhj$hhhjDhKubeh}(h]h ](cstructeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1j"hhhhhj!hNubh container)}(h**Definition**:: struct damon_addr_range { unsigned long start; unsigned long end; }; **Members** ``start`` Start address of the region (inclusive). ``end`` End address of the region (exclusive).h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK!hjubh literal_block)}(hLstruct damon_addr_range { unsigned long start; unsigned long end; };h]hLstruct damon_addr_range { unsigned long start; unsigned long end; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK#hjubh)}(h **Members**h]j)}(hj h]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK(hjubhdefinition_list)}(hhh](hdefinition_list_item)}(h3``start`` Start address of the region (inclusive). h](hterm)}(h ``start``h]h)}(hj1h]hstart}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj)ubh definition)}(hhh]h)}(h(Start address of the region (inclusive).h]h(Start address of the region (inclusive).}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhKhjIubah}(h]h ]h"]h$]h&]uh1jGhj)ubeh}(h]h ]h"]h$]h&]uh1j'hjFhKhj$ubj()}(h.``end`` End address of the region (exclusive).h](j.)}(h``end``h]h)}(hjlh]hend}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjfubjH)}(hhh]h)}(h&End address of the region (exclusive).h]h&End address of the region (exclusive).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK hjubah}(h]h ]h"]h$]h&]uh1jGhjfubeh}(h]h ]h"]h$]h&]uh1j'hjhKhj$ubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_size_range (C struct)c.damon_size_rangehNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamon_size_rangeh]j.)}(hstruct damon_size_rangeh](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK&ubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhK&ubjW)}(hdamon_size_rangeh]j])}(hjh]hdamon_size_range}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhK&ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhK&ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhK&hjhhubj)}(hhh]h)}(haggr_interval ` and be increased for every :c:type:`damon_attrs->sample_interval ` if an access to the region during the last sampling interval is found. The update of this field should not be done with direct access but with the helper function, damon_update_region_access_rate().h](j)}(h**nr_accesses**h]h nr_accesses}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubh is reset to zero for every }(hj`hhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hjxh]hdamon_attrs->aggr_interval}(hjzhhhNhNubah}(h]h ](xrefjc-typeeh"]h$]h&]uh1hhjvubah}(h]h ]h"]h$]h&]refdoc mm/damon/api refdomainjreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sb reftarget damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK9hj`ubh and be increased for every }(hj`hhhNhNubh)}(h4:c:type:`damon_attrs->sample_interval `h]h)}(hjh]hdamon_attrs->sample_interval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjhK9hj`ubh if an access to the region during the last sampling interval is found. The update of this field should not be done with direct access but with the helper function, damon_update_region_access_rate().}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK9hhhhubh)}(hX**nr_accesses_bp** is another representation of **nr_accesses** in basis point (1 in 10,000) that updated for every :c:type:`damon_attrs->sample_interval ` in a manner similar to moving sum. By the algorithm, this value becomes **nr_accesses** * 10000 for every :c:type:`struct damon_attrs `->aggr_interval. This can be used when the aggregation interval is too huge and therefore cannot wait for it before getting the access monitoring results.h](j)}(h**nr_accesses_bp**h]hnr_accesses_bp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is another representation of }(hjhhhNhNubj)}(h**nr_accesses**h]h nr_accesses}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh5 in basis point (1 in 10,000) that updated for every }(hjhhhNhNubh)}(h4:c:type:`damon_attrs->sample_interval `h]h)}(hjh]hdamon_attrs->sample_interval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhK?hjubhJ in a manner similar to moving sum. By the algorithm, this value becomes }(hjhhhNhNubj)}(h**nr_accesses**h]h nr_accesses}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh * 10000 for every }(hjhhhNhNubh)}(h*:c:type:`struct damon_attrs `h]h)}(hj.h]hstruct damon_attrs}(hj0hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjhK?hjubh->aggr_interval. This can be used when the aggregation interval is too huge and therefore cannot wait for it before getting the access monitoring results.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK?hhhhubh)}(hX3**age** is initially zero, increased for each aggregation interval, and reset to zero again if the access frequency is significantly changed. If two regions are merged into a new region, both **nr_accesses** and **age** of the new region are set as region size-weighted average of those of the two regions.h](j)}(h**age**h]hage}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubh is initially zero, increased for each aggregation interval, and reset to zero again if the access frequency is significantly changed. If two regions are merged into a new region, both }(hjUhhhNhNubj)}(h**nr_accesses**h]h nr_accesses}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubh and }(hjUhhhNhNubj)}(h**age**h]hage}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubhW of the new region are set as region size-weighted average of those of the two regions.}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKFhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_target (C struct)c.damon_targethNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damon_targeth]j.)}(hstruct damon_targeth](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKNubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhKNubjW)}(h damon_targeth]j])}(hjh]h damon_target}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhKNubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhKNubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhKNhjhhubj)}(hhh]h)}(hRepresents a monitoring target.h]hRepresents a monitoring target.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKYhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKNubeh}(h]h ](jstructeh"]h$]h&]jjjj jj jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_target { struct pid *pid; unsigned int nr_regions; struct list_head regions_list; struct list_head list; }; **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.hhKfubjF)}(h h]h }(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj hhhj hKfubjW)}(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 hKfubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj hhhj hKfubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j'hj hKfhj 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 hKfubeh}(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.hhKzhj0 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 hKzhj0 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 hKzhj0 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 hKzhj0 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 hKzhj0 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 hKzhj0 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 hKzhj0 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 hKzhj0 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 hKzhj0 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 hKzhj0 ubh.}(hj0 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjW hKzhhhhubj)}(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)}(hXE**Constants** ``DAMOS_QUOTA_USER_INPUT`` User-input value. ``DAMOS_QUOTA_SOME_MEM_PSI_US`` System level some memory PSI in us. ``DAMOS_QUOTA_NODE_MEM_USED_BP`` MemUsed ratio of a node. ``DAMOS_QUOTA_NODE_MEM_FREE_BP`` MemFree ratio of a node. ``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()}(h:``DAMOS_QUOTA_NODE_MEM_USED_BP`` MemUsed ratio of a node. h](j.)}(h ``DAMOS_QUOTA_NODE_MEM_USED_BP``h]h)}(hjh]hDAMOS_QUOTA_NODE_MEM_USED_BP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(hMemUsed ratio of a node.h]hMemUsed ratio of a node.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhj0ubj()}(h:``DAMOS_QUOTA_NODE_MEM_FREE_BP`` MemFree ratio of a node. h](j.)}(h ``DAMOS_QUOTA_NODE_MEM_FREE_BP``h]h)}(hjh]hDAMOS_QUOTA_NODE_MEM_FREE_BP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(hMemFree ratio of a node.h]hMemFree ratio of a node.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'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.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj3ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj2hKhj0ubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj`h]h Description}(hjbhhhNhNubah}(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)}(hMMetrics equal to larger than **NR_DAMOS_QUOTA_GOAL_METRICS** are unsupported.h](hMetrics equal to larger than }(hjvhhhNhNubj)}(h**NR_DAMOS_QUOTA_GOAL_METRICS**h]hNR_DAMOS_QUOTA_GOAL_METRICS}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh are unsupported.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_quota_goal (C struct)c.damos_quota_goalhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_quota_goalh]j.)}(hstruct damos_quota_goalh](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhKubjW)}(hdamos_quota_goalh]j])}(hjh]hdamos_quota_goal}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhKhjhhubj)}(hhh]h)}(h$DAMOS scheme quota auto-tuning goal.h]h$DAMOS scheme quota auto-tuning goal.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]jjjj jj jjjuh1j"hhhhhj!hNubj)}(hXS**Definition**:: struct damos_quota_goal { enum damos_quota_goal_metric metric; unsigned long target_value; unsigned long current_value; union { u64 last_psi_total; int nid; }; 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 ``nid`` Node id. ``list`` List head for siblings.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubj)}(hstruct damos_quota_goal { enum damos_quota_goal_metric metric; unsigned long target_value; unsigned long current_value; union { u64 last_psi_total; int nid; }; 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; int nid; }; 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.hhKhjubh)}(h **Members**h]j)}(hj@h]hMembers}(hjBhhhNhNubah}(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.hhKhjubj#)}(hhh](j()}(h8``metric`` Metric to be used for representing the goal. h](j.)}(h ``metric``h]h)}(hj_h]hmetric}(hjahhhNhNubah}(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.hhKhjYubjH)}(hhh]h)}(h,Metric to be used for representing the goal.h]h,Metric to be used for representing the goal.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthKhjuubah}(h]h ]h"]h$]h&]uh1jGhjYubeh}(h]h ]h"]h$]h&]uh1j'hjthKhjVubj()}(hH``target_value`` Target value of **metric** to achieve with the tuning. h](j.)}(h``target_value``h]h)}(hjh]h target_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h6Target value of **metric** to achieve with the tuning.h](hTarget value of }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to achieve with the tuning.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjVubj()}(h/``current_value`` Current value of **metric**. h](j.)}(h``current_value``h]h)}(hjh]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(hCurrent value of **metric**.h](hCurrent value of }(hjhhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjVubj()}(h``{unnamed_union}`` anonymous h](j.)}(h``{unnamed_union}``h]h)}(hj.h]h{unnamed_union}}(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)}(h anonymoush]h anonymous}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChKhjDubah}(h]h ]h"]h$]h&]uh1jGhj(ubeh}(h]h ]h"]h$]h&]uh1j'hjChKhjVubj()}(h+``last_psi_total`` Last measured total PSI h](j.)}(h``last_psi_total``h]h)}(hjgh]hlast_psi_total}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjaubjH)}(hhh]h)}(hLast measured total PSIh]hLast measured total PSI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hKhj}ubah}(h]h ]h"]h$]h&]uh1jGhjaubeh}(h]h ]h"]h$]h&]uh1j'hj|hKhjVubj()}(h``nid`` Node id. h](j.)}(h``nid``h]h)}(hjh]hnid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(hNode id.h]hNode id.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjVubj()}(h ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hjh]hlist}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(hList head for siblings.h]hList head for siblings.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjVubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hData structure for getting the current score of the quota tuning goal. The score is calculated by how close **current_value** and **target_value** are. Then the score is entered to DAMON's internal feedback loop mechanism to get the auto-tuned quota.h](hmData structure for getting the current score of the quota tuning goal. The score is calculated by how close }(hj2hhhNhNubj)}(h**current_value**h]h current_value}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh and }(hj2hhhNhNubj)}(h**target_value**h]h target_value}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubhk are. Then the score is entered to DAMON’s internal feedback loop mechanism to get the auto-tuned quota.}(hj2hhhNhNubeh}(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 }(hjehhhNhNubj)}(h **metric**h]hmetric}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubh is DAMOS_QUOTA_USER_INPUT, }(hjehhhNhNubj)}(h**current_value**h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubhg should be manually entered by the user, probably inside the kdamond callbacks. Otherwise, DAMON sets }(hjehhhNhNubj)}(h**current_value**h]h current_value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubh with self-measured value of }(hjehhhNhNubj)}(h **metric**h]hmetric}(hjhhhNhNubah}(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.hhKhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_quota (C struct) c.damos_quotahNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damos_quotah]j.)}(hstruct damos_quotah](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhKubjW)}(h damos_quotah]j])}(hjh]h damos_quota}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhKhjhhubj)}(hhh]h)}(h0Controls the aggressiveness of the given scheme.h]h0Controls the aggressiveness of the given scheme.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]jjjj/jj/jjjuh1j"hhhhhj!hNubj)}(hX(**Definition**:: struct damos_quota { unsigned long reset_interval; unsigned long ms; unsigned long sz; struct list_head goals; unsigned long esz; unsigned int weight_sz; unsigned int weight_nr_accesses; unsigned int weight_age; }; **Members** ``reset_interval`` Charge reset interval in milliseconds. ``ms`` Maximum milliseconds that the scheme can use. ``sz`` Maximum bytes of memory that the action can be applied. ``goals`` Head of quota tuning goals (:c:type:`damos_quota_goal`) list. ``esz`` Effective size quota in bytes. ``weight_sz`` Weight of the region's size for prioritization. ``weight_nr_accesses`` Weight of the region's nr_accesses for prioritization. ``weight_age`` Weight of the region's age for prioritization.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh:}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj3ubj)}(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; };}hjTsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj3ubh)}(h **Members**h]j)}(hjeh]hMembers}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj3ubj#)}(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.hhKhj~ubjH)}(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&]uh1jGhj~ubeh}(h]h ]h"]h$]h&]uh1j'hjhKhj{ubj()}(h5``ms`` Maximum milliseconds that the scheme can use. h](j.)}(h``ms``h]h)}(hjh]hms}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h-Maximum milliseconds that the scheme can use.h]h-Maximum milliseconds that the scheme can use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhj{ubj()}(h?``sz`` Maximum bytes of memory that the action can be applied. h](j.)}(h``sz``h]h)}(hjh]hsz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h7Maximum bytes of memory that the action can be applied.h]h7Maximum bytes of memory that the action can be applied.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hj hKhj{ubj()}(hH``goals`` Head of quota tuning goals (:c:type:`damos_quota_goal`) list. h](j.)}(h ``goals``h]h)}(hj/h]hgoals}(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.hhKhj)ubjH)}(hhh]h)}(h=Head of quota tuning goals (:c:type:`damos_quota_goal`) list.h](hHead of quota tuning goals (}(hjHhhhNhNubh)}(h:c:type:`damos_quota_goal`h]h)}(hjRh]hdamos_quota_goal}(hjThhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjPubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_quota_goaluh1hhjDhKhjHubh) list.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjDhKhjEubah}(h]h ]h"]h$]h&]uh1jGhj)ubeh}(h]h ]h"]h$]h&]uh1j'hjDhKhj{ubj()}(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'hjhKhj{ubj()}(h>``weight_sz`` Weight of the region's size for prioritization. h](j.)}(h ``weight_sz``h]h)}(hjh]h weight_sz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h/Weight of the region's size for prioritization.h]h1Weight of the region’s size for prioritization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhj{ubj()}(hN``weight_nr_accesses`` Weight of the region's nr_accesses for prioritization. h](j.)}(h``weight_nr_accesses``h]h)}(hjh]hweight_nr_accesses}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjubjH)}(hhh]h)}(h6Weight of the region's nr_accesses for prioritization.h]h8Weight of the region’s nr_accesses for prioritization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhj{ubj()}(h=``weight_age`` Weight of the region's age for prioritization.h](j.)}(h``weight_age``h]h)}(hj6h]h weight_age}(hj8hhhNhNubah}(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.hhKhj0ubjH)}(hhh]h)}(h.Weight of the region's age for prioritization.h]h0Weight of the region’s age for prioritization.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhjLubah}(h]h ]h"]h$]h&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hjKhKhj{ubeh}(h]h ]h"]h$]h&]uh1j"hj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjyh]h Description}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(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 refexplicitrefwarnjjjmsuh1hhjhKhjubh and }(hjhhhNhNubh)}(h :c:type:`sz`h]h)}(hjh]hsz}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjszuh1hhjhKhjubhI, respectively. If the time quota is set, DAMON tries to use only up 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 refexplicitrefwarnjjjmsuh1hhjhKhjubh milliseconds within }(hjhhhNhNubh)}(h:c:type:`reset_interval`h]h)}(hj&h]hreset_interval}(hj(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjreset_intervaluh1hhjhKhjubh` 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)}(hjIh]hsz}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjszuh1hhjhKhjubh bytes within }(hjhhhNhNubh)}(h:c:type:`reset_interval`h]h)}(hjlh]hreset_interval}(hjnhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjreset_intervaluh1hhjhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhhhhubh)}(hTo convince the different types of quotas and goals, DAMON internally converts those into one single size quota called "effective quota". DAMON internally uses it as the only one real quota. The conversion is made as follows.h]hTo convince the different types of quotas and goals, DAMON internally converts those into one single size quota called “effective quota”. DAMON internally uses it as the only one real quota. The conversion is made as follows.}(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 }(hjhhhNhNubj)}(h **goals**h]hgoals}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is not empty, DAMON calculates yet another size quota based on the goals using its internal feedback loop algorithm, for every }(hjhhhNhNubj)}(h**reset_interval**h]hreset_interval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhu. Then, if the new size quota is smaller than the effective quota, it uses the new size quota as the effective quota.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(h>The resulting effective size quota in bytes is set to **esz**.h](h6The resulting effective size quota in bytes is set to }(hjhhhNhNubj)}(h**esz**h]hesz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhhhhubh)}(hXvFor selecting regions within the quota, DAMON prioritizes current scheme's target memory regions using the :c:type:`struct damon_operations `->get_scheme_score. You could customize the prioritization logic by setting :c:type:`weight_sz`, :c:type:`weight_nr_accesses`, and :c:type:`weight_age`, because monitoring operations are encouraged to respect those.h](hmFor selecting regions within the quota, DAMON prioritizes current scheme’s target memory regions using the }(hj(hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj2h]hstruct damon_operations}(hj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj0ubah}(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)}(hjVh]h weight_sz}(hjXhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjTubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj weight_szuh1hhjOhKhj(ubh, }(hj(hhhNhNubh)}(h:c:type:`weight_nr_accesses`h]h)}(hjyh]hweight_nr_accesses}(hj{hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjwubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjweight_nr_accessesuh1hhjOhKhj(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_ageuh1hhjOhKhj(ubh@, because monitoring operations are encouraged to respect those.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjOhKhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_wmark_metric (C enum)c.damos_wmark_metrichNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_wmark_metrich]j.)}(henum damos_wmark_metrich](j4)}(hj h]henum}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhKubjW)}(hdamos_wmark_metrich]j])}(hjh]hdamos_wmark_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 watermark metric.h]h Represents the watermark metric.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jenumeh"]h$]h&]jjjj6jj6jjjuh1j"hhhhhj!hNubj)}(h**Constants** ``DAMOS_WMARK_NONE`` Ignore the watermarks of the given scheme. ``DAMOS_WMARK_FREE_MEM_RATE`` Free memory rate of the system in [0,1000]. ``NR_DAMOS_WMARK_METRICS`` Total number of DAMOS watermark metricsh](h)}(h **Constants**h]j)}(hj@h]h Constants}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM hj:ubj#)}(hhh](j()}(h@``DAMOS_WMARK_NONE`` Ignore the watermarks of the given scheme. h](j.)}(h``DAMOS_WMARK_NONE``h]h)}(hj_h]hDAMOS_WMARK_NONE}(hjahhhNhNubah}(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.hhMhjYubjH)}(hhh]h)}(h*Ignore the watermarks of the given scheme.h]h*Ignore the watermarks of the given scheme.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthMhjuubah}(h]h ]h"]h$]h&]uh1jGhjYubeh}(h]h ]h"]h$]h&]uh1j'hjthMhjVubj()}(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.hhMhjubjH)}(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&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhjVubj()}(hB``NR_DAMOS_WMARK_METRICS`` Total number of DAMOS watermark metricsh](j.)}(h``NR_DAMOS_WMARK_METRICS``h]h)}(hjh]hNR_DAMOS_WMARK_METRICS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjubjH)}(hhh]h)}(h'Total number of DAMOS watermark metricsh]h'Total number of DAMOS watermark metrics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhjVubeh}(h]h ]h"]h$]h&]uh1j"hj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_watermarks (C struct)c.damos_watermarkshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_watermarksh]j.)}(hstruct damos_watermarksh](j4)}(hj7h]hstruct}(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 }(hj9hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj'hhhj8hMubjW)}(hdamos_watermarksh]j])}(hj%h]hdamos_watermarks}(hjKhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjGubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj'hhhj8hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj#hhhj8hMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hj8hMhj hhubj)}(hhh]h)}(h1Controls when a given scheme should be activated.h]h1Controls when a given scheme should be activated.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjjhhubah}(h]h ]h"]h$]h&]uh1jhj hhhj8hMubeh}(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.hhM#hjubj#)}(hhh](j()}(h&``metric`` Metric for the watermarks. h](j.)}(h ``metric``h]h)}(hjh]hmetric}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjubjH)}(hhh]h)}(hMetric for the watermarks.h]hMetric for the watermarks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhjubj()}(h=``interval`` Watermarks check time interval in microseconds. h](j.)}(h ``interval``h]h)}(hjh]hinterval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj ubjH)}(hhh]h)}(h/Watermarks check time interval in microseconds.h]h/Watermarks check time interval in microseconds.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj)ubah}(h]h ]h"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]uh1j'hj(hMhjubj()}(h``high`` High watermark. h](j.)}(h``high``h]h)}(hjLh]hhigh}(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.hhMhjFubjH)}(hhh]h)}(hHigh watermark.h]hHigh watermark.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahMhjbubah}(h]h ]h"]h$]h&]uh1jGhjFubeh}(h]h ]h"]h$]h&]uh1j'hjahMhjubj()}(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'hjhMhjubj()}(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.hhMhjubjH)}(hhh]h)}(hLow watermark.h]hLow watermark.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhMhjubeh}(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.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 }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hj!h]hmetric}(hj#hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjubh is }(hjhhhNhNubh)}(h:c:type:`DAMOS_WMARK_NONE`h]h)}(hjEh]hDAMOS_WMARK_NONE}(hjGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_WMARK_NONEuh1hhj>hMhjubh, the scheme is always active. Being active means DAMON does monitoring and applying the action of the scheme to appropriate memory regions. Else, DAMON checks }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjhh]hmetric}(hjjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjfubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhj>hMhjubh" of the system for at least every }(hjhhhNhNubh)}(h:c:type:`interval`h]h)}(hjh]hinterval}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjintervaluh1hhj>hMhjubh! microseconds and works as below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj>hMhhhhubh)}(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.hhM hjubh is higher than }(hjhhhNhNubh)}(h:c:type:`high`h]h)}(hjh]hhigh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjhighuh1hhjhM hjubh!, the scheme is inactivated. If }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjh]hmetric}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhjhM hjubh is between }(hjhhhNhNubh)}(h :c:type:`mid`h]h)}(hj&h]hmid}(hj(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmiduh1hhjhM hjubh and }(hjhhhNhNubh)}(h :c:type:`low`h]h)}(hjIh]hlow}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjlowuh1hhjhM hjubh, the scheme is activated. If }(hjhhhNhNubh)}(h:c:type:`metric`h]h)}(hjlh]hmetric}(hjnhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmetricuh1hhjhM hjubh 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 refexplicitrefwarnjjjlowuh1hhjhM hjubh, the scheme is inactivated.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM hhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_stat (C struct) c.damos_stathNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damos_stath]j.)}(hstruct damos_stath](j4)}(hj7h]hstruct}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM'ubjF)}(h h]h }(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhhhjhM'ubjW)}(h damos_stath]j])}(hjh]h damos_stat}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjhhhjhM'ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhhhjhM'ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j'hjhM'hjhhubj)}(hhh]h)}(hStatistics on a given scheme.h]hStatistics on a given scheme.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM1hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM'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}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh:}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM5hj-ubj)}(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; };}hjNsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM7hj-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.hhM@hj-ubj#)}(hhh](j()}(hM``nr_tried`` Total number of regions that the scheme is tried to be applied. h](j.)}(h ``nr_tried``h]h)}(hj~h]hnr_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.hhM3hjxubjH)}(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&]uh1hhjhM3hjubah}(h]h ]h"]h$]h&]uh1jGhjxubeh}(h]h ]h"]h$]h&]uh1j'hjhM3hjuubj()}(hK``sz_tried`` Total size of regions that the scheme is tried to be applied. h](j.)}(h ``sz_tried``h]h)}(hjh]hsz_tried}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM4hjubjH)}(hhh]h)}(h=Total size of regions that the scheme is tried to be applied.h]h=Total size of regions that the scheme is tried to be applied.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM4hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM4hjuubj()}(hC``nr_applied`` Total number of regions that the scheme is applied. h](j.)}(h``nr_applied``h]h)}(hjh]h nr_applied}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM5hjubjH)}(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&]uh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM5hjuubj()}(hA``sz_applied`` Total size of regions that the scheme is applied. h](j.)}(h``sz_applied``h]h)}(hj)h]h sz_applied}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM6hj#ubjH)}(hhh]h)}(h1Total size of regions that the scheme is applied.h]h1Total size of regions that the scheme is applied.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hM6hj?ubah}(h]h ]h"]h$]h&]uh1jGhj#ubeh}(h]h ]h"]h$]h&]uh1j'hj>hM6hjuubj()}(hR``sz_ops_filter_passed`` Total bytes that passed ops layer-handled DAMOS filters. h](j.)}(h``sz_ops_filter_passed``h]h)}(hjbh]hsz_ops_filter_passed}(hjdhhhNhNubah}(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.hhM7hj\ubjH)}(hhh]h)}(h8Total bytes that passed ops layer-handled DAMOS filters.h]h8Total bytes that passed ops layer-handled DAMOS filters.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhM7hjxubah}(h]h ]h"]h$]h&]uh1jGhj\ubeh}(h]h ]h"]h$]h&]uh1j'hjwhM7hjuubj()}(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.hhM8hjubjH)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM9hjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]uh1j'hjhM8hjuubeh}(h]h ]h"]h$]h&]uh1j"hj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM<hhhhubh)}(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 (}(hjhhhNhNubh)}(h<:c:type:`struct damos_access_pattern `h]h)}(hjh]hstruct damos_access_pattern}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_access_patternuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM9hjubh ), quotas (}(hjhhhNhNubh)}(h*:c:type:`struct damos_quota `h]h)}(hj" h]hstruct damos_quota}(hj$ hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_quotauh1hhj hM9hjubh), watermarks (}(hjhhhNhNubh)}(h4:c:type:`struct damos_watermarks `h]h)}(hjE h]hstruct damos_watermarks}(hjG hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjC ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_watermarksuh1hhj hM9hjubh) and filters (}(hjhhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hjh h]hstruct damos_filter}(hjj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjf ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj hM9hjubhV) that handled on core logic can affect this. The core logic asks the operation set (}(hjhhhNhNubh)}(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 hM9hjubh$) to apply the action to the region.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hM9hhhhubh)}(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)}(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 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)}(hj!h]h DAMOS_PAGEOUT}(hj!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj DAMOS_PAGEOUTuh1hhj 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}(hjC!hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj?!hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMMubjF)}(h h]h }(hjQ!hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj?!hhhjP!hMMubjW)}(hdamos_filter_typeh]j])}(hj=!h]hdamos_filter_type}(hjc!hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj_!ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj?!hhhjP!hMMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj;!hhhjP!hMMubah}(h]j6!ah ](jjeh"]h$]h&]jj)jhuh1j'hjP!hMMhj8!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.hhMUhj!hhubah}(h]h ]h"]h$]h&]uh1jhj8!hhhjP!hMMubeh}(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.hhMYhj!ubj#)}(hhh](j()}(h,``DAMOS_FILTER_TYPE_ANON`` Anonymous pages. h](j.)}(h``DAMOS_FILTER_TYPE_ANON``h]h)}(hj!h]hDAMOS_FILTER_TYPE_ANON}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM\hj!ubjH)}(hhh]h)}(hAnonymous pages.h]hAnonymous pages.}(hj "hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hM\hj"ubah}(h]h ]h"]h$]h&]uh1jGhj!ubeh}(h]h ]h"]h$]h&]uh1j'hj"hM\hj!ubj()}(h+``DAMOS_FILTER_TYPE_ACTIVE`` Active pages. h](j.)}(h``DAMOS_FILTER_TYPE_ACTIVE``h]h)}(hj)"h]hDAMOS_FILTER_TYPE_ACTIVE}(hj+"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'"ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM_hj#"ubjH)}(hhh]h)}(h Active pages.h]h Active pages.}(hjB"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()}(h4``DAMOS_FILTER_TYPE_MEMCG`` Specific memcg's pages. h](j.)}(h``DAMOS_FILTER_TYPE_MEMCG``h]h)}(hjb"h]hDAMOS_FILTER_TYPE_MEMCG}(hjd"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`"ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMbhj\"ubjH)}(hhh]h)}(hSpecific memcg's pages.h]hSpecific memcg’s pages.}(hj{"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw"hMbhjx"ubah}(h]h ]h"]h$]h&]uh1jGhj\"ubeh}(h]h ]h"]h$]h&]uh1j'hjw"hMbhj!ubj()}(h5``DAMOS_FILTER_TYPE_YOUNG`` Recently accessed pages. h](j.)}(h``DAMOS_FILTER_TYPE_YOUNG``h]h)}(hj"h]hDAMOS_FILTER_TYPE_YOUNG}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMehj"ubjH)}(hhh]h)}(hRecently accessed pages.h]hRecently accessed pages.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMehj"ubah}(h]h ]h"]h$]h&]uh1jGhj"ubeh}(h]h ]h"]h$]h&]uh1j'hj"hMehj!ubj()}(h@``DAMOS_FILTER_TYPE_HUGEPAGE_SIZE`` Page is part of a hugepage. h](j.)}(h#``DAMOS_FILTER_TYPE_HUGEPAGE_SIZE``h]h)}(hj"h]hDAMOS_FILTER_TYPE_HUGEPAGE_SIZE}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhj"ubjH)}(hhh]h)}(hPage is part of a hugepage.h]hPage is part of a hugepage.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMhhj"ubah}(h]h ]h"]h$]h&]uh1jGhj"ubeh}(h]h ]h"]h$]h&]uh1j'hj"hMhhj!ubj()}(h/``DAMOS_FILTER_TYPE_UNMAPPED`` Unmapped pages. h](j.)}(h``DAMOS_FILTER_TYPE_UNMAPPED``h]h)}(hj #h]hDAMOS_FILTER_TYPE_UNMAPPED}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj #ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMkhj#ubjH)}(hhh]h)}(hUnmapped pages.h]hUnmapped pages.}(hj&#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"#hMkhj##ubah}(h]h ]h"]h$]h&]uh1jGhj#ubeh}(h]h ]h"]h$]h&]uh1j'hj"#hMkhj!ubj()}(h*``DAMOS_FILTER_TYPE_ADDR`` Address range. h](j.)}(h``DAMOS_FILTER_TYPE_ADDR``h]h)}(hjF#h]hDAMOS_FILTER_TYPE_ADDR}(hjH#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD#ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMnhj@#ubjH)}(hhh]h)}(hAddress range.h]hAddress range.}(hj_#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[#hMnhj\#ubah}(h]h ]h"]h$]h&]uh1jGhj@#ubeh}(h]h ]h"]h$]h&]uh1j'hj[#hMnhj!ubj()}(h<``DAMOS_FILTER_TYPE_TARGET`` Data Access Monitoring target. h](j.)}(h``DAMOS_FILTER_TYPE_TARGET``h]h)}(hj#h]hDAMOS_FILTER_TYPE_TARGET}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}#ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMqhjy#ubjH)}(hhh]h)}(hData Access Monitoring target.h]hData Access Monitoring target.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMqhj#ubah}(h]h ]h"]h$]h&]uh1jGhjy#ubeh}(h]h ]h"]h$]h&]uh1j'hj#hMqhj!ubj()}(h1``NR_DAMOS_FILTER_TYPES`` Number of filter types.h](j.)}(h``NR_DAMOS_FILTER_TYPES``h]h)}(hj#h]hNR_DAMOS_FILTER_TYPES}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMshj#ubjH)}(hhh]h)}(hNumber of filter types.h]hNumber of filter types.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMthj#ubah}(h]h ]h"]h$]h&]uh1jGhj#ubeh}(h]h ]h"]h$]h&]uh1j'hj#hMshj!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.hhMvhhhhubh)}(hX8The anon pages type and memcg type filters are handled by underlying :c:type:`struct damon_operations ` as a part of scheme action trying, and therefore accounted as 'tried'. In contrast, other types are handled by core layer before trying of the action and therefore not accounted as 'tried'.h](hEThe anon pages type and memcg type filters are handled by underlying }(hj$hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj$h]hstruct damon_operations}(hj$hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM_hj$ubh as a part of scheme action trying, and therefore accounted as ‘tried’. In contrast, other types are handled by core layer before trying of the action and therefore not accounted as ‘tried’.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj8$hM_hhhhubh)}(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 }(hjC$hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjM$h]hstruct damon_operations}(hjO$hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjK$ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMdhjC$ubh depend on the running }(hjC$hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjq$h]hstruct damon_operations}(hjs$hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjo$ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhjj$hMdhjC$ubh. }(hjC$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_PADDRuh1hhjj$hMdhjC$ubh= supports both anon pages type and memcg type filters, while }(hjC$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_VADDRuh1hhjj$hMdhjC$ubh and }(hjC$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_FVADDRuh1hhjj$hMdhjC$ubh& don’t support any of the two types.}(hjC$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjj$hMdhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_filter (C struct)c.damos_filterhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(h damos_filterh]j.)}(hstruct damos_filterh](j4)}(hj7h]hstruct}(hj%hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj%hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMmubjF)}(h h]h }(hj(%hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj%hhhj'%hMmubjW)}(h damos_filterh]j])}(hj%h]h damos_filter}(hj:%hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj6%ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj%hhhj'%hMmubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj%hhhj'%hMmubah}(h]j %ah ](jjeh"]h$]h&]jj)jhuh1j'hj'%hMmhj%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.hhMxhjY%hhubah}(h]h ]h"]h$]h&]uh1jhj%hhhj'%hMmubeh}(h]h ](jstructeh"]h$]h&]jjjjt%jjt%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.hhM|hjx%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.hhM~hjx%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.hhMhjx%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.hhMzhj%ubjH)}(hhh]h)}(hType of the target memory.h]hType of the target memory.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMzhj%ubah}(h]h ]h"]h$]h&]uh1jGhj%ubeh}(h]h ]h"]h$]h&]uh1j'hj%hMzhj%ubj()}(h;``matching`` Whether this is for **type**-matching memory. h](j.)}(h ``matching``h]h)}(hj&h]hmatching}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM{hj%ubjH)}(hhh]h)}(h-Whether this is for **type**-matching memory.h](hWhether this is for }(hj&hhhNhNubj)}(h**type**h]htype}(hj#&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh-matching memory.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj&hM{hj&ubah}(h]h ]h"]h$]h&]uh1jGhj%ubeh}(h]h ]h"]h$]h&]uh1j'hj&hM{hj%ubj()}(hA``allow`` Whether to include or exclude the **matching** memory. h](j.)}(h ``allow``h]h)}(hjM&h]hallow}(hjO&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK&ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM|hjG&ubjH)}(hhh]h)}(h6Whether to include or exclude the **matching** memory.h](h"Whether to include or exclude the }(hjf&hhhNhNubj)}(h **matching**h]hmatching}(hjn&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf&ubh memory.}(hjf&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjb&hM|hjc&ubah}(h]h ]h"]h$]h&]uh1jGhjG&ubeh}(h]h ]h"]h$]h&]uh1j'hjb&hM|hj%ubj()}(h``{unnamed_union}`` anonymous h](j.)}(h``{unnamed_union}``h]h)}(hj&h]h{unnamed_union}}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj&ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKhj&ubah}(h]h ]h"]h$]h&]uh1jGhj&ubeh}(h]h ]h"]h$]h&]uh1j'hj&hKhj%ubj()}(hI``memcg_id`` Memcg id of the question if **type** is DAMOS_FILTER_MEMCG. h](j.)}(h ``memcg_id``h]h)}(hj&h]hmemcg_id}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM}hj&ubjH)}(hhh]h)}(h;Memcg id of the question if **type** is DAMOS_FILTER_MEMCG.h](hMemcg id of the question if }(hj&hhhNhNubj)}(h**type**h]htype}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh is DAMOS_FILTER_MEMCG.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj&hM}hj&ubah}(h]h ]h"]h$]h&]uh1jGhj&ubeh}(h]h ]h"]h$]h&]uh1j'hj&hM}hj%ubj()}(hD``addr_range`` Address range if **type** is DAMOS_FILTER_TYPE_ADDR. h](j.)}(h``addr_range``h]h)}(hj'h]h addr_range}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM~hj'ubjH)}(hhh]h)}(h4Address range if **type** is DAMOS_FILTER_TYPE_ADDR.h](hAddress range if }(hj5'hhhNhNubj)}(h**type**h]htype}(hj='hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5'ubh is DAMOS_FILTER_TYPE_ADDR.}(hj5'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj1'hM~hj2'ubah}(h]h ]h"]h$]h&]uh1jGhj'ubeh}(h]h ]h"]h$]h&]uh1j'hj1'hM~hj%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)}(hjg'h]h target_idx}(hji'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhje'ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhja'ubjH)}(hhh]h)}(hIndex of the :c:type:`struct damon_target ` of :c:type:`damon_ctx->adaptive_targets ` if **type** is DAMOS_FILTER_TYPE_TARGET.h](h Index of the }(hj'hhhNhNubh)}(h,:c:type:`struct damon_target `h]h)}(hj'h]hstruct damon_target}(hj'hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_targetuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj'ubh of }(hj'hhhNhNubh)}(h1:c:type:`damon_ctx->adaptive_targets `h]h)}(hj'h]hdamon_ctx->adaptive_targets}(hj'hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhj'hMhj'ubh if }(hj'hhhNhNubj)}(h**type**h]htype}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh is DAMOS_FILTER_TYPE_TARGET.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj'hMhj}'ubah}(h]h ]h"]h$]h&]uh1jGhja'ubeh}(h]h ]h"]h$]h&]uh1j'hj|'hMhj%ubj()}(hH``sz_range`` Size range if **type** is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE. h](j.)}(h ``sz_range``h]h)}(hj'h]hsz_range}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj'ubjH)}(hhh]h)}(h:Size range if **type** is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.h](hSize range if }(hj(hhhNhNubj)}(h**type**h]htype}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh$ is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jGhj'ubeh}(h]h ]h"]h$]h&]uh1j'hj(hMhj%ubj()}(h ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hjD(h]hlist}(hjF(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjB(ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj>(ubjH)}(hhh]h)}(hList head for siblings.h]hList head for siblings.}(hj](hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjZ(ubah}(h]h ]h"]h$]h&]uh1jGhj>(ubeh}(h]h ]h"]h$]h&]uh1j'hjY(hMhj%ubeh}(h]h ]h"]h$]h&]uh1j"hjx%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj(h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hX|Before applying the :c:type:`damos->action ` to a memory region, DAMOS checks if each byte of the region matches to this given condition and avoid applying the action if so. Support of each filter type depends on the running :c:type:`struct damon_operations ` and the type. Refer to :c:type:`enum damos_filter_type ` for more details.h](hBefore applying the }(hj(hhhNhNubh)}(h:c:type:`damos->action `h]h)}(hj(h]h damos->action}(hj(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj(ubh to a memory region, DAMOS checks if each byte of the region matches to this given condition and avoid applying the action if so. Support of each filter type depends on the running }(hj(hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj(h]hstruct damon_operations}(hj(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj(hMhj(ubh and the type. Refer to }(hj(hhhNhNubh)}(h4:c:type:`enum damos_filter_type `h]h)}(hj(h]henum damos_filter_type}(hj(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamos_filter_typeuh1hhj(hMhj(ubh for more details.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj(hMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_walk_control (C struct)c.damos_walk_controlhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_walk_controlh]j.)}(hstruct damos_walk_controlh](j4)}(hj7h]hstruct}(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}(hjN)hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjJ)ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj*)hhhj;)hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj&)hhhj;)hMubah}(h]j!)ah ](jjeh"]h$]h&]jj)jhuh1j'hj;)hMhj#)hhubj)}(hhh]h)}(hControl damos_walk().h]hControl damos_walk().}(hjp)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjm)hhubah}(h]h ]h"]h$]h&]uh1jhj#)hhhj;)hMubeh}(h]h ](jstructeh"]h$]h&]jjjj)jj)jjjuh1j"hhhhhj!hNubj)}(hXa**Definition**:: struct damos_walk_control { void (*walk_fn)(void *data, struct damon_ctx *ctx, struct damon_target *t, struct damon_region *r, struct damos *s, unsigned long sz_filter_passed); void *data; }; **Members** ``walk_fn`` Function to be called back for each region. ``data`` Data that will be passed to walk functions.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh:}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj)ubj)}(hstruct damos_walk_control { void (*walk_fn)(void *data, struct damon_ctx *ctx, struct damon_target *t, struct damon_region *r, struct damos *s, unsigned long sz_filter_passed); void *data; };h]hstruct damos_walk_control { void (*walk_fn)(void *data, struct damon_ctx *ctx, struct damon_target *t, struct damon_region *r, struct damos *s, unsigned long sz_filter_passed); void *data; };}hj)sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj)ubh)}(h **Members**h]j)}(hj)h]hMembers}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj)ubj#)}(hhh](j()}(h8``walk_fn`` Function to be called back for each region. h](j.)}(h ``walk_fn``h]h)}(hj)h]hwalk_fn}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj)ubjH)}(hhh]h)}(h+Function to be called back for each region.h]h+Function to be called back for each region.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hMhj)ubah}(h]h ]h"]h$]h&]uh1jGhj)ubeh}(h]h ]h"]h$]h&]uh1j'hj)hMhj)ubj()}(h4``data`` Data that will be passed to walk functions.h](j.)}(h``data``h]h)}(hj*h]hdata}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*ubjH)}(hhh]h)}(h+Data that will be passed to walk functions.h]h+Data that will be passed to walk functions.}(hj/*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,*ubah}(h]h ]h"]h$]h&]uh1jGhj*ubeh}(h]h ]h"]h$]h&]uh1j'hj+*hMhj)ubeh}(h]h ]h"]h$]h&]uh1j"hj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjY*h]h Description}(hj[*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjW*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.}(hjo*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_access_pattern (C struct)c.damos_access_patternhNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_access_patternh]j.)}(hstruct damos_access_patternh](j4)}(hj7h]hstruct}(hj*hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj*hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj*hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj*hhhj*hMubjW)}(hdamos_access_patternh]j])}(hj*h]hdamos_access_pattern}(hj*hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj*ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj*hhhj*hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj*hhhj*hMubah}(h]j*ah ](jjeh"]h$]h&]jj)jhuh1j'hj*hMhj*hhubj)}(hhh]h)}(h*Target access pattern of the given scheme.h]h*Target access pattern of the given scheme.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*hhubah}(h]h ]h"]h$]h&]uh1jhj*hhhj*hMubeh}(h]h ](jstructeh"]h$]h&]jjjj*jj*jjjuh1j"hhhhhj!hNubj)}(hXs**Definition**:: struct damos_access_pattern { unsigned long min_sz_region; unsigned long max_sz_region; unsigned int min_nr_accesses; unsigned int max_nr_accesses; unsigned int min_age_region; unsigned int max_age_region; }; **Members** ``min_sz_region`` Minimum size of target regions. ``max_sz_region`` Maximum size of target regions. ``min_nr_accesses`` Minimum ``->nr_accesses`` of target regions. ``max_nr_accesses`` Maximum ``->nr_accesses`` of target regions. ``min_age_region`` Minimum age of target regions. ``max_age_region`` Maximum age of target regions.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh:}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*ubj)}(hstruct damos_access_pattern { unsigned long min_sz_region; unsigned long max_sz_region; unsigned int min_nr_accesses; unsigned int max_nr_accesses; unsigned int min_age_region; unsigned int max_age_region; };h]hstruct damos_access_pattern { unsigned long min_sz_region; unsigned long max_sz_region; unsigned int min_nr_accesses; unsigned int max_nr_accesses; unsigned int min_age_region; unsigned int max_age_region; };}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()}(h2``min_sz_region`` Minimum size of target regions. h](j.)}(h``min_sz_region``h]h)}(hjF+h]h min_sz_region}(hjH+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD+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.hhMhjy+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&]uh1jGhjy+ubeh}(h]h ]h"]h$]h&]uh1j'hj+hMhj=+ubj()}(hA``min_nr_accesses`` Minimum ``->nr_accesses`` of target regions. h](j.)}(h``min_nr_accesses``h]h)}(hj+h]hmin_nr_accesses}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj+ubjH)}(hhh]h)}(h,Minimum ``->nr_accesses`` of target regions.h](hMinimum }(hj+hhhNhNubh)}(h``->nr_accesses``h]h ->nr_accesses}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+ubh of target regions.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jGhj+ubeh}(h]h ]h"]h$]h&]uh1j'hj+hMhj=+ubj()}(hA``max_nr_accesses`` Maximum ``->nr_accesses`` of target regions. h](j.)}(h``max_nr_accesses``h]h)}(hj,h]hmax_nr_accesses}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj+ubjH)}(hhh]h)}(h,Maximum ``->nr_accesses`` of target regions.h](hMaximum }(hj,hhhNhNubh)}(h``->nr_accesses``h]h ->nr_accesses}(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()}(h2``min_age_region`` Minimum age of target regions. h](j.)}(h``min_age_region``h]h)}(hjN,h]hmin_age_region}(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.hhMhjH,ubjH)}(hhh]h)}(hMinimum age of target regions.h]hMinimum age of target regions.}(hjg,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc,hMhjd,ubah}(h]h ]h"]h$]h&]uh1jGhjH,ubeh}(h]h ]h"]h$]h&]uh1j'hjc,hMhj=+ubj()}(h1``max_age_region`` Maximum age of target regions.h](j.)}(h``max_age_region``h]h)}(hj,h]hmax_age_region}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,ubjH)}(hhh]h)}(hMaximum age of target regions.h]hMaximum age of target regions.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj,ubah}(h]h ]h"]h$]h&]uh1jGhj,ubeh}(h]h ]h"]h$]h&]uh1j'hj,hMhj=+ubeh}(h]h ]h"]h$]h&]uh1j"hj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_migrate_dests (C struct)c.damos_migrate_destshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamos_migrate_destsh]j.)}(hstruct damos_migrate_destsh](j4)}(hj7h]hstruct}(hj,hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj,hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj,hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj,hhhj,hMubjW)}(hdamos_migrate_destsh]j])}(hj,h]hdamos_migrate_dests}(hj-hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj,ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj,hhhj,hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj,hhhj,hMubah}(h]j,ah ](jjeh"]h$]h&]jj)jhuh1j'hj,hMhj,hhubj)}(hhh]h)}(h.Migration destination nodes and their weights.h]h.Migration destination nodes and their weights.}(hj#-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj -hhubah}(h]h ]h"]h$]h&]uh1jhj,hhhj,hMubeh}(h]h ](jstructeh"]h$]h&]jjjj;-jj;-jjjuh1j"hhhhhj!hNubj)}(hXa**Definition**:: struct damos_migrate_dests { unsigned int *node_id_arr; unsigned int *weight_arr; size_t nr_dests; }; **Members** ``node_id_arr`` Array of migration destination node ids. ``weight_arr`` Array of migration weights for **node_id_arr**. ``nr_dests`` Length of the **node_id_arr** and **weight_arr** arrays.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjG-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC-ubh:}(hjC-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj?-ubj)}(hqstruct damos_migrate_dests { unsigned int *node_id_arr; unsigned int *weight_arr; size_t nr_dests; };h]hqstruct damos_migrate_dests { unsigned int *node_id_arr; unsigned int *weight_arr; size_t nr_dests; };}hj`-sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj?-ubh)}(h **Members**h]j)}(hjq-h]hMembers}(hjs-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo-ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj?-ubj#)}(hhh](j()}(h9``node_id_arr`` Array of migration destination node ids. h](j.)}(h``node_id_arr``h]h)}(hj-h]h node_id_arr}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj-ubjH)}(hhh]h)}(h(Array of migration destination node ids.h]h(Array of migration destination node ids.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hMhj-ubah}(h]h ]h"]h$]h&]uh1jGhj-ubeh}(h]h ]h"]h$]h&]uh1j'hj-hMhj-ubj()}(h?``weight_arr`` Array of migration weights for **node_id_arr**. h](j.)}(h``weight_arr``h]h)}(hj-h]h weight_arr}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj-ubjH)}(hhh]h)}(h/Array of migration weights for **node_id_arr**.h](hArray of migration weights for }(hj-hhhNhNubj)}(h**node_id_arr**h]h node_id_arr}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj-hMhj-ubah}(h]h ]h"]h$]h&]uh1jGhj-ubeh}(h]h ]h"]h$]h&]uh1j'hj-hMhj-ubj()}(hE``nr_dests`` Length of the **node_id_arr** and **weight_arr** arrays.h](j.)}(h ``nr_dests``h]h)}(hj.h]hnr_dests}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj.ubjH)}(hhh]h)}(h8Length of the **node_id_arr** and **weight_arr** arrays.h](hLength of the }(hj-.hhhNhNubj)}(h**node_id_arr**h]h node_id_arr}(hj5.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-.ubh and }(hj-.hhhNhNubj)}(h**weight_arr**h]h weight_arr}(hjG.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-.ubh arrays.}(hj-.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj*.ubah}(h]h ]h"]h$]h&]uh1jGhj.ubeh}(h]h ]h"]h$]h&]uh1j'hj).hMhj-ubeh}(h]h ]h"]h$]h&]uh1j"hj?-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj{.h]h Description}(hj}.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjy.ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(h**node_id_arr** is an array of the ids of migration destination nodes. **weight_arr** is an array of the weights for those. The weights in **weight_arr** are for nodes in **node_id_arr** of same array index.h](j)}(h**node_id_arr**h]h node_id_arr}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh8 is an array of the ids of migration destination nodes. }(hj.hhhNhNubj)}(h**weight_arr**h]h weight_arr}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh7 is an array of the weights for those. The weights in }(hj.hhhNhNubj)}(h**weight_arr**h]h weight_arr}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh are for nodes in }(hj.hhhNhNubj)}(h**node_id_arr**h]h node_id_arr}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh of same array index.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos (C struct)c.damoshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamosh]j.)}(h struct damosh](j4)}(hj7h]hstruct}(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)}(hdamosh]j])}(hj.h]hdamos}(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;Represents a Data Access Monitoring-based Operation Scheme.h]h;Represents a Data Access Monitoring-based Operation Scheme.}(hj?/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj` 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}(hjc/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_/ubh:}(hj_/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj[/ubj)}(hXstruct damos { struct damos_access_pattern pattern; enum damos_action action; unsigned long apply_interval_us; struct damos_quota quota; struct damos_watermarks wmarks; union { struct { int target_nid; struct damos_migrate_dests migrate_dests; }; }; struct list_head filters; struct list_head ops_filters; void *last_applied; struct damos_stat stat; struct list_head list; };h]hXstruct damos { struct damos_access_pattern pattern; enum damos_action action; unsigned long apply_interval_us; struct damos_quota quota; struct damos_watermarks wmarks; union { struct { int target_nid; struct damos_migrate_dests migrate_dests; }; }; struct list_head 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()}(hG``action`` :c:type:`damos_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:`damos_action` to be applied to the target regions.h](h)}(h:c:type:`damos_action`h]h)}(hj0h]h damos_action}(hj0hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_actionuh1hhj/hMhj/ubh% to be applied to the 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()}(h@``apply_interval_us`` The time between applying the **action**. h](j.)}(h``apply_interval_us``h]h)}(hj=0h]happly_interval_us}(hj?0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;0ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj70ubjH)}(hhh]h)}(h)The time between applying the **action**.h](hThe time between applying the }(hjV0hhhNhNubj)}(h **action**h]haction}(hj^0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjV0ubh.}(hjV0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjR0hMhjS0ubah}(h]h ]h"]h$]h&]uh1jGhj70ubeh}(h]h ]h"]h$]h&]uh1j'hjR0hMhj/ubj()}(h5``quota`` Control the aggressiveness of this scheme. h](j.)}(h ``quota``h]h)}(hj0h]hquota}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj0ubjH)}(hhh]h)}(h*Control the aggressiveness of this scheme.h]h*Control the aggressiveness of this scheme.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hj0hMhj/ubj()}(hC``wmarks`` Watermarks for automated (in)activation of this scheme. h](j.)}(h ``wmarks``h]h)}(hj0h]hwmarks}(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)}(h7Watermarks for automated (in)activation of this scheme.h]h7Watermarks for automated (in)activation of this scheme.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hj0hMhj/ubj()}(h``{unnamed_union}`` anonymous h](j.)}(h``{unnamed_union}``h]h)}(hj0h]h{unnamed_union}}(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.hhKhj0ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hKhj1ubah}(h]h ]h"]h$]h&]uh1jGhj0ubeh}(h]h ]h"]h$]h&]uh1j'hj1hKhj/ubj()}(h``{unnamed_struct}`` anonymous h](j.)}(h``{unnamed_struct}``h]h)}(hj31h]h{unnamed_struct}}(hj51hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj11ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhKhj-1ubjH)}(hhh]h)}(h anonymoush]h anonymous}(hjL1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjH1hKhjI1ubah}(h]h ]h"]h$]h&]uh1jGhj-1ubeh}(h]h ]h"]h$]h&]uh1j'hjH1hKhj/ubj()}(hG``target_nid`` Destination node if **action** is "migrate_{hot,cold}". h](j.)}(h``target_nid``h]h)}(hjl1h]h target_nid}(hjn1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjj1ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjf1ubjH)}(hhh]h)}(h7Destination node if **action** is "migrate_{hot,cold}".h](hDestination node if }(hj1hhhNhNubj)}(h **action**h]haction}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh is “migrate_{hot,cold}”.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jGhjf1ubeh}(h]h ]h"]h$]h&]uh1j'hj1hMhj/ubj()}(hK``migrate_dests`` Destination nodes if **action** is "migrate_{hot,cold}". h](j.)}(h``migrate_dests``h]h)}(hj1h]h migrate_dests}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1ubjH)}(hhh]h)}(h8Destination nodes if **action** is "migrate_{hot,cold}".h](hDestination nodes if }(hj1hhhNhNubj)}(h **action**h]haction}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh is “migrate_{hot,cold}”.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jGhj1ubeh}(h]h ]h"]h$]h&]uh1j'hj1hMhj/ubj()}(ha``filters`` Additional set of :c:type:`struct damos_filter ` for :c:type:`action`. h](j.)}(h ``filters``h]h)}(hj2h]hfilters}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1ubjH)}(hhh]h)}(hTAdditional set of :c:type:`struct damos_filter ` for :c:type:`action`.h](hAdditional set of }(hj2hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hj%2h]hstruct damos_filter}(hj'2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj#2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj2hMhj2ubh for }(hj2hhhNhNubh)}(h:c:type:`action`h]h)}(hjH2h]haction}(hjJ2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjF2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj2hMhj2ubh.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jGhj1ubeh}(h]h ]h"]h$]h&]uh1j'hj2hMhj/ubj()}(h^``ops_filters`` ops layer handling :c:type:`struct damos_filter ` objects list. h](j.)}(h``ops_filters``h]h)}(hj2h]h ops_filters}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj{2ubjH)}(hhh]h)}(hMops layer handling :c:type:`struct damos_filter ` objects list.h](hops layer handling }(hj2hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hj2h]hstruct damos_filter}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhj2hMhj2ubh objects list.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jGhj{2ubeh}(h]h ]h"]h$]h&]uh1j'hj2hMhj/ubj()}(h>``last_applied`` Last **action** applied ops-managing entity. h](j.)}(h``last_applied``h]h)}(hj2h]h last_applied}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj2ubjH)}(hhh]h)}(h,Last **action** applied ops-managing entity.h](hLast }(hj2hhhNhNubj)}(h **action**h]haction}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh applied ops-managing entity.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jGhj2ubeh}(h]h ]h"]h$]h&]uh1j'hj2hMhj/ubj()}(h$``stat`` Statistics of this scheme. h](j.)}(h``stat``h]h)}(hj(3h]hstat}(hj*3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&3ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj"3ubjH)}(hhh]h)}(hStatistics of this scheme.h]hStatistics of this scheme.}(hjA3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=3hMhj>3ubah}(h]h ]h"]h$]h&]uh1jGhj"3ubeh}(h]h ]h"]h$]h&]uh1j'hj=3hMhj/ubj()}(h ``list`` List head for siblings.h](j.)}(h``list``h]h)}(hja3h]hlist}(hjc3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_3ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj[3ubjH)}(hhh]h)}(hList head for siblings.h]hList head for siblings.}(hjz3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjw3ubah}(h]h ]h"]h$]h&]uh1jGhj[3ubeh}(h]h ]h"]h$]h&]uh1j'hjv3hMhj/ubeh}(h]h ]h"]h$]h&]uh1j"hj[/ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hj3h]h Description}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(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 }(hj3hhhNhNubj)}(h**apply_interval_us**h]happly_interval_us}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh', DAMON finds regions which fit in the }(hj3hhhNhNubh)}(h:c:type:`pattern`h]h)}(hj3h]hpattern}(hj3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjpatternuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj3ubh and applies }(hj3hhhNhNubh)}(h:c:type:`action`h]h)}(hj3h]haction}(hj3hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj3hMhj3ubhH to those. To avoid consuming too much CPU time or IO resources for the }(hj3hhhNhNubh)}(h:c:type:`action`h]h)}(hj4h]haction}(hj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj3hMhj3ubh, }(hj3hhhNhNubh)}(h:c:type:`quota`h]h)}(hj@4h]hquota}(hjB4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj>4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjquotauh1hhj3hMhj3ubh is used.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj3hMhhhhubh)}(heIf **apply_interval_us** is zero, :c:type:`damon_attrs->aggr_interval ` is used instead.h](hIf }(hjg4hhhNhNubj)}(h**apply_interval_us**h]happly_interval_us}(hjo4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjg4ubh is zero, }(hjg4hhhNhNubh)}(h2:c:type:`damon_attrs->aggr_interval `h]h)}(hj4h]hdamon_attrs->aggr_interval}(hj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjg4ubh is used instead.}(hjg4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj4hMhhhhubh)}(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 }(hj4hhhNhNubh)}(h:c:type:`wmarks`h]h)}(hj4h]hwmarks}(hj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjwmarksuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj4ubh. If all schemes that registered to the monitoring context are inactive, DAMON stops monitoring either, and just repeatedly checks the watermarks.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj4hMhhhhubh)}(h**migrate_dests** specifies multiple migration target nodes with different weights for migrate_hot or migrate_cold actions. **target_nid** is ignored if this is set.h](j)}(h**migrate_dests**h]h migrate_dests}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubhl specifies multiple migration target nodes with different weights for migrate_hot or migrate_cold actions. }(hj4hhhNhNubj)}(h**target_nid**h]h target_nid}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh is ignored if this is set.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(h**target_nid** is used to set the migration target node for migrate_hot or migrate_cold actions, and **migrate_dests** is unset.h](j)}(h**target_nid**h]h target_nid}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 5ubhW is used to set the migration target node for migrate_hot or migrate_cold actions, and }(hj 5hhhNhNubj)}(h**migrate_dests**h]h migrate_dests}(hj"5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 5ubh is unset.}(hj 5hhhNhNubeh}(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 }(hj;5hhhNhNubh)}(h:c:type:`action`h]h)}(hjE5h]haction}(hjG5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjC5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj;5ubh to a memory region, }(hj;5hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hji5h]hstruct damon_operations}(hjk5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjg5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhjb5hMhj;5ubh9 implementation could check pages of the region and skip }(hj;5hhhNhNubh)}(h:c:type:`action`h]h)}(hj5h]haction}(hj5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhjb5hMhj;5ubh to respect }(hj;5hhhNhNubh)}(h:c:type:`filters`h]h)}(hj5h]hfilters}(hj5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjfiltersuh1hhjb5hMhj;5ubeh}(h]h ]h"]h$]h&]uh1hhjb5hMhhhhubh)}(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 }(hj5hhhNhNubj)}(h **action**h]haction}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh* can be applied depends on the underlying }(hj5hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj5h]hstruct damon_operations}(hj5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj5ubhD. Since it may not be aligned with the core layer abstract, namely }(hj5hhhNhNubh)}(h,:c:type:`struct damon_region `h]h)}(hj6h]hstruct damon_region}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhj 6hMhj5ubh, }(hj5hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj56h]hstruct damon_operations}(hj76hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj36ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj 6hMhj5ubh could apply }(hj5hhhNhNubj)}(h **action**h]haction}(hjV6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubhJ to same entity multiple times. Large folios that underlying on multiple }(hj5hhhNhNubh)}(h:c:type:`struct damon `h]h)}(hjj6h]h struct damon}(hjl6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjh6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamonuh1hhj 6hMhj5ubh- region objects could be such examples. The }(hj5hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj6h]hstruct damon_operations}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhj 6hMhj5ubh can use }(hj5hhhNhNubj)}(h**last_applied**h]h last_applied}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh) to avoid that. DAMOS core logic unsets }(hj5hhhNhNubj)}(h**last_applied**h]h last_applied}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh? when each regions walking for applying the scheme is finished.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj 6hMhhhhubh)}(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 }(hj6hhhNhNubh)}(h:c:type:`action`h]h)}(hj6h]haction}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj6ubh to each region, }(hj6hhhNhNubh)}(h:c:type:`stat_count`h]h)}(hj7h]h stat_count}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj stat_countuh1hhj6hMhj6ubh and }(hj6hhhNhNubh)}(h:c:type:`stat_sz`h]h)}(hj)7h]hstat_sz}(hj+7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj'7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjstat_szuh1hhj6hMhj6ubhP is updated to reflect the number of regions and total size of regions that the }(hj6hhhNhNubh)}(h:c:type:`action`h]h)}(hjL7h]haction}(hjN7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjJ7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjactionuh1hhj6hMhj6ubh is applied.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj6hMhhhhubj)}(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}(hj7hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj7hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj7hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj7hhhj7hMubjW)}(h damon_ops_idh]j])}(hj7h]h damon_ops_id}(hj7hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj7ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj7hhhj7hMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj7hhhj7hMubah}(h]j7ah ](jjeh"]h$]h&]jj)jhuh1j'hj7hMhj7hhubj)}(hhh]h)}(h8Identifier for each monitoring operations implementationh]h8Identifier for each monitoring operations implementation}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM)hj7hhubah}(h]h ]h"]h$]h&]uh1jhj7hhhj7hMubeh}(h]h ](jenumeh"]h$]h&]jjjj7jj7jjjuh1j"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)}(hj7h]h Constants}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM-hj7ubj#)}(hhh](j()}(hE``DAMON_OPS_VADDR`` Monitoring operations for virtual address spaces h](j.)}(h``DAMON_OPS_VADDR``h]h)}(hj8h]hDAMON_OPS_VADDR}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 8ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM0hj 8ubjH)}(hhh]h)}(h0Monitoring operations for virtual address spacesh]h0Monitoring operations for virtual address spaces}(hj(8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$8hM0hj%8ubah}(h]h ]h"]h$]h&]uh1jGhj 8ubeh}(h]h ]h"]h$]h&]uh1j'hj$8hM0hj8ubj()}(h[``DAMON_OPS_FVADDR`` Monitoring operations for only fixed ranges of virtual address spaces h](j.)}(h``DAMON_OPS_FVADDR``h]h)}(hjH8h]hDAMON_OPS_FVADDR}(hjJ8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF8ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM4hjB8ubjH)}(hhh]h)}(hEMonitoring operations for only fixed ranges of virtual address spacesh]hEMonitoring operations for only fixed ranges of virtual address spaces}(hja8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM3hj^8ubah}(h]h ]h"]h$]h&]uh1jGhjB8ubeh}(h]h ]h"]h$]h&]uh1j'hj]8hM4hj8ubj()}(hI``DAMON_OPS_PADDR`` Monitoring operations for the physical address space h](j.)}(h``DAMON_OPS_PADDR``h]h)}(hj8h]hDAMON_OPS_PADDR}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM7hj|8ubjH)}(hhh]h)}(h4Monitoring operations for the physical address spaceh]h4Monitoring operations for the physical address space}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hM7hj8ubah}(h]h ]h"]h$]h&]uh1jGhj|8ubeh}(h]h ]h"]h$]h&]uh1j'hj8hM7hj8ubj()}(h@``NR_DAMON_OPS`` Number of monitoring operations implementationsh](j.)}(h``NR_DAMON_OPS``h]h)}(hj8h]h NR_DAMON_OPS}(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.hhM9hj8ubjH)}(hhh]h)}(h/Number of monitoring operations implementationsh]h/Number of monitoring operations implementations}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM:hj8ubah}(h]h ]h"]h$]h&]uh1jGhj8ubeh}(h]h ]h"]h$]h&]uh1j'hj8hM9hj8ubeh}(h]h ]h"]h$]h&]uh1j"hj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_operations (C struct)c.damon_operationshNtauh1jhhhhhj!hNubj#)}(hhh](j()}(hdamon_operationsh]j.)}(hstruct damon_operationsh](j4)}(hj7h]hstruct}(hj9hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj9hhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM?ubjF)}(h h]h }(hj#9hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj9hhhj"9hM?ubjW)}(hdamon_operationsh]j])}(hj9h]hdamon_operations}(hj59hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj19ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj9hhhj"9hM?ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj 9hhhj"9hM?ubah}(h]j9ah ](jjeh"]h$]h&]jj)jhuh1j'hj"9hM?hj 9hhubj)}(hhh]h)}(h*Monitoring operations for given use cases.h]h*Monitoring operations for given use cases.}(hjW9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM9hjT9hhubah}(h]h ]h"]h$]h&]uh1jhj 9hhhj"9hM?ubeh}(h]h ](jstructeh"]h$]h&]jjjjo9jjo9jjjuh1j"hhhhhj!hNubj)}(hX;**Definition**:: struct damon_operations { enum damon_ops_id id; void (*init)(struct damon_ctx *context); void (*update)(struct damon_ctx *context); void (*prepare_access_checks)(struct damon_ctx *context); unsigned int (*check_accesses)(struct damon_ctx *context); int (*get_scheme_score)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme); unsigned long (*apply_scheme)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme, unsigned long *sz_filter_passed); bool (*target_valid)(struct damon_target *t); void (*cleanup_target)(struct damon_target *t); void (*cleanup)(struct damon_ctx *context); }; **Members** ``id`` Identifier of this operations set. ``init`` Initialize operations-related data structures. ``update`` Update operations-related data structures. ``prepare_access_checks`` Prepare next access check of target regions. ``check_accesses`` Check the accesses to target regions. ``get_scheme_score`` Get the score of a region for a scheme. ``apply_scheme`` Apply a DAMON-based operation scheme. ``target_valid`` Determine if the target is valid. ``cleanup_target`` Clean up each target before deallocation. ``cleanup`` Clean up the context.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj{9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw9ubh:}(hjw9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM=hjs9ubj)}(hXstruct damon_operations { enum damon_ops_id id; void (*init)(struct damon_ctx *context); void (*update)(struct damon_ctx *context); void (*prepare_access_checks)(struct damon_ctx *context); unsigned int (*check_accesses)(struct damon_ctx *context); int (*get_scheme_score)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme); unsigned long (*apply_scheme)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme, unsigned long *sz_filter_passed); bool (*target_valid)(struct damon_target *t); void (*cleanup_target)(struct damon_target *t); void (*cleanup)(struct damon_ctx *context); };h]hXstruct damon_operations { enum damon_ops_id id; void (*init)(struct damon_ctx *context); void (*update)(struct damon_ctx *context); void (*prepare_access_checks)(struct damon_ctx *context); unsigned int (*check_accesses)(struct damon_ctx *context); int (*get_scheme_score)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme); unsigned long (*apply_scheme)(struct damon_ctx *context, struct damon_target *t, struct damon_region *r, struct damos *scheme, unsigned long *sz_filter_passed); bool (*target_valid)(struct damon_target *t); void (*cleanup_target)(struct damon_target *t); void (*cleanup)(struct damon_ctx *context); };}hj9sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM?hjs9ubh)}(h **Members**h]j)}(hj9h]hMembers}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMLhjs9ubj#)}(hhh](j()}(h*``id`` Identifier of this operations set. h](j.)}(h``id``h]h)}(hj9h]hid}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM<hj9ubjH)}(hhh]h)}(h"Identifier of this operations set.h]h"Identifier of this operations set.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hM<hj9ubah}(h]h ]h"]h$]h&]uh1jGhj9ubeh}(h]h ]h"]h$]h&]uh1j'hj9hM<hj9ubj()}(h8``init`` Initialize operations-related data structures. h](j.)}(h``init``h]h)}(hj9h]hinit}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM=hj9ubjH)}(hhh]h)}(h.Initialize operations-related data structures.h]h.Initialize operations-related data structures.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hM=hj:ubah}(h]h ]h"]h$]h&]uh1jGhj9ubeh}(h]h ]h"]h$]h&]uh1j'hj:hM=hj9ubj()}(h6``update`` Update operations-related data structures. h](j.)}(h ``update``h]h)}(hj6:h]hupdate}(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.hhM>hj0:ubjH)}(hhh]h)}(h*Update operations-related data structures.h]h*Update operations-related data structures.}(hjO:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK:hM>hjL:ubah}(h]h ]h"]h$]h&]uh1jGhj0:ubeh}(h]h ]h"]h$]h&]uh1j'hjK:hM>hj9ubj()}(hG``prepare_access_checks`` Prepare next access check of target regions. h](j.)}(h``prepare_access_checks``h]h)}(hjo:h]hprepare_access_checks}(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.hhM?hji:ubjH)}(hhh]h)}(h,Prepare next access check of target regions.h]h,Prepare next access check of target regions.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hM?hj:ubah}(h]h ]h"]h$]h&]uh1jGhji:ubeh}(h]h ]h"]h$]h&]uh1j'hj:hM?hj9ubj()}(h9``check_accesses`` Check the accesses to target regions. h](j.)}(h``check_accesses``h]h)}(hj:h]hcheck_accesses}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhM@hj:ubjH)}(hhh]h)}(h%Check the accesses to target regions.h]h%Check the accesses to target regions.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hM@hj:ubah}(h]h ]h"]h$]h&]uh1jGhj:ubeh}(h]h ]h"]h$]h&]uh1j'hj:hM@hj9ubj()}(h=``get_scheme_score`` Get the score of a region for a scheme. h](j.)}(h``get_scheme_score``h]h)}(hj:h]hget_scheme_score}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMAhj:ubjH)}(hhh]h)}(h'Get the score of a region for a scheme.h]h'Get the score of a region for a scheme.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hMAhj:ubah}(h]h ]h"]h$]h&]uh1jGhj:ubeh}(h]h ]h"]h$]h&]uh1j'hj:hMAhj9ubj()}(h7``apply_scheme`` Apply a DAMON-based operation scheme. h](j.)}(h``apply_scheme``h]h)}(hj;h]h apply_scheme}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMBhj;ubjH)}(hhh]h)}(h%Apply a DAMON-based operation scheme.h]h%Apply a DAMON-based operation scheme.}(hj3;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/;hMBhj0;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj/;hMBhj9ubj()}(h3``target_valid`` Determine if the target is valid. h](j.)}(h``target_valid``h]h)}(hjS;h]h target_valid}(hjU;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQ;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMChjM;ubjH)}(hhh]h)}(h!Determine if the target is valid.h]h!Determine if the target is valid.}(hjl;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjh;hMChji;ubah}(h]h ]h"]h$]h&]uh1jGhjM;ubeh}(h]h ]h"]h$]h&]uh1j'hjh;hMChj9ubj()}(h=``cleanup_target`` Clean up each target before deallocation. h](j.)}(h``cleanup_target``h]h)}(hj;h]hcleanup_target}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMDhj;ubjH)}(hhh]h)}(h)Clean up each target before deallocation.h]h)Clean up each target before deallocation.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMDhj;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj;hMDhj9ubj()}(h!``cleanup`` Clean up the context.h](j.)}(h ``cleanup``h]h)}(hj;h]hcleanup}(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.hhMDhj;ubjH)}(hhh]h)}(hClean up the context.h]hClean up the context.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMEhj;ubah}(h]h ]h"]h$]h&]uh1jGhj;ubeh}(h]h ]h"]h$]h&]uh1j'hj;hMDhj9ubeh}(h]h ]h"]h$]h&]uh1j"hjs9ubeh}(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.hhMHhhhhubh)}(hX8DAMON can be extended for various address spaces and usages. For this, users should register the low level operations for their target address space and usecase via the :c:type:`damon_ctx.ops `. Then, the monitoring thread (:c:type:`damon_ctx.kdamond `) calls **init** and **prepare_access_checks** before starting the monitoring, **update** after each :c:type:`damon_attrs.ops_update_interval `, and **check_accesses**, **target_valid** and **prepare_access_checks** after each :c:type:`damon_attrs.sample_interval `.h](hDAMON can be extended for various address spaces and usages. For this, users should register the low level operations for their target address space and usecase via the }(hj<hhhNhNubh)}(h#:c:type:`damon_ctx.ops `h]h)}(hj(<h]h damon_ctx.ops}(hj*<hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj&<ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMEhj<ubh . Then, the monitoring thread (}(hj<hhhNhNubh)}(h':c:type:`damon_ctx.kdamond `h]h)}(hjL<h]hdamon_ctx.kdamond}(hjN<hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjJ<ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhjE<hMEhj<ubh) calls }(hj<hhhNhNubj)}(h**init**h]hinit}(hjm<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh and }(hj<hhhNhNubj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh! before starting the monitoring, }(hj<hhhNhNubj)}(h **update**h]hupdate}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh after each }(hj<hhhNhNubh)}(h7:c:type:`damon_attrs.ops_update_interval `h]h)}(hj<h]hdamon_attrs.ops_update_interval}(hj<hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhjE<hMEhj<ubh, and }(hj<hhhNhNubj)}(h**check_accesses**h]hcheck_accesses}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh, }(hj<hhhNhNubj)}(h**target_valid**h]h target_valid}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh and }hj<sbj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh after each }(hj<hhhNhNubh)}(h3:c:type:`damon_attrs.sample_interval `h]h)}(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_attrsuh1hhjE<hMEhj<ubh.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjE<hMEhhhhubh)}(hX{Each :c:type:`struct damon_operations ` instance having valid **id** can be registered via damon_register_ops() and selected by damon_select_ops() later. **init** should initialize operations-related data structures. For example, this could be used to construct proper monitoring target regions and link those to **damon_ctx.adaptive_targets**. **update** should update the operations-related data structures. For example, this could be used to update monitoring target regions for current status. **prepare_access_checks** should manipulate the monitoring regions to be prepared for the next access check. **check_accesses** should check the accesses to each region that made after the last preparation and update the number of observed accesses of each region. It should also return max number of observed accesses that made as a result of its update. The value will be used for regions adjustment threshold. **get_scheme_score** should return the priority score of a region for a scheme as an integer in [0, :c:type:`DAMOS_MAX_SCORE`]. **apply_scheme** is called from **kdamond** when a region for user provided DAMON-based operation scheme is found. It should apply the scheme's action to the region and return bytes of the region that the action is successfully applied. It should also report how many bytes of the region has passed filters (:c:type:`struct damos_filter `) that handled by itself. **target_valid** should check whether the target is still valid for the monitoring. **cleanup_target** is called before the target will be deallocated. **cleanup** is called from **kdamond** just before its termination.h](hEach }(hj%=hhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj/=h]hstruct damon_operations}(hj1=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.hhMMhj%=ubh instance having valid }(hj%=hhhNhNubj)}(h**id**h]hid}(hjQ=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubhV can be registered via damon_register_ops() and selected by damon_select_ops() later. }(hj%=hhhNhNubj)}(h**init**h]hinit}(hjc=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubh should initialize operations-related data structures. For example, this could be used to construct proper monitoring target regions and link those to }(hj%=hhhNhNubj)}(h**damon_ctx.adaptive_targets**h]hdamon_ctx.adaptive_targets}(hju=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubh. }(hj%=hhhNhNubj)}(h **update**h]hupdate}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubh should update the operations-related data structures. For example, this could be used to update monitoring target regions for current status. }(hj%=hhhNhNubj)}(h**prepare_access_checks**h]hprepare_access_checks}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubhT should manipulate the monitoring regions to be prepared for the next access check. }(hj%=hhhNhNubj)}(h**check_accesses**h]hcheck_accesses}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubhX should check the accesses to each region that made after the last preparation and update the number of observed accesses of each region. It should also return max number of observed accesses that made as a result of its update. The value will be used for regions adjustment threshold. }(hj%=hhhNhNubj)}(h**get_scheme_score**h]hget_scheme_score}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubhP should return the priority score of a region for a scheme as an integer in [0, }(hj%=hhhNhNubh)}(h:c:type:`DAMOS_MAX_SCORE`h]h)}(hj=h]hDAMOS_MAX_SCORE}(hj=hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj=ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjDAMOS_MAX_SCOREuh1hhjL=hMMhj%=ubh]. }(hj%=hhhNhNubj)}(h**apply_scheme**h]h apply_scheme}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubh is called from }(hj%=hhhNhNubj)}(h **kdamond**h]hkdamond}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubhX  when a region for user provided DAMON-based operation scheme is found. It should apply the scheme’s action to the region and return bytes of the region that the action is successfully applied. It should also report how many bytes of the region has passed filters (}(hj%=hhhNhNubh)}(h,:c:type:`struct damos_filter `h]h)}(hj>h]hstruct damos_filter}(hj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damos_filteruh1hhjL=hMMhj%=ubh) that handled by itself. }(hj%=hhhNhNubj)}(h**target_valid**h]h target_valid}(hj9>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubhD should check whether the target is still valid for the monitoring. }(hj%=hhhNhNubj)}(h**cleanup_target**h]hcleanup_target}(hjK>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubh2 is called before the target will be deallocated. }(hj%=hhhNhNubj)}(h **cleanup**h]hcleanup}(hj]>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubh is called from }hj%=sbj)}(h **kdamond**h]hkdamond}(hjo>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%=ubh just before its termination.}(hj%=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjL=hMMhhhhubj)}(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.hhMiubjF)}(h h]h }(hj>hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj>hhhj>hMiubjW)}(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>hMiubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj>hhhj>hMiubah}(h]j>ah ](jjeh"]h$]h&]jj)jhuh1j'hj>hMihj>hhubj)}(hhh]h)}(h&Monitoring intervals auto-tuning goal.h]h&Monitoring intervals auto-tuning goal.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj>hhubah}(h]h ]h"]h$]h&]uh1jhj>hhhj>hMiubeh}(h]h ](jstructeh"]h$]h&]jjjj>jj>jjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_intervals_goal { unsigned long access_bp; unsigned long aggrs; unsigned long min_sample_us; unsigned long max_sample_us; }; **Members** ``access_bp`` Access events observation ratio to achieve in bp. ``aggrs`` Number of aggregations to achieve **access_bp** within. ``min_sample_us`` Minimum resulting sampling interval in microseconds. ``max_sample_us`` Maximum resulting sampling interval in microseconds.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh:}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj>ubj)}(hstruct damon_intervals_goal { unsigned long access_bp; unsigned long aggrs; unsigned long min_sample_us; unsigned long max_sample_us; };h]hstruct damon_intervals_goal { unsigned long access_bp; unsigned long aggrs; unsigned long min_sample_us; unsigned long max_sample_us; };}hj?sbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj>ubh)}(h **Members**h]j)}(hj0?h]hMembers}(hj2?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@``access_bp`` Access events observation ratio to achieve in bp. h](j.)}(h ``access_bp``h]h)}(hjO?h]h access_bp}(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)}(h1Access events observation ratio to achieve in bp.h]h1Access events observation ratio to achieve in bp.}(hjh?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjd?hMhje?ubah}(h]h ]h"]h$]h&]uh1jGhjI?ubeh}(h]h ]h"]h$]h&]uh1j'hjd?hMhjF?ubj()}(hB``aggrs`` Number of aggregations to achieve **access_bp** within. h](j.)}(h ``aggrs``h]h)}(hj?h]haggrs}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj?ubjH)}(hhh]h)}(h7Number of aggregations to achieve **access_bp** within.h](h"Number of aggregations to achieve }(hj?hhhNhNubj)}(h **access_bp**h]h access_bp}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh within.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj?hMhj?ubah}(h]h ]h"]h$]h&]uh1jGhj?ubeh}(h]h ]h"]h$]h&]uh1j'hj?hMhjF?ubj()}(hG``min_sample_us`` Minimum resulting sampling interval in microseconds. h](j.)}(h``min_sample_us``h]h)}(hj?h]h min_sample_us}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj?ubjH)}(hhh]h)}(h4Minimum resulting sampling interval in microseconds.h]h4Minimum resulting sampling interval in microseconds.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMhj?ubah}(h]h ]h"]h$]h&]uh1jGhj?ubeh}(h]h ]h"]h$]h&]uh1j'hj?hMhjF?ubj()}(hF``max_sample_us`` Maximum resulting sampling interval in microseconds.h](j.)}(h``max_sample_us``h]h)}(hj @h]h max_sample_us}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj @ubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj@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&]uh1jGhj@ubeh}(h]h ]h"]h$]h&]uh1j'hj!@hMhjF?ubeh}(h]h ]h"]h$]h&]uh1j"hj>ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjO@h]h Description}(hjQ@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM@ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(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 }(hje@hhhNhNubh)}(h4:c:type:`damon_attrs->sample_interval `h]h)}(hjo@h]hdamon_attrs->sample_interval}(hjq@hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjm@ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhje@ubh and }(hje@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@hMhje@ubhh aiming the ratio in bp (1/10,000) of DAMON-observed access events to theoretical maximum amount within }(hje@hhhNhNubj)}(h **aggrs**h]haggrs}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje@ubh aggregations be same to }(hje@hhhNhNubj)}(h **access_bp**h]h access_bp}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje@ubh. The logic increases }(hje@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@hMhje@ubh and }(hje@hhhNhNubh)}(h6:c:type:`damon_attrs->sampling_interval `h]h)}(hj@h]hdamon_attrs->sampling_interval}(hj@hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj@ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_attrsuh1hhj@hMhje@ubh` in same ratio if the current access events observation ratio is lower than the target for each }(hje@hhhNhNubj)}(h **aggrs**h]haggrs}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhje@ubh aggregations, and vice versa.}(hje@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj@hMhhhhubh)}(hNIf **aggrs** is zero, the tuning is disabled and hence this struct is ignored.h](hIf }(hj6AhhhNhNubj)}(h **aggrs**h]haggrs}(hj>AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6AubhB is zero, the tuning is disabled and hence this struct is ignored.}(hj6AhhhNhNubeh}(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}(hjpAhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjlAhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hj~AhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjlAhhhj}AhMubjW)}(h damon_attrsh]j])}(hjjAh]h damon_attrs}(hjAhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjAubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjlAhhhj}AhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjhAhhhj}AhMubah}(h]jcAah ](jjeh"]h$]h&]jj)jhuh1j'hj}AhMhjeAhhubj)}(hhh]h)}(h4Monitoring attributes for accuracy/overhead control.h]h4Monitoring attributes for accuracy/overhead control.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjAhhubah}(h]h ]h"]h$]h&]uh1jhjeAhhhj}AhMubeh}(h]h ](jstructeh"]h$]h&]jjjjAjjAjjjuh1j"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}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh:}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjAubj)}(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; };}hjAsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjAubh)}(h **Members**h]j)}(hjBh]hMembers}(hjBhhhNhNubah}(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.hhMhjAubj#)}(hhh](j()}(h7``sample_interval`` The time between access samplings. h](j.)}(h``sample_interval``h]h)}(hjBh]hsample_interval}(hj!BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBubjH)}(hhh]h)}(h"The time between access samplings.h]h"The time between access samplings.}(hj8BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4BhMhj5Bubah}(h]h ]h"]h$]h&]uh1jGhjBubeh}(h]h ]h"]h$]h&]uh1j'hj4BhMhjBubj()}(hA``aggr_interval`` The time between monitor results aggregations. h](j.)}(h``aggr_interval``h]h)}(hjXBh]h aggr_interval}(hjZBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVBubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjRBubjH)}(hhh]h)}(h.The time between monitor results aggregations.h]h.The time between monitor results aggregations.}(hjqBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmBhMhjnBubah}(h]h ]h"]h$]h&]uh1jGhjRBubeh}(h]h ]h"]h$]h&]uh1j'hjmBhMhjBubj()}(hH``ops_update_interval`` The time between monitoring operations updates. h](j.)}(h``ops_update_interval``h]h)}(hjBh]hops_update_interval}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBubjH)}(hhh]h)}(h/The time between monitoring operations updates.h]h/The time between monitoring operations updates.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMhjBubah}(h]h ]h"]h$]h&]uh1jGhjBubeh}(h]h ]h"]h$]h&]uh1j'hjBhMhjBubj()}(h/``intervals_goal`` Intervals auto-tuning goal. h](j.)}(h``intervals_goal``h]h)}(hjBh]hintervals_goal}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBubjH)}(hhh]h)}(hIntervals auto-tuning goal.h]hIntervals auto-tuning goal.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMhjBubah}(h]h ]h"]h$]h&]uh1jGhjBubeh}(h]h ]h"]h$]h&]uh1j'hjBhMhjBubj()}(hF``min_nr_regions`` The minimum number of adaptive monitoring regions. h](j.)}(h``min_nr_regions``h]h)}(hjCh]hmin_nr_regions}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjBubjH)}(hhh]h)}(h2The minimum number of adaptive monitoring regions.h]h2The minimum number of adaptive monitoring regions.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjCubah}(h]h ]h"]h$]h&]uh1jGhjBubeh}(h]h ]h"]h$]h&]uh1j'hjChMhjBubj()}(hE``max_nr_regions`` The maximum number of adaptive monitoring regions.h](j.)}(h``max_nr_regions``h]h)}(hj=Ch]hmax_nr_regions}(hj?ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;Cubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj7CubjH)}(hhh]h)}(h2The maximum number of adaptive monitoring regions.h]h2The maximum number of adaptive monitoring regions.}(hjVChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRChMhjSCubah}(h]h ]h"]h$]h&]uh1jGhj7Cubeh}(h]h ]h"]h$]h&]uh1j'hjRChMhjBubeh}(h]h ]h"]h$]h&]uh1j"hjAubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjCh]h Description}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}Cubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hXFor each **sample_interval**, DAMON checks whether each region is accessed or not during the last **sample_interval**. If such access is found, DAMON aggregates the information by increasing :c:type:`damon_region->nr_accesses ` for **aggr_interval** time. For each **aggr_interval**, the count is reset. DAMON also checks whether the target memory regions need update (e.g., by ``mmap()`` calls from the application, in case of virtual memory monitoring) and applies the changes for each **ops_update_interval**. All time intervals are in micro-seconds. Please refer to :c:type:`struct damon_operations ` and :c:type:`struct damon_call_control ` for more detail.h](h For each }(hjChhhNhNubj)}(h**sample_interval**h]hsample_interval}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubhF, DAMON checks whether each region is accessed or not during the last }(hjChhhNhNubj)}(h**sample_interval**h]hsample_interval}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubhK. If such access is found, DAMON aggregates the information by increasing }(hjChhhNhNubh)}(h2:c:type:`damon_region->nr_accesses `h]h)}(hjCh]hdamon_region->nr_accesses}(hjChhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjCubh for }(hjChhhNhNubj)}(h**aggr_interval**h]h aggr_interval}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubh time. For each }(hjChhhNhNubj)}(h**aggr_interval**h]h aggr_interval}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubha, the count is reset. DAMON also checks whether the target memory regions need update (e.g., by }(hjChhhNhNubh)}(h ``mmap()``h]hmmap()}(hj DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubhd calls from the application, in case of virtual memory monitoring) and applies the changes for each }(hjChhhNhNubj)}(h**ops_update_interval**h]hops_update_interval}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubh=. All time intervals are in micro-seconds. Please refer to }(hjChhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hj/Dh]hstruct damon_operations}(hj1DhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj-Dubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhjChMhjCubh and }(hjChhhNhNubh)}(h8:c:type:`struct damon_call_control `h]h)}(hjRDh]hstruct damon_call_control}(hjTDhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjPDubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjChMhjCubh for more detail.}(hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjChMhhhhubj)}(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}(hjDhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjDhhhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMubjF)}(h h]h }(hjDhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjDhhhjDhMubjW)}(h damon_ctxh]j])}(hjDh]h damon_ctx}(hjDhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjDubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjDhhhjDhMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjDhhhjDhMubah}(h]jDah ](jjeh"]h$]h&]jj)jhuh1j'hjDhMhjDhhubj)}(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.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjDhhubah}(h]h ]h"]h$]h&]uh1jhjDhhhjDhMubeh}(h]h ](jstructeh"]h$]h&]jjjjDjjDjjjuh1j"hhhhhj!hNubj)}(hX**Definition**:: struct damon_ctx { struct damon_attrs attrs; struct task_struct *kdamond; struct mutex kdamond_lock; struct damon_operations ops; 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. ``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}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh:}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjDubj)}(hstruct damon_ctx { struct damon_attrs attrs; struct task_struct *kdamond; struct mutex kdamond_lock; struct damon_operations ops; 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 list_head adaptive_targets; struct list_head schemes; };}hjEsbah}(h]h ]h"]h$]h&]hhuh1jhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjDubh)}(h **Members**h]j)}(hj"Eh]hMembers}(hj$EhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Eubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjDubj#)}(hhh](j()}(h?``attrs`` Monitoring attributes for accuracy/overhead control. h](j.)}(h ``attrs``h]h)}(hjAEh]hattrs}(hjCEhhhNhNubah}(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)}(h4Monitoring attributes for accuracy/overhead control.h]h4Monitoring attributes for accuracy/overhead control.}(hjZEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVEhMhjWEubah}(h]h ]h"]h$]h&]uh1jGhj;Eubeh}(h]h ]h"]h$]h&]uh1j'hjVEhMhj8Eubj()}(h3``kdamond`` Kernel thread who does the monitoring. h](j.)}(h ``kdamond``h]h)}(hjzEh]hkdamond}(hj|EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxEubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjtEubjH)}(hhh]h)}(h&Kernel thread who does the monitoring.h]h&Kernel thread who does the monitoring.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhMhjEubah}(h]h ]h"]h$]h&]uh1jGhjtEubeh}(h]h ]h"]h$]h&]uh1j'hjEhMhj8Eubj()}(hB``kdamond_lock`` Mutex for the synchronizations with **kdamond**. h](j.)}(h``kdamond_lock``h]h)}(hjEh]h kdamond_lock}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjEubjH)}(hhh]h)}(h0Mutex for the synchronizations with **kdamond**.h](h$Mutex for the synchronizations with }(hjEhhhNhNubj)}(h **kdamond**h]hkdamond}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjEhMhjEubah}(h]h ]h"]h$]h&]uh1jGhjEubeh}(h]h ]h"]h$]h&]uh1j'hjEhMhj8Eubj()}(h:``ops`` Set of monitoring operations for given use cases. h](j.)}(h``ops``h]h)}(hjEh]hops}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjEubjH)}(hhh]h)}(h1Set of monitoring operations for given use cases.h]h1Set of monitoring operations for given use cases.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jGhjEubeh}(h]h ]h"]h$]h&]uh1j'hjFhMhj8Eubj()}(hO``adaptive_targets`` Head of monitoring targets (:c:type:`damon_target`) list. h](j.)}(h``adaptive_targets``h]h)}(hj7Fh]hadaptive_targets}(hj9FhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5Fubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhj1FubjH)}(hhh]h)}(h9Head of monitoring targets (:c:type:`damon_target`) list.h](hHead of monitoring targets (}(hjPFhhhNhNubh)}(h:c:type:`damon_target`h]h)}(hjZFh]h damon_target}(hj\FhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjXFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_targetuh1hhjLFhMhjPFubh) list.}(hjPFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjLFhMhjMFubah}(h]h ]h"]h$]h&]uh1jGhj1Fubeh}(h]h ]h"]h$]h&]uh1j'hjLFhMhj8Eubj()}(h3``schemes`` Head of schemes (:c:type:`damos`) list.h](j.)}(h ``schemes``h]h)}(hjFh]hschemes}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]uh1j-hR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjFubjH)}(hhh]h)}(h'Head of schemes (:c:type:`damos`) list.h](hHead of schemes (}(hjFhhhNhNubh)}(h:c:type:`damos`h]h)}(hjFh]hdamos}(hjFhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhjFubh) list.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jGhjFubeh}(h]h ]h"]h$]h&]uh1j'hjFhMhj8Eubeh}(h]h ]h"]h$]h&]uh1j"hjDubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhj!hNubh)}(h**Description**h]j)}(hjFh]h Description}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(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 }(hjGhhhNhNubj)}(h **kdamond**h]hkdamond}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/mm/damon/api:14: ./include/linux/damon.hhMhhhhubh)}(hXCOnce started, the monitoring thread runs until explicitly required to be terminated or every monitoring target is invalid. The validity of the targets is checked via the :c:type:`damon_operations.target_valid ` of **ops**. The termination can also be explicitly requested by calling damon_stop(). The thread sets **kdamond** to NULL when it terminates. Therefore, users can know whether the monitoring is ongoing or terminated by reading **kdamond**. Reads and writes to **kdamond** from outside of the monitoring thread must be protected by **kdamond_lock**.h](hOnce started, the monitoring thread runs until explicitly required to be terminated or every monitoring target is invalid. The validity of the targets is checked via the }(hj0GhhhNhNubh)}(h::c:type:`damon_operations.target_valid `h]h)}(hj:Gh]hdamon_operations.target_valid}(hj`->id so that others can find and use them later. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjJh]h Parameters}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKEhj|Jubj#)}(hhh]j()}(hH``struct damon_operations *ops`` monitoring operations set to register. h](j.)}(h ``struct damon_operations *ops``h]h)}(hjJh]hstruct damon_operations *ops}(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.chKBhjJubjH)}(hhh]h)}(h&monitoring operations set to register.h]h&monitoring operations set to register.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhKBhjJubah}(h]h ]h"]h$]h&]uh1jGhjJubeh}(h]h ]h"]h$]h&]uh1j'hjJhKBhjJubah}(h]h ]h"]h$]h&]uh1j"hj|Jubh)}(h**Description**h]j)}(hjJh]h Description}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKDhj|Jubh)}(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 }(hjJhhhNhNubh)}(h4:c:type:`struct damon_operations `h]h)}(hjJh]hstruct damon_operations}(hjJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKChjJubh0->id so that others can find and use them later.}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjKhKChj|Jubh)}(h **Return**h]j)}(hj&Kh]hReturn}(hj(KhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$Kubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chKFhj|Jubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjVubah}(h]h ]h"]h$]h&]uh1jGhj"Vubeh}(h]h ]h"]h$]h&]uh1j'hj=VhMhjUubeh}(h]h ]h"]h$]h&]uh1j"hjUubh)}(h**Description**h]j)}(hjcVh]h Description}(hjeVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaVubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjUubh)}(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 }(hjyVhhhNhNubj)}(h**src**h]hsrc}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyVubh to }(hjyVhhhNhNubj)}(h**dst**h]hdst}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyVubh. Users should use this function for quota goals-level parameters update of running DAMON contexts, instead of manual in-place updates.}(hjyVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjUubh)}(hVThis function should be called from parameters-update safe context, like damon_call().h]hVThis function should be called from parameters-update safe context, like damon_call().}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjGhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)damos_filters_default_reject (C function)c.damos_filters_default_rejecthNtauh1jhjGhhhNhNubj#)}(hhh](j()}(h=bool damos_filters_default_reject (struct list_head *filters)h]j.)}(h]ubjH)}(hhh]h)}(hsize of **ctxs**h](hsize of }(hj]]hhhNhNubj)}(h**ctxs**h]hctxs}(hje]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]]ubeh}(h]h ]h"]h$]h&]uh1hhjY]hMhjZ]ubah}(h]h ]h"]h$]h&]uh1jGhj>]ubeh}(h]h ]h"]h$]h&]uh1j'hjY]hMhj]ubj()}(h8``bool exclusive`` exclusiveness of this contexts group h](j.)}(h``bool exclusive``h]h)}(hj]h]hbool exclusive}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj]ubjH)}(hhh]h)}(h$exclusiveness of this contexts grouph]h$exclusiveness of this contexts group}(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]ubeh}(h]h ]h"]h$]h&]uh1j"hj\ubh)}(h**Description**h]j)}(hj]h]h Description}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj\ubh)}(hX}This function starts a group of monitoring threads for a group of monitoring contexts. One thread per each context is created and run in parallel. The caller should handle synchronization between the threads by itself. If **exclusive** is true and a group of threads that created by other 'damon_start()' call is currently running, this function does nothing but returns -EBUSY.h](hThis function starts a group of monitoring threads for a group of monitoring contexts. One thread per each context is created and run in parallel. The caller should handle synchronization between the threads by itself. If }(hj]hhhNhNubj)}(h **exclusive**h]h exclusive}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubh is true and a group of threads that created by other ‘damon_start()’ call is currently running, this function does nothing but returns -EBUSY.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj\ubh)}(h **Return**h]j)}(hj]h]hReturn}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj\ubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hj\ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjGhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_stop (C function) c.damon_stophNtauh1jhjGhhhNhNubj#)}(hhh](j()}(h5int damon_stop (struct damon_ctx **ctxs, int nr_ctxs)h]j.)}(h4int damon_stop(struct damon_ctx **ctxs, int nr_ctxs)h](j"H)}(hinth]hint}(hjD^hhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!Hhj@^hhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMSubjF)}(h h]h }(hjS^hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj@^hhhjR^hMSubjW)}(h damon_stoph]j])}(h damon_stoph]h damon_stop}(hje^hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hja^ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj@^hhhjR^hMSubjZH)}(h&(struct damon_ctx **ctxs, int nr_ctxs)h](j`H)}(hstruct damon_ctx **ctxsh](j4)}(hj7h]hstruct}(hj^hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj}^ubjF)}(h h]h }(hj^hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj}^ubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hj^hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj^ubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetj^modnameN classnameNjj)}j]j!)}j!jg^sb c.damon_stopasbuh1hhj}^ubjF)}(h h]h }(hj^hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj}^ubj&J)}(hj)Jh]h*}(hj^hhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%Jhj}^ubj&J)}(hj)Jh]h*}(hj^hhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%Jhj}^ubj])}(hctxsh]hctxs}(hj^hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj}^ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_Hhjy^ubj`H)}(h int nr_ctxsh](j"H)}(hinth]hint}(hj_hhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!Hhj^ubjF)}(h h]h }(hj_hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj^ubj])}(hnr_ctxsh]hnr_ctxs}(hj_hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj^ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_Hhjy^ubeh}(h]h ]h"]h$]h&]hhuh1jYHhj@^hhhjR^hMSubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj<^hhhjR^hMSubah}(h]j7^ah ](jjeh"]h$]h&]jj)jhuh1j'hjR^hMShj9^hhubj)}(hhh]h)}(h4Stops the monitorings for a given group of contexts.h]h4Stops the monitorings for a given group of contexts.}(hjF_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMShjC_hhubah}(h]h ]h"]h$]h&]uh1jhj9^hhhjR^hMSubeh}(h]h ](jfunctioneh"]h$]h&]jjjj^_jj^_jjjuh1j"hhhjGhNhNubj)}(h**Parameters** ``struct damon_ctx **ctxs`` an array of the pointers for contexts to stop monitoring ``int nr_ctxs`` size of **ctxs** **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjh_h]h Parameters}(hjj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf_ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMWhjb_ubj#)}(hhh](j()}(hU``struct damon_ctx **ctxs`` an array of the pointers for contexts to stop monitoring h](j.)}(h``struct damon_ctx **ctxs``h]h)}(hj_h]hstruct damon_ctx **ctxs}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMThj_ubjH)}(hhh]h)}(h8an array of the pointers for contexts to stop monitoringh]h8an array of the pointers for contexts to stop monitoring}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_hMThj_ubah}(h]h ]h"]h$]h&]uh1jGhj_ubeh}(h]h ]h"]h$]h&]uh1j'hj_hMThj~_ubj()}(h!``int nr_ctxs`` size of **ctxs** h](j.)}(h``int nr_ctxs``h]h)}(hj_h]h int nr_ctxs}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMUhj_ubjH)}(hhh]h)}(hsize of **ctxs**h](hsize of }(hj_hhhNhNubj)}(h**ctxs**h]hctxs}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1hhj_hMUhj_ubah}(h]h ]h"]h$]h&]uh1jGhj_ubeh}(h]h ]h"]h$]h&]uh1j'hj_hMUhj~_ubeh}(h]h ]h"]h$]h&]uh1j"hjb_ubh)}(h **Return**h]j)}(hj `h]hReturn}(hj `hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMWhjb_ubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMWhjb_ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjGhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_is_running (C function)c.damon_is_runninghNtauh1jhjGhhhNhNubj#)}(hhh](j()}(h-bool damon_is_running (struct damon_ctx *ctx)h]j.)}(h,bool damon_is_running(struct damon_ctx *ctx)h](j"H)}(hj%Hh]hbool}(hjN`hhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!HhjJ`hhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMgubjF)}(h h]h }(hj\`hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjJ`hhhj[`hMgubjW)}(hdamon_is_runningh]j])}(hdamon_is_runningh]hdamon_is_running}(hjn`hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjj`ubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjJ`hhhj[`hMgubjZH)}(h(struct damon_ctx *ctx)h]j`H)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hj`hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj`ubjF)}(h h]h }(hj`hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj`ubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hj`hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj`ubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetj`modnameN classnameNjj)}j]j!)}j!jp`sbc.damon_is_runningasbuh1hhj`ubjF)}(h h]h }(hj`hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj`ubj&J)}(hj)Jh]h*}(hj`hhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%Jhj`ubj])}(hctxh]hctx}(hj`hhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj`ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_Hhj`ubah}(h]h ]h"]h$]h&]hhuh1jYHhjJ`hhhj[`hMgubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjF`hhhj[`hMgubah}(h]jA`ah ](jjeh"]h$]h&]jj)jhuh1j'hj[`hMghjC`hhubj)}(hhh]h)}(h,Returns if a given DAMON context is running.h]h,Returns if a given DAMON context is running.}(hj ahhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMghj ahhubah}(h]h ]h"]h$]h&]uh1jhjC`hhhj[`hMgubeh}(h]h ](jfunctioneh"]h$]h&]jjjj%ajj%ajjjuh1j"hhhjGhNhNubj)}(h**Parameters** ``struct damon_ctx *ctx`` The DAMON context to see if running. **Return** true if **ctx** is running, false otherwise.h](h)}(h**Parameters**h]j)}(hj/ah]h Parameters}(hj1ahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-aubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMkhj)aubj#)}(hhh]j()}(h?``struct damon_ctx *ctx`` The DAMON context to see if running. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjNah]hstruct damon_ctx *ctx}(hjPahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLaubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhhjHaubjH)}(hhh]h)}(h$The DAMON context to see if running.h]h$The DAMON context to see if running.}(hjgahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcahMhhjdaubah}(h]h ]h"]h$]h&]uh1jGhjHaubeh}(h]h ]h"]h$]h&]uh1j'hjcahMhhjEaubah}(h]h ]h"]h$]h&]uh1j"hj)aubh)}(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.chMjhj)aubh)}(h,true if **ctx** is running, false otherwise.h](htrue if }(hjahhhNhNubj)}(h**ctx**h]hctx}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh is running, false otherwise.}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMjhj)aubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjGhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamon_call (C function) c.damon_callhNtauh1jhjGhhhNhNubj#)}(hhh](j()}(hJint damon_call (struct damon_ctx *ctx, struct damon_call_control *control)h]j.)}(hIint damon_call(struct damon_ctx *ctx, struct damon_call_control *control)h](j"H)}(hinth]hint}(hjahhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!HhjahhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMwubjF)}(h h]h }(hjahhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjahhhjahMwubjW)}(h damon_callh]j])}(h damon_callh]h damon_call}(hjbhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjaubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjahhhjahMwubjZH)}(h;(struct damon_ctx *ctx, struct damon_call_control *control)h](j`H)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjbhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjbubjF)}(h h]h }(hj*bhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjbubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hj;bhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj8bubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetj=bmodnameN classnameNjj)}j]j!)}j!jbsb c.damon_callasbuh1hhjbubjF)}(h h]h }(hj[bhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjbubj&J)}(hj)Jh]h*}(hjibhhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%Jhjbubj])}(hctxh]hctx}(hjvbhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjbubeh}(h]h ]h"]h$]h&]noemphhhuh1j_Hhjbubj`H)}(h"struct damon_call_control *controlh](j4)}(hj7h]hstruct}(hjbhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjbubjF)}(h h]h }(hjbhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjbubh)}(hhh]j])}(hdamon_call_controlh]hdamon_call_control}(hjbhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjbubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjbmodnameN classnameNjj)}j]jWb c.damon_callasbuh1hhjbubjF)}(h h]h }(hjbhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjbubj&J)}(hj)Jh]h*}(hjbhhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%Jhjbubj])}(hcontrolh]hcontrol}(hjbhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjbubeh}(h]h ]h"]h$]h&]noemphhhuh1j_Hhjbubeh}(h]h ]h"]h$]h&]hhuh1jYHhjahhhjahMwubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjahhhjahMwubah}(h]jaah ](jjeh"]h$]h&]jj)jhuh1j'hjahMwhjahhubj)}(hhh]h)}(h9Invoke a given function on DAMON worker thread (kdamond).h]h9Invoke a given function on DAMON worker thread (kdamond).}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMwhj chhubah}(h]h ]h"]h$]h&]uh1jhjahhhjahMwubeh}(h]h ](jfunctioneh"]h$]h&]jjjj(cjj(cjjjuh1j"hhhjGhNhNubj)}(hX%**Parameters** ``struct damon_ctx *ctx`` DAMON context to call the function for. ``struct damon_call_control *control`` Control variable of the call request. **Description** Ask DAMON worker thread (kdamond) of **ctx** to call a function with an argument data that respectively passed via :c:type:`damon_call_control->fn ` and :c:type:`damon_call_control->data ` of **control**. If :c:type:`damon_call_control->repeat ` of **control** is set, further wait until the kdamond finishes handling of the request. Otherwise, return as soon as the request is made. The kdamond executes the function with the argument in the main loop, just after a sampling of the iteration is finished. The function can hence safely access the internal data of the :c:type:`struct damon_ctx ` without additional synchronization. The return value of the function will be saved in :c:type:`damon_call_control->return_code `. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hj2ch]h Parameters}(hj4chhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0cubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM{hj,cubj#)}(hhh](j()}(hB``struct damon_ctx *ctx`` DAMON context to call the function for. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjQch]hstruct damon_ctx *ctx}(hjSchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOcubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMxhjKcubjH)}(hhh]h)}(h'DAMON context to call the function for.h]h'DAMON context to call the function for.}(hjjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfchMxhjgcubah}(h]h ]h"]h$]h&]uh1jGhjKcubeh}(h]h ]h"]h$]h&]uh1j'hjfchMxhjHcubj()}(hM``struct damon_call_control *control`` Control variable of the call request. h](j.)}(h&``struct damon_call_control *control``h]h)}(hjch]h"struct damon_call_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.c hMyhjcubjH)}(hhh]h)}(h%Control variable of the call request.h]h%Control variable of the call request.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchMyhjcubah}(h]h ]h"]h$]h&]uh1jGhjcubeh}(h]h ]h"]h$]h&]uh1j'hjchMyhjHcubeh}(h]h ]h"]h$]h&]uh1j"hj,cubh)}(h**Description**h]j)}(hjch]h Description}(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.chM{hj,cubh)}(hXAsk DAMON worker thread (kdamond) of **ctx** to call a function with an argument data that respectively passed via :c:type:`damon_call_control->fn ` and :c:type:`damon_call_control->data ` of **control**. If :c:type:`damon_call_control->repeat ` of **control** is set, further wait until the kdamond finishes handling of the request. Otherwise, return as soon as the request is made.h](h%Ask DAMON worker thread (kdamond) of }(hjchhhNhNubj)}(h**ctx**h]hctx}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubhG to call a function with an argument data that respectively passed via }(hjchhhNhNubh)}(h5:c:type:`damon_call_control->fn `h]h)}(hjch]hdamon_call_control->fn}(hjchhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjcubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMzhjcubh and }(hjchhhNhNubh)}(h7:c:type:`damon_call_control->data `h]h)}(hjdh]hdamon_call_control->data}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjdhMzhjcubh of }(hjchhhNhNubj)}(h **control**h]hcontrol}(hjrepeat `h]h)}(hjPdh]hdamon_call_control->repeat}(hjRdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjNdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjdhMzhjcubh of }(hjchhhNhNubj)}(h **control**h]hcontrol}(hjqdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubh| is set, further wait until the kdamond finishes handling of the request. Otherwise, return as soon as the request is made.}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjdhMzhj,cubh)}(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 }(hjdhhhNhNubh)}(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_ctxuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjdubhX without additional synchronization. The return value of the function will be saved in }(hjdhhhNhNubh)}(h>:c:type:`damon_call_control->return_code `h]h)}(hjdh]hdamon_call_control->return_code}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_call_controluh1hhjdhMhjdubh.}(hjdhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjdhMhj,cubh)}(h **Return**h]j)}(hjdh]hReturn}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj,cubh)}(h,0 on success, negative error code otherwise.h]h,0 on success, negative error code otherwise.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhj,cubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjGhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdamos_walk (C function) c.damos_walkhNtauh1jhjGhhhNhNubj#)}(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](j"H)}(hinth]hint}(hj%ehhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!Hhj!ehhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMubjF)}(h h]h }(hj4ehhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj!ehhhj3ehMubjW)}(h damos_walkh]j])}(h damos_walkh]h damos_walk}(hjFehhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjBeubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhj!ehhhj3ehMubjZH)}(h;(struct damon_ctx *ctx, struct damos_walk_control *control)h](j`H)}(hstruct damon_ctx *ctxh](j4)}(hj7h]hstruct}(hjbehhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj^eubjF)}(h h]h }(hjoehhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj^eubh)}(hhh]j])}(h damon_ctxh]h damon_ctx}(hjehhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj}eubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjemodnameN classnameNjj)}j]j!)}j!jHesb c.damos_walkasbuh1hhj^eubjF)}(h h]h }(hjehhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj^eubj&J)}(hj)Jh]h*}(hjehhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%Jhj^eubj])}(hctxh]hctx}(hjehhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hj^eubeh}(h]h ]h"]h$]h&]noemphhhuh1j_HhjZeubj`H)}(h"struct damos_walk_control *controlh](j4)}(hj7h]hstruct}(hjehhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjeubjF)}(h h]h }(hjehhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjeubh)}(hhh]j])}(hdamos_walk_controlh]hdamos_walk_control}(hjehhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjeubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjemodnameN classnameNjj)}j]je c.damos_walkasbuh1hhjeubjF)}(h h]h }(hjfhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjeubj&J)}(hj)Jh]h*}(hjfhhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%Jhjeubj])}(hcontrolh]hcontrol}(hj+fhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjeubeh}(h]h ]h"]h$]h&]noemphhhuh1j_HhjZeubeh}(h]h ]h"]h$]h&]hhuh1jYHhj!ehhhj3ehMubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hjehhhj3ehMubah}(h]jeah ](jjeh"]h$]h&]jj)jhuh1j'hj3ehMhjehhubj)}(hhh]h)}(h2Invoke a given functions while DAMOS walk regions.h]h2Invoke a given functions while DAMOS walk regions.}(hjUfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjRfhhubah}(h]h ]h"]h$]h&]uh1jhjehhhj3ehMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjmfjjmfjjjuh1j"hhhjGhNhNubj)}(hX}**Parameters** ``struct damon_ctx *ctx`` DAMON context to call the functions for. ``struct damos_walk_control *control`` Control variable of the walk request. **Description** Ask DAMON worker thread (kdamond) of **ctx** to call a function for each region that the kdamond will apply DAMOS action to, and wait until the kdamond finishes handling of the request. The kdamond executes the given function in the main loop, for each region just after it applied any DAMOS actions of **ctx** to it. The invocation is made only within one :c:type:`damos->apply_interval_us ` since damos_walk() invocation, for each scheme. The given callback function can hence safely access the internal data of :c:type:`struct damon_ctx ` and :c:type:`struct damon_region ` that each of the scheme will apply the action for next interval, without additional synchronizations against the kdamond. If every scheme of **ctx** passed at least one :c:type:`damos->apply_interval_us `, kdamond marks the request as completed so that damos_walk() can wakeup and return. **Return** 0 on success, negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjwfh]h Parameters}(hjyfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjufubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjqfubj#)}(hhh](j()}(hC``struct damon_ctx *ctx`` DAMON context to call the functions for. h](j.)}(h``struct damon_ctx *ctx``h]h)}(hjfh]hstruct damon_ctx *ctx}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjfubjH)}(hhh]h)}(h(DAMON context to call the functions for.h]h(DAMON context to call the functions for.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhMhjfubah}(h]h ]h"]h$]h&]uh1jGhjfubeh}(h]h ]h"]h$]h&]uh1j'hjfhMhjfubj()}(hM``struct damos_walk_control *control`` Control variable of the walk request. h](j.)}(h&``struct damos_walk_control *control``h]h)}(hjfh]h"struct damos_walk_control *control}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjfubjH)}(hhh]h)}(h%Control variable of the walk request.h]h%Control variable of the walk request.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhMhjfubah}(h]h ]h"]h$]h&]uh1jGhjfubeh}(h]h ]h"]h$]h&]uh1j'hjfhMhjfubeh}(h]h ]h"]h$]h&]uh1j"hjqfubh)}(h**Description**h]j)}(hj gh]h Description}(hj ghhhNhNubah}(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.chMhjqfubh)}(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 ghhhNhNubj)}(h**ctx**h]hctx}(hj(ghhhNhNubah}(h]h ]h"]h$]h&]uh1jhj gubh 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 ghhhNhNubeh}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjqfubh)}(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 }(hjAghhhNhNubj)}(h**ctx**h]hctx}(hjIghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAgubh0 to it. The invocation is made only within one }(hjAghhhNhNubh)}(h*:c:type:`damos->apply_interval_us `h]h)}(hj]gh]hdamos->apply_interval_us}(hj_ghhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj[gubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjAgubh{ since damos_walk() invocation, for each scheme. The given callback function can hence safely access the internal data of }(hjAghhhNhNubh)}(h&:c:type:`struct damon_ctx `h]h)}(hjgh]hstruct damon_ctx}(hjghhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_ctxuh1hhjzghMhjAgubh and }(hjAghhhNhNubh)}(h,:c:type:`struct damon_region `h]h)}(hjgh]hstruct damon_region}(hjghhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj damon_regionuh1hhjzghMhjAgubh that each of the scheme will apply the action for next interval, without additional synchronizations against the kdamond. If every scheme of }(hjAghhhNhNubj)}(h**ctx**h]hctx}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAgubh passed at least one }(hjAghhhNhNubh)}(h*:c:type:`damos->apply_interval_us `h]h)}(hjgh]hdamos->apply_interval_us}(hjghhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamosuh1hhjzghMhjAgubhT, kdamond marks the request as completed so that damos_walk() can wakeup and return.}(hjAghhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjzghMhjqfubh)}(h **Return**h]j)}(hjhh]hReturn}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chMhjqfubh)}(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.chMhjqfubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjGhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j8damon_set_region_biggest_system_ram_default (C function)-c.damon_set_region_biggest_system_ram_defaulthNtauh1jhjGhhhNhNubj#)}(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](j"H)}(hinth]hint}(hjGhhhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!HhjChhhhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM ubjF)}(h h]h }(hjVhhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjChhhhjUhhM 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}(hjhhhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjdhubah}(h]h ](jojpeh"]h$]h&]hhuh1jVhjChhhhjUhhM ubjZH)}(hB(struct damon_target *t, unsigned long *start, unsigned long *end)h](j`H)}(hstruct damon_target *th](j4)}(hj7h]hstruct}(hjhhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhubjF)}(h h]h }(hjhhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhubh)}(hhh]j])}(h damon_targeth]h damon_target}(hjhhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjhubah}(h]h ]h"]h$]h&] refdomainjreftypej! reftargetjhmodnameN classnameNjj)}j]j!)}j!jjhsb-c.damon_set_region_biggest_system_ram_defaultasbuh1hhjhubjF)}(h h]h }(hjhhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhubj&J)}(hj)Jh]h*}(hjhhhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%Jhjhubj])}(hth]ht}(hjhhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjhubeh}(h]h ]h"]h$]h&]noemphhhuh1j_Hhj|hubj`H)}(hunsigned long *starth](j"H)}(hunsignedh]hunsigned}(hjhhhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!HhjhubjF)}(h h]h }(hjihhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhubj"H)}(hlongh]hlong}(hjihhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!HhjhubjF)}(h h]h }(hj ihhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjhubj&J)}(hj)Jh]h*}(hj.ihhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%Jhjhubj])}(hstarth]hstart}(hj;ihhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjhubeh}(h]h ]h"]h$]h&]noemphhhuh1j_Hhj|hubj`H)}(hunsigned long *endh](j"H)}(hunsignedh]hunsigned}(hjTihhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!HhjPiubjF)}(h h]h }(hjbihhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPiubj"H)}(hlongh]hlong}(hjpihhhNhNubah}(h]h ]j.Hah"]h$]h&]uh1j!HhjPiubjF)}(h h]h }(hj~ihhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjPiubj&J)}(hj)Jh]h*}(hjihhhNhNubah}(h]h ]j2Jah"]h$]h&]uh1j%JhjPiubj])}(hendh]hend}(hjihhhNhNubah}(h]h ]jhah"]h$]h&]uh1j\hjPiubeh}(h]h ]h"]h$]h&]noemphhhuh1j_Hhj|hubeh}(h]h ]h"]h$]h&]hhuh1jYHhjChhhhjUhhM ubeh}(h]h ]h"]h$]h&]hhjzuh1j-j{j|hj?hhhhjUhhM ubah}(h]j:hah ](jjeh"]h$]h&]jj)jhuh1j'hjUhhM hjcheck_accesses ` callback.h](h)}(h**Parameters**h]j)}(hj!mh]h Parameters}(hj#mhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjmubj#)}(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@mh]hstruct damon_region *r}(hjBmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>mubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hj:mubjH)}(hhh]h)}(h7The DAMON region to update for its access check result.h]h7The DAMON region to update for its access check result.}(hjYmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUmhM hjVmubah}(h]h ]h"]h$]h&]uh1jGhj:mubeh}(h]h ]h"]h$]h&]uh1j'hjUmhM hj7mubj()}(hQ``bool accessed`` Whether the region has accessed during last sampling interval. h](j.)}(h``bool accessed``h]h)}(hjymh]h bool accessed}(hj{mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwmubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjsmubjH)}(hhh]h)}(h>Whether the region has accessed during last sampling interval.h]h>Whether the region has accessed during last sampling interval.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhM hjmubah}(h]h ]h"]h$]h&]uh1jGhjsmubeh}(h]h ]h"]h$]h&]uh1j'hjmhM hj7mubj()}(hD``struct damon_attrs *attrs`` The damon_attrs of the DAMON context. h](j.)}(h``struct damon_attrs *attrs``h]h)}(hjmh]hstruct damon_attrs *attrs}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmubah}(h]h ]h"]h$]h&]uh1j-hL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjmubjH)}(hhh]h)}(h%The damon_attrs of the DAMON context.h]h%The damon_attrs of the DAMON context.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhM hjmubah}(h]h ]h"]h$]h&]uh1jGhjmubeh}(h]h ]h"]h$]h&]uh1j'hjmhM hj7mubeh}(h]h ]h"]h$]h&]uh1j"hjmubh)}(h**Description**h]j)}(hjmh]h Description}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjmubh)}(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.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjmubh)}(hfUsually this will be called by :c:type:`damon_operations->check_accesses ` callback.h](hUsually this will be called by }(hjnhhhNhNubh)}(h=:c:type:`damon_operations->check_accesses `h]h)}(hjnh]h damon_operations->check_accesses}(hjnhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjnubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdamon_operationsuh1hhL/var/lib/git/docbuild/linux/Documentation/mm/damon/api:20: ./mm/damon/core.chM hjnubh callback.}(hjnhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj9nhM hjmubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjGhhhNhNubeh}(h] functionsah ]h"] functionsah$]h&]uh1hhhhhhhhKubeh}(h] api-referenceah ]h"] api referenceah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj~nerror_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}(jXnjUnjGjGjPnjMnu nametypes}(jXnjGjPnuh}(jUnhjGhjj)jjjj$jjj j jjjjjjjjjj#jjj6!j;!j %j%j!)j&)j*j*j,j,j.j.j7j7j9j 9j>j>jcAjhAjDjDjMnjGjHjHjIjIj^KjcKjMjMjKOjPOjQjQjqTjvTjVjVj(Xj-XjZjZj[j[j7^j<^jA`jF`jajajejej:hj?hjkjku 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.