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 the ways for getting monitoring results

The recommended ways for getting DAMON monitoring results are using
tried_regions sysfs directory for partial snapshot of the results, and
DAMON tracepoint for full record of the results. However, the
tried_regions sysfs directory usage has not sufficiently updated on some
sections of the DAMON usage document. Update those.

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

authored by

SeongJae Park and committed by
Andrew Morton
ff71f26f 67c34f6c

+12 -8
+12 -8
Documentation/admin-guide/mm/damon/usage.rst
··· 19 19 features by reading from and writing to special sysfs files. Therefore, 20 20 you can write and use your personalized DAMON sysfs wrapper programs that 21 21 reads/writes the sysfs files instead of you. The `DAMON user space tool 22 - <https://github.com/awslabs/damo>`_ is one example of such programs. Note 23 - that this interface provides only simple :ref:`statistics <damos_stats>` for 24 - the monitoring results. For detailed monitoring results, DAMON provides a 25 - :ref:`tracepoint <tracepoint>`. 22 + <https://github.com/awslabs/damo>`_ is one example of such programs. 26 23 - *debugfs interface. (DEPRECATED!)* 27 24 :ref:`This <debugfs_interface>` is almost identical to :ref:`sysfs interface 28 25 <sysfs_interface>`. This is deprecated, so users should move to the ··· 418 421 ``clear_schemes_tried_regions``, is written to the relevant 419 422 ``kdamonds/<N>/state`` file. 420 423 424 + The expected usage of this directory is investigations of schemes' behaviors, 425 + and query-like efficient data access monitoring results retrievals. For the 426 + latter use case, in particular, users can set the ``action`` as ``stat`` and 427 + set the ``access pattern`` as their interested pattern that they want to query. 428 + 421 429 tried_regions/<N>/ 422 430 ------------------ 423 431 ··· 773 771 Tracepoint for Monitoring Results 774 772 ================================= 775 773 776 - DAMON provides the monitoring results via a tracepoint, 777 - ``damon:damon_aggregated``. While the monitoring is turned on, you could 778 - record the tracepoint events and show results using tracepoint supporting tools 779 - like ``perf``. For example:: 774 + Users can get the monitoring results via the :ref:`tried_regions 775 + <sysfs_schemes_tried_regions>` or a tracepoint, ``damon:damon_aggregated``. 776 + While the tried regions directory is useful for getting a snapshot, the 777 + tracepoint is useful for getting a full record of the results. While the 778 + monitoring is turned on, you could record the tracepoint events and show 779 + results using tracepoint supporting tools like ``perf``. For example:: 780 780 781 781 # echo on > monitor_on 782 782 # perf record -e damon:damon_aggregated &