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: add intervals_goal directory on the hierarchy

Document DAMON sysfs interface usage for DAMON sampling and aggregation
intervals auto-tuning.

Link: https://lkml.kernel.org/r/20250303221726.484227-9-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
b243d666 e2b23dc6

+29
+25
Documentation/admin-guide/mm/damon/usage.rst
··· 64 64 │ │ │ │ :ref:`0 <sysfs_context>`/avail_operations,operations 65 65 │ │ │ │ │ :ref:`monitoring_attrs <sysfs_monitoring_attrs>`/ 66 66 │ │ │ │ │ │ intervals/sample_us,aggr_us,update_us 67 + │ │ │ │ │ │ │ intervals_goal/access_bp,aggrs,min_sample_us,max_sample_us 67 68 │ │ │ │ │ │ nr_regions/min,max 68 69 │ │ │ │ │ :ref:`targets <sysfs_targets>`/nr_targets 69 70 │ │ │ │ │ │ :ref:`0 <sysfs_target>`/pid_target ··· 133 132 - ``off``: Stop running. 134 133 - ``commit``: Read the user inputs in the sysfs files except ``state`` file 135 134 again. 135 + - ``update_tuned_intervals``: Update the contents of ``sample_us`` and 136 + ``aggr_us`` files of the kdamond with the auto-tuning applied ``sampling 137 + interval`` and ``aggregation interval`` for the files. Please refer to 138 + :ref:`intervals_goal section <damon_usage_sysfs_monitoring_intervals_goal>` 139 + for more details. 136 140 - ``commit_schemes_quota_goals``: Read the DAMON-based operation schemes' 137 141 :ref:`quota goals <sysfs_schemes_quota_goals>`. 138 142 - ``update_schemes_stats``: Update the contents of stats files for each ··· 218 212 219 213 For more details about the intervals and monitoring regions range, please refer 220 214 to the Design document (:doc:`/mm/damon/design`). 215 + 216 + .. _damon_usage_sysfs_monitoring_intervals_goal: 217 + 218 + contexts/<N>/monitoring_attrs/intervals/intervals_goal/ 219 + ------------------------------------------------------- 220 + 221 + Under the ``intervals`` directory, one directory for automated tuning of 222 + ``sample_us`` and ``aggr_us``, namely ``intervals_goal`` directory also exists. 223 + Under the directory, four files for the auto-tuning control, namely 224 + ``access_bp``, ``aggrs``, ``min_sample_us`` and ``max_sample_us`` exist. 225 + Please refer to the :ref:`design document of the feature 226 + <damon_design_monitoring_intervals_autotuning>` for the internal of the tuning 227 + mechanism. Reading and writing the four files under ``intervals_goal`` 228 + directory shows and updates the tuning parameters that described in the 229 + :ref:design doc <damon_design_monitoring_intervals_autotuning>` with the same 230 + names. The tuning starts with the user-set ``sample_us`` and ``aggr_us``. The 231 + tuning-applied current values of the two intervals can be read from the 232 + ``sample_us`` and ``aggr_us`` files after writing ``update_tuned_intervals`` to 233 + the ``state`` file. 221 234 222 235 .. _sysfs_targets: 223 236
+4
Documentation/mm/damon/design.rst
··· 366 366 That is, assumes 4% (20% of 20%) DAMON-observed access events ratio (source) 367 367 to capture 64% (80% multipled by 80%) real access events (outcomes). 368 368 369 + To know how user-space can use this feature via :ref:`DAMON sysfs interface 370 + <sysfs_interface>`, refer to :ref:`intervals_goal <sysfs_scheme>` part of 371 + the documentation. 372 + 369 373 370 374 .. _damon_design_damos: 371 375