Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Docs/admin-guide/mm/damon/usage: update DAMOS actions/filters supports of each DAMON operations set

Supports of each DAMOS action and filters are up to DAMON operations set
implementation, but it's not mentioned in detail on the documentation.
Update the information on the usage document.

Link: https://lkml.kernel.org/r/20230110190400.119388-5-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

SeongJae Park and committed by
Andrew Morton
9a47c411 86834644

+28 -13
+28 -13
Documentation/admin-guide/mm/damon/usage.rst
··· 279 279 memory regions having specific access pattern of the interest. The keywords 280 280 that can be written to and read from the file and their meaning are as below. 281 281 282 - - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED`` 283 - - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD`` 284 - - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT`` 285 - - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE`` 286 - - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE`` 282 + Note that support of each action depends on the running DAMON operations set 283 + `implementation <sysfs_contexts>`. 284 + 285 + - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``. 286 + Supported by ``vaddr`` and ``fvaddr`` operations set. 287 + - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``. 288 + Supported by ``vaddr`` and ``fvaddr`` operations set. 289 + - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. 290 + Supported by ``vaddr``, ``fvaddr`` and ``paddr`` operations set. 291 + - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. 292 + Supported by ``vaddr`` and ``fvaddr`` operations set. 293 + - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. 294 + Supported by ``vaddr`` and ``fvaddr`` operations set. 287 295 - ``lru_prio``: Prioritize the region on its LRU lists. 296 + Supported by ``paddr`` operations set. 288 297 - ``lru_deprio``: Deprioritize the region on its LRU lists. 289 - - ``stat``: Do nothing but count the statistics 298 + Supported by ``paddr`` operations set. 299 + - ``stat``: Do nothing but count the statistics. 300 + Supported by all operations sets. 290 301 291 302 schemes/<N>/access_pattern/ 292 303 --------------------------- ··· 399 388 echo /having_care_already > 1/memcg_path 400 389 echo N > 1/matching 401 390 402 - Note that filters could be ignored depend on the running DAMON operations set 403 - `implementation <sysfs_contexts>`. 391 + Note that filters are currently supported only when ``paddr`` 392 + `implementation <sysfs_contexts>` is being used. 404 393 405 394 .. _sysfs_schemes_stats: 406 395 ··· 629 618 DAMON will apply to the regions having the target access pattern. The 630 619 supported numbers and their meanings are as below. 631 620 632 - - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED`` 633 - - 1: Call ``madvise()`` for the region with ``MADV_COLD`` 634 - - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT`` 635 - - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE`` 636 - - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE`` 621 + - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED``. Ignored if 622 + ``target`` is ``paddr``. 623 + - 1: Call ``madvise()`` for the region with ``MADV_COLD``. Ignored if 624 + ``target`` is ``paddr``. 625 + - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. 626 + - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. Ignored if 627 + ``target`` is ``paddr``. 628 + - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. Ignored if 629 + ``target`` is ``paddr``. 637 630 - 5: Do nothing but count the statistics 638 631 639 632 Quota