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: document obsolete_target file

Document the newly added obsolete_target DAMON sysfs file.

Link: https://lkml.kernel.org/r/20251023012535.69625-5-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Bijan Tabatabai <bijan311@gmail.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

SeongJae Park and committed by
Andrew Morton
e06469cd e35afdf2

+10 -3
+10 -3
Documentation/admin-guide/mm/damon/usage.rst
··· 67 67 │ │ │ │ │ │ │ intervals_goal/access_bp,aggrs,min_sample_us,max_sample_us 68 68 │ │ │ │ │ │ nr_regions/min,max 69 69 │ │ │ │ │ :ref:`targets <sysfs_targets>`/nr_targets 70 - │ │ │ │ │ │ :ref:`0 <sysfs_target>`/pid_target 70 + │ │ │ │ │ │ :ref:`0 <sysfs_target>`/pid_target,obsolete_target 71 71 │ │ │ │ │ │ │ :ref:`regions <sysfs_regions>`/nr_regions 72 72 │ │ │ │ │ │ │ │ :ref:`0 <sysfs_region>`/start,end 73 73 │ │ │ │ │ │ │ │ ... ··· 265 265 targets/<N>/ 266 266 ------------ 267 267 268 - In each target directory, one file (``pid_target``) and one directory 269 - (``regions``) exist. 268 + In each target directory, two files (``pid_target`` and ``obsolete_target``) 269 + and one directory (``regions``) exist. 270 270 271 271 If you wrote ``vaddr`` to the ``contexts/<N>/operations``, each target should 272 272 be a process. You can specify the process to DAMON by writing the pid of the 273 273 process to the ``pid_target`` file. 274 + 275 + Users can selectively remove targets in the middle of the targets array by 276 + writing non-zero value to ``obsolete_target`` file and committing it (writing 277 + ``commit`` to ``state`` file). DAMON will remove the matching targets from its 278 + internal targets array. Users are responsible to construct target directories 279 + again, so that those correctly represent the changed internal targets array. 280 + 274 281 275 282 .. _sysfs_regions: 276 283