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

Configure Feed

Select the types of activity you want to include in your feed.

Docs/admin-guide/mm/damon/usage: use a list for 'state' sysfs file input commands

There are eight command inputs for 'state' DAMON sysfs file, and those are
verbosely explained in multiple paragraphs. It is not easy to find
explanation of specific command, and getting whole picture of supported
commands. Replace the paragraphs with a list.

Link: https://lkml.kernel.org/r/20231213190338.54146-7-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
e93b81a3 9c8c315d

+21 -22
+21 -22
Documentation/admin-guide/mm/damon/usage.rst
··· 130 130 (``contexts``) exist. 131 131 132 132 Reading ``state`` returns ``on`` if the kdamond is currently running, or 133 - ``off`` if it is not running. Writing ``on`` or ``off`` makes the kdamond be 134 - in the state. 133 + ``off`` if it is not running. 135 134 136 - Writing ``commit`` to the ``state`` file makes kdamond reads the 137 - user inputs in the sysfs files except ``state`` file again. Writing 138 - ``commit_schemes_quota_goals`` to the ``state`` file makes kdamond reads the 139 - DAMON-based operation schemes' :ref:`quota goals <sysfs_schemes_quota_goals>` 140 - of the kdamond. 135 + Users can write below commands for the kdamond to the ``state`` file. 141 136 142 - Writing ``update_schemes_stats`` to ``state`` file updates the 143 - contents of stats files for each DAMON-based operation scheme of the kdamond. 144 - For details of the stats, please refer to :ref:`stats section 145 - <sysfs_schemes_stats>`. 146 - 147 - Writing ``update_schemes_tried_regions`` to ``state`` file updates the 148 - DAMON-based operation scheme action tried regions directory for each 149 - DAMON-based operation scheme of the kdamond. Writing 150 - ``update_schemes_tried_bytes`` to ``state`` file updates only 151 - ``.../tried_regions/total_bytes`` files. Writing 152 - ``clear_schemes_tried_regions`` to ``state`` file clears the DAMON-based 153 - operating scheme action tried regions directory for each DAMON-based operation 154 - scheme of the kdamond. For details of the DAMON-based operation scheme action 155 - tried regions directory, please refer to :ref:`tried_regions section 156 - <sysfs_schemes_tried_regions>`. 137 + - ``on``: Start running. 138 + - ``off``: Stop running. 139 + - ``commit``: Read the user inputs in the sysfs files except ``state`` file 140 + again. 141 + - ``commit_schemes_quota_goals``: Read the DAMON-based operation schemes' 142 + :ref:`quota goals <sysfs_schemes_quota_goals>`. 143 + - ``update_schemes_stats``: Update the contents of stats files for each 144 + DAMON-based operation scheme of the kdamond. For details of the stats, 145 + please refer to :ref:`stats section <sysfs_schemes_stats>`. 146 + - ``update_schemes_tried_regions``: Update the DAMON-based operation scheme 147 + action tried regions directory for each DAMON-based operation scheme of the 148 + kdamond. For details of the DAMON-based operation scheme action tried 149 + regions directory, please refer to 150 + :ref:`tried_regions section <sysfs_schemes_tried_regions>`. 151 + - ``update_schemes_tried_bytes``: Update only ``.../tried_regions/total_bytes`` 152 + files. 153 + - ``clear_schemes_tried_regions``: Clear the DAMON-based operating scheme 154 + action tried regions directory for each DAMON-based operation scheme of the 155 + kdamond. 157 156 158 157 If the state is ``on``, reading ``pid`` shows the pid of the kdamond thread. 159 158