xref: /linux/Documentation/ABI/testing/sysfs-kernel-mm-damon (revision 570f7e331f5febb30f1384817463c7e42b65ca7d)
1what:		/sys/kernel/mm/damon/
2Date:		Mar 2022
3Contact:	SJ Park <sj@kernel.org>
4Description:	Interface for Data Access MONitoring (DAMON).  Contains files
5		for controlling DAMON.  For more details on DAMON itself,
6		please refer to Documentation/admin-guide/mm/damon/index.rst.
7
8What:		/sys/kernel/mm/damon/admin/
9Date:		Mar 2022
10Contact:	SJ Park <sj@kernel.org>
11Description:	Interface for privileged users of DAMON.  Contains files for
12		controlling DAMON that aimed to be used by privileged users.
13
14What:		/sys/kernel/mm/damon/admin/kdamonds/nr_kdamonds
15Date:		Mar 2022
16Contact:	SJ Park <sj@kernel.org>
17Description:	Writing a number 'N' to this file creates the number of
18		directories for controlling each DAMON worker thread (kdamond)
19		named '0' to 'N-1' under the kdamonds/ directory.
20
21What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/state
22Date:		Mar 2022
23Contact:	SJ Park <sj@kernel.org>
24Description:	Writing 'on' or 'off' to this file makes the kdamond starts or
25		stops, respectively.  Reading the file returns the keywords
26		based on the current status.  Writing 'commit' to this file
27		makes the kdamond reads the user inputs in the sysfs files
28		except 'state' again.  Writing 'commit_schemes_quota_goals' to
29		this file makes the kdamond reads the quota goal files again.
30		Writing 'update_schemes_stats' to the file updates contents of
31		schemes stats files of the kdamond.  Writing
32		'update_schemes_tried_regions' to the file updates contents of
33		'tried_regions' directory of every scheme directory of this
34		kdamond.  Writing 'update_schemes_tried_bytes' to the file
35		updates only '.../tried_regions/total_bytes' files of this
36		kdamond.  Writing 'clear_schemes_tried_regions' to the file
37		removes contents of the 'tried_regions' directory.  Writing
38		'update_schemes_effective_quotas' to the file updates
39		'.../quotas/effective_bytes' files of this kdamond.  Writing
40		'update_tuned_intervals' to the file updates 'sample_us' and
41		'aggr_us' files under 'monitoring_attrs/intervals' with the
42		auto-tuned sampling and aggregation intervals.
43
44What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/pid
45Date:		Mar 2022
46Contact:	SJ Park <sj@kernel.org>
47Description:	Reading this file returns the pid of the kdamond if it is
48		running.
49
50What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/refresh_ms
51Date:		Jul 2025
52Contact:	SJ Park <sj@kernel.org>
53Description:	Writing a value to this file sets the time interval for
54		automatic DAMON status file contents update.  Writing '0'
55		disables the update.  Reading this file returns the value.
56
57What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/nr_contexts
58Date:		Mar 2022
59Contact:	SJ Park <sj@kernel.org>
60Description:	Writing a number 'N' to this file creates the number of
61		directories for controlling each DAMON context named '0' to
62		'N-1' under the contexts/ directory.
63
64What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/avail_operations
65Date:		Apr 2022
66Contact:	SJ Park <sj@kernel.org>
67Description:	Reading this file returns the available monitoring operations
68		sets on the currently running kernel.
69
70What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/operations
71Date:		Mar 2022
72Contact:	SJ Park <sj@kernel.org>
73Description:	Writing a keyword for a monitoring operations set ('vaddr' for
74		virtual address spaces monitoring, 'fvaddr' for fixed virtual
75		address ranges monitoring, and 'paddr' for the physical address
76		space monitoring) to this file makes the context to use the
77		operations set.  Reading the file returns the keyword for the
78		operations set the context is set to use.
79
80		Note that only the operations sets that listed in
81		'avail_operations' file are valid inputs.
82
83What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/addr_unit
84Date:		Aug 2025
85Contact:	SJ Park <sj@kernel.org>
86Description:	Writing an integer to this file sets the 'address unit'
87		parameter of the given operations set of the context.  Reading
88		the file returns the last-written 'address unit' value.
89
90What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/pause
91Date:		Mar 2026
92Contact:	SJ Park <sj@kernel.org>
93Description:	Writing a boolean keyword to this file sets the 'pause' request
94		parameter for the context.  Reading the file returns the
95		last-written 'pause' value.
96
97What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/sample_us
98Date:		Mar 2022
99Contact:	SJ Park <sj@kernel.org>
100Description:	Writing a value to this file sets the sampling interval of the
101		DAMON context in microseconds as the value.  Reading this file
102		returns the value.
103
104What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/aggr_us
105Date:		Mar 2022
106Contact:	SJ Park <sj@kernel.org>
107Description:	Writing a value to this file sets the aggregation interval of
108		the DAMON context in microseconds as the value.  Reading this
109		file returns the value.
110
111What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/update_us
112Date:		Mar 2022
113Contact:	SJ Park <sj@kernel.org>
114Description:	Writing a value to this file sets the update interval of the
115		DAMON context in microseconds as the value.  Reading this file
116		returns the value.
117
118What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/intervals_goal/access_bp
119Date:		Feb 2025
120Contact:	SJ Park <sj@kernel.org>
121Description:	Writing a value to this file sets the monitoring intervals
122		auto-tuning target DAMON-observed access events ratio within
123		the given time interval (aggrs in same directory), in bp
124		(1/10,000).  Reading this file returns the value.
125
126What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/intervals_goal/aggrs
127Date:		Feb 2025
128Contact:	SJ Park <sj@kernel.org>
129Description:	Writing a value to this file sets the time interval to achieve
130		the monitoring intervals auto-tuning target DAMON-observed
131		access events ratio (access_bp in same directory) within.
132		Reading this file returns the value.
133
134What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/intervals_goal/min_sample_us
135Date:		Feb 2025
136Contact:	SJ Park <sj@kernel.org>
137Description:	Writing a value to this file sets the minimum value of
138		auto-tuned sampling interval in microseconds.  Reading this
139		file returns the value.
140
141What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/intervals_goal/max_sample_us
142Date:		Feb 2025
143Contact:	SJ Park <sj@kernel.org>
144Description:	Writing a value to this file sets the maximum value of
145		auto-tuned sampling interval in microseconds.  Reading this
146		file returns the value.
147
148What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/min
149
150Date:		Mar 2022
151Contact:	SJ Park <sj@kernel.org>
152Description:	Writing a value to this file sets the minimum number of
153		monitoring regions of the DAMON context as the value.  Reading
154		this file returns the value.
155
156What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/max
157Date:		Mar 2022
158Contact:	SJ Park <sj@kernel.org>
159Description:	Writing a value to this file sets the maximum number of
160		monitoring regions of the DAMON context as the value.  Reading
161		this file returns the value.
162
163What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/nr_probes
164Date:		May 2026
165Contact:	SJ Park <sj@kernel.org>
166Description:	Writing a number 'N' to this file creates the number of
167		directories for each DAMON probe named '0' to 'N-1' under the
168		probes/ directory.
169
170What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/weight
171Date:		Jul 2026
172Contact:	SJ Park <sj@kernel.org>
173Description:	Writing to and reading from this file sets and gets the
174		per-probe attribute weight.
175
176What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/filters/nr_filters
177Date:		May 2026
178Contact:	SJ Park <sj@kernel.org>
179Description:	Writing a number 'N' to this file creates the number of
180		directories for each DAMON probe filter named '0' to 'N-1'
181		under the filters/ directory.
182
183What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/filters/<F>/type
184Date:		May 2026
185Contact:	SJ Park <sj@kernel.org>
186Description:	Writing to and reading from this file sets and gets the type of
187		the memory of the interest.
188
189What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/filters/<F>/path
190Date:		May 2026
191Contact:	SJ Park <sj@kernel.org>
192Description:	If 'memcg' is written to the 'type' file, writing to and
193		reading from this file sets and gets the path to the memory
194		cgroup of the interest.
195
196What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/filters/<F>/matching
197Date:		May 2026
198Contact:	SJ Park <sj@kernel.org>
199Description:	Writing 'Y' or 'N' to this file sets whether the filter is for
200		the memory of the 'type', or all except the 'type'.
201
202What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/filters/<F>/allow
203Date:		May 2026
204Contact:	SJ Park <sj@kernel.org>
205Description:	Writing 'Y' or 'N' to this file sets whether to allow or reject
206		hitting the probe for the memory that satisfies the 'type' and
207		the 'matching' of the directory.
208
209What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/nr_targets
210Date:		Mar 2022
211Contact:	SJ Park <sj@kernel.org>
212Description:	Writing a number 'N' to this file creates the number of
213		directories for controlling each DAMON target of the context
214		named '0' to 'N-1' under the contexts/ directory.
215
216What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/pid_target
217Date:		Mar 2022
218Contact:	SJ Park <sj@kernel.org>
219Description:	Writing to and reading from this file sets and gets the pid of
220		the target process if the context is for virtual address spaces
221		monitoring, respectively.
222
223What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/obsolete_target
224Date:		Oct 2025
225Contact:	SJ Park <sj@kernel.org>
226Description:	Writing to and reading from this file sets and gets the
227		obsoleteness of the matching parameters commit destination
228		target.
229
230What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/nr_regions
231Date:		Mar 2022
232Contact:	SJ Park <sj@kernel.org>
233Description:	Writing a number 'N' to this file creates the number of
234		directories for setting each DAMON target memory region of the
235		context named '0' to 'N-1' under the regions/ directory.  In
236		case of the virtual address space monitoring, DAMON
237		automatically sets the target memory region based on the target
238		processes' mappings.
239
240What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/start
241Date:		Mar 2022
242Contact:	SJ Park <sj@kernel.org>
243Description:	Writing to and reading from this file sets and gets the start
244		address of the monitoring region.
245
246What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/end
247Date:		Mar 2022
248Contact:	SJ Park <sj@kernel.org>
249Description:	Writing to and reading from this file sets and gets the end
250		address of the monitoring region.
251
252What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/nr_schemes
253Date:		Mar 2022
254Contact:	SJ Park <sj@kernel.org>
255Description:	Writing a number 'N' to this file creates the number of
256		directories for controlling each DAMON-based operation scheme
257		of the context named '0' to 'N-1' under the schemes/ directory.
258
259What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/action
260Date:		Mar 2022
261Contact:	SJ Park <sj@kernel.org>
262Description:	Writing to and reading from this file sets and gets the action
263		of the scheme.
264
265What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/target_nid
266Date:		Jun 2024
267Contact:	SJ Park <sj@kernel.org>
268Description:	Action's target NUMA node id.  Supported by only relevant
269		actions.
270
271What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/apply_interval_us
272Date:		Sep 2023
273Contact:	SJ Park <sj@kernel.org>
274Description:	Writing a value to this file sets the action apply interval of
275		the scheme in microseconds.  Reading this file returns the
276		value.
277
278What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/min
279Date:		Mar 2022
280Contact:	SJ Park <sj@kernel.org>
281Description:	Writing to and reading from this file sets and gets the minimum
282		size of the scheme's target regions in bytes.
283
284What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/max
285Date:		Mar 2022
286Contact:	SJ Park <sj@kernel.org>
287Description:	Writing to and reading from this file sets and gets the maximum
288		size of the scheme's target regions in bytes.
289
290What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/min
291Date:		Mar 2022
292Contact:	SJ Park <sj@kernel.org>
293Description:	Writing to and reading from this file sets and gets the minimum
294		'nr_accesses' of the scheme's target regions.
295
296What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/max
297Date:		Mar 2022
298Contact:	SJ Park <sj@kernel.org>
299Description:	Writing to and reading from this file sets and gets the maximum
300		'nr_accesses' of the scheme's target regions.
301
302What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/min
303Date:		Mar 2022
304Contact:	SJ Park <sj@kernel.org>
305Description:	Writing to and reading from this file sets and gets the minimum
306		'age' of the scheme's target regions.
307
308What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/max
309Date:		Mar 2022
310Contact:	SJ Park <sj@kernel.org>
311Description:	Writing to and reading from this file sets and gets the maximum
312		'age' of the scheme's target regions.
313
314What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/ms
315Date:		Mar 2022
316Contact:	SJ Park <sj@kernel.org>
317Description:	Writing to and reading from this file sets and gets the time
318		quota of the scheme in milliseconds.
319
320What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/bytes
321Date:		Mar 2022
322Contact:	SJ Park <sj@kernel.org>
323Description:	Writing to and reading from this file sets and gets the size
324		quota of the scheme in bytes.
325
326What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/effective_bytes
327Date:		Feb 2024
328Contact:	SJ Park <sj@kernel.org>
329Description:	Reading from this file gets the effective size quota of the
330		scheme in bytes, which adjusted for the time quota and goals.
331
332What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/reset_interval_ms
333Date:		Mar 2022
334Contact:	SJ Park <sj@kernel.org>
335Description:	Writing to and reading from this file sets and gets the quotas
336		charge reset interval of the scheme in milliseconds.
337
338What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/nr_goals
339Date:		Nov 2023
340Contact:	SJ Park <sj@kernel.org>
341Description:	Writing a number 'N' to this file creates the number of
342		directories for setting automatic tuning of the scheme's
343		aggressiveness named '0' to 'N-1' under the goals/ directory.
344
345What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/target_metric
346Date:		Feb 2024
347Contact:	SJ Park <sj@kernel.org>
348Description:	Writing to and reading from this file sets and gets the quota
349		auto-tuning goal metric.
350
351What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/target_value
352Date:		Nov 2023
353Contact:	SJ Park <sj@kernel.org>
354Description:	Writing to and reading from this file sets and gets the target
355		value of the goal metric.
356
357What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/current_value
358Date:		Nov 2023
359Contact:	SJ Park <sj@kernel.org>
360Description:	Writing to and reading from this file sets and gets the current
361		value of the goal metric.
362
363What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/nid
364Date:		Apr 2025
365Contact:	SJ Park <sj@kernel.org>
366Description:	Writing to and reading from this file sets and gets the nid
367		parameter of the goal.
368
369What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/path
370Date:		Oct 2025
371Contact:	SJ Park <sj@kernel.org>
372Description:	Writing to and reading from this file sets and gets the path
373		parameter of the goal.
374
375What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goal_tuner
376Date:		Mar 2026
377Contact:	SJ Park <sj@kernel.org>
378Description:	Writing to and reading from this file sets and gets the
379		goal-based effective quota auto-tuning algorithm to use.
380
381What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/fail_charge_num
382Date:		Mar 2026
383Contact:	SJ Park <sj@kernel.org>
384Description:	Writing to and reading from this file sets and gets the
385		action-failed memory quota charging ratio numerator.
386
387What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/fail_charge_denom
388Date:		Mar 2026
389Contact:	SJ Park <sj@kernel.org>
390Description:	Writing to and reading from this file sets and gets the
391		action-failed memory quota charging ratio denominator.
392
393What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/sz_permil
394Date:		Mar 2022
395Contact:	SJ Park <sj@kernel.org>
396Description:	Writing to and reading from this file sets and gets the
397		under-quota limit regions prioritization weight for 'size' in
398		permil.
399
400What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/nr_accesses_permil
401Date:		Mar 2022
402Contact:	SJ Park <sj@kernel.org>
403Description:	Writing to and reading from this file sets and gets the
404		under-quota limit regions prioritization weight for
405		'nr_accesses' in permil.
406
407What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/age_permil
408Date:		Mar 2022
409Contact:	SJ Park <sj@kernel.org>
410Description:	Writing to and reading from this file sets and gets the
411		under-quota limit regions prioritization weight for 'age' in
412		permil.
413
414What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/metric
415Date:		Mar 2022
416Contact:	SJ Park <sj@kernel.org>
417Description:	Writing to and reading from this file sets and gets the metric
418		of the watermarks for the scheme.  The writable/readable
419		keywords for this file are 'none' for disabling the watermarks
420		feature, or 'free_mem_rate' for the system's global free memory
421		rate in permil.
422
423What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/interval_us
424Date:		Mar 2022
425Contact:	SJ Park <sj@kernel.org>
426Description:	Writing to and reading from this file sets and gets the metric
427		check interval of the watermarks for the scheme in
428		microseconds.
429
430What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/high
431Date:		Mar 2022
432Contact:	SJ Park <sj@kernel.org>
433Description:	Writing to and reading from this file sets and gets the high
434		watermark of the scheme in permil.
435
436What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/mid
437Date:		Mar 2022
438Contact:	SJ Park <sj@kernel.org>
439Description:	Writing to and reading from this file sets and gets the mid
440		watermark of the scheme in permil.
441
442What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/low
443Date:		Mar 2022
444Contact:	SJ Park <sj@kernel.org>
445Description:	Writing to and reading from this file sets and gets the low
446		watermark of the scheme in permil.
447
448What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters
449Date:		Feb 2025
450Contact:	SJ Park <sj@kernel.org>
451Description:	Directory for DAMON core layer-handled DAMOS filters.
452
453What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/nr_filters
454Date:		Feb 2025
455Contact:	SJ Park <sj@kernel.org>
456Description:	Writing a number 'N' to this file creates the number of
457		directories for setting filters of the scheme named '0' to
458		'N-1' under the core_filters/ directory.
459
460What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/<F>/type
461Date:		Feb 2025
462Contact:	SJ Park <sj@kernel.org>
463Description:	Writing to and reading from this file sets and gets the type of
464		the memory of the interest.  'anon' for anonymous pages,
465		'memcg' for specific memory cgroup, 'young' for young pages,
466		'addr' for address range (an open-ended interval), or 'target'
467		for DAMON monitoring target can be written and read.
468
469What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/<F>/memcg_path
470Date:		Feb 2025
471Contact:	SJ Park <sj@kernel.org>
472Description:	If 'memcg' is written to the 'type' file, writing to and
473		reading from this file sets and gets the path to the memory
474		cgroup of the interest.
475
476What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/<F>/addr_start
477Date:		Feb 2025
478Contact:	SJ Park <sj@kernel.org>
479Description:	If 'addr' is written to the 'type' file, writing to or reading
480		from this file sets or gets the start address of the address
481		range for the filter.
482
483What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/<F>/addr_end
484Date:		Feb 2025
485Contact:	SJ Park <sj@kernel.org>
486Description:	If 'addr' is written to the 'type' file, writing to or reading
487		from this file sets or gets the end address of the address
488		range for the filter.
489
490What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/<F>/min
491Date:		Feb 2025
492Contact:	SJ Park <sj@kernel.org>
493Description:	If 'hugepage_size' is written to the 'type' file, writing to
494		or reading from this file sets or gets the minimum size of the
495		hugepage for the filter.
496
497What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/<F>/max
498Date:		Feb 2025
499Contact:	SJ Park <sj@kernel.org>
500Description:	If 'hugepage_size' is written to the 'type' file, writing to
501		or reading from this file sets or gets the maximum size of the
502		hugepage for the filter.
503
504What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/<F>/damon_target_idx
505Date:		Feb 2025
506Contact:	SJ Park <sj@kernel.org>
507Description:	If 'target' is written to the 'type' file, writing to or
508		reading from this file sets or gets the index of the DAMON
509		monitoring target of the interest.
510
511What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/<F>/matching
512Date:		Feb 2025
513Contact:	SJ Park <sj@kernel.org>
514Description:	Writing 'Y' or 'N' to this file sets whether the filter is for
515		the memory of the 'type', or all except the 'type'.
516
517What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters/<F>/allow
518Date:		Feb 2025
519Contact:	SJ Park <sj@kernel.org>
520Description:	Writing 'Y' or 'N' to this file sets whether to allow or reject
521		applying the scheme's action to the memory that satisfies the
522		'type' and the 'matching' of the directory.
523
524What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/ops_filters
525Date:		Feb 2025
526Contact:	SJ Park <sj@kernel.org>
527Description:	Directory for DAMON operations set layer-handled DAMOS filters.
528		Files under this directory works same to those of
529		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/core_filters
530		directory.
531
532What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters
533Date:		Dec 2022
534Contact:	SJ Park <sj@kernel.org>
535Description:	Directory for DAMOS filters.  Files under this directory works
536		same to those of
537		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/{core,ops}_filters
538		directory.  This is deprecated.  Use the core_filters and
539		ops_filters instead.
540
541What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/dests/nr_dests
542Date:		Jul 2025
543Contact:	SJ Park <sj@kernel.org>
544Description:	Writing a number 'N' to this file creates the number of
545		directories for setting action destinations of the scheme named
546		'0' to 'N-1' under the dests/ directory.
547
548What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/dests/<D>/id
549Date:		Jul 2025
550Contact:	SJ Park <sj@kernel.org>
551Description:	Writing to and reading from this file sets and gets the id of
552		the DAMOS action destination.  For DAMOS_MIGRATE_{HOT,COLD}
553		actions, the destination node's node id can be written and
554		read.
555
556What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/dests/<D>/weight
557Date:		Jul 2025
558Contact:	SJ Park <sj@kernel.org>
559Description:	Writing to and reading from this file sets and gets the weight
560		of the DAMOS action destination to select as the destination of
561		each action among the destinations.
562
563What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_tried
564Date:		Mar 2022
565Contact:	SJ Park <sj@kernel.org>
566Description:	Reading this file returns the number of regions that the action
567		of the scheme has tried to be applied.
568
569What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_tried
570Date:		Mar 2022
571Contact:	SJ Park <sj@kernel.org>
572Description:	Reading this file returns the total size of regions that the
573		action of the scheme has tried to be applied in bytes.
574
575What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_applied
576Date:		Mar 2022
577Contact:	SJ Park <sj@kernel.org>
578Description:	Reading this file returns the number of regions that the action
579		of the scheme has successfully applied.
580
581What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_applied
582Date:		Mar 2022
583Contact:	SJ Park <sj@kernel.org>
584Description:	Reading this file returns the total size of regions that the
585		action of the scheme has successfully applied in bytes.
586
587What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_ops_filter_passed
588Date:		Dec 2024
589Contact:	SJ Park <sj@kernel.org>
590Description:	Reading this file returns the total size of memory that passed
591		DAMON operations layer-handled filters of the scheme in bytes.
592
593What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/qt_exceeds
594Date:		Mar 2022
595Contact:	SJ Park <sj@kernel.org>
596Description:	Reading this file returns the number of the exceed events of
597		the scheme's quotas.
598
599What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_snapshots
600Date:		Dec 2025
601Contact:	SJ Park <sj@kernel.org>
602Description:	Reading this file returns the total number of DAMON snapshots
603		that the scheme has tried to be applied.
604
605What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/max_nr_snapshots
606Date:		Dec 2025
607Contact:	SJ Park <sj@kernel.org>
608Description:	Writing a number to this file sets the upper limit of
609		nr_snapshots that deactivates the scheme when the limit is
610		reached or exceeded.
611
612What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/total_bytes
613Date:		Jul 2023
614Contact:	SJ Park <sj@kernel.org>
615Description:	Reading this file returns the total amount of memory that
616		corresponding DAMON-based Operation Scheme's action has tried
617		to be applied.
618
619What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/start
620Date:		Oct 2022
621Contact:	SJ Park <sj@kernel.org>
622Description:	Reading this file returns the start address of a memory region
623		that corresponding DAMON-based Operation Scheme's action has
624		tried to be applied.
625
626What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/end
627Date:		Oct 2022
628Contact:	SJ Park <sj@kernel.org>
629Description:	Reading this file returns the end address of a memory region
630		that corresponding DAMON-based Operation Scheme's action has
631		tried to be applied.
632
633What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/nr_accesses
634Date:		Oct 2022
635Contact:	SJ Park <sj@kernel.org>
636Description:	Reading this file returns the 'nr_accesses' of a memory region
637		that corresponding DAMON-based Operation Scheme's action has
638		tried to be applied.
639
640What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/age
641Date:		Oct 2022
642Contact:	SJ Park <sj@kernel.org>
643Description:	Reading this file returns the 'age' of a memory region that
644		corresponding DAMON-based Operation Scheme's action has tried
645		to be applied.
646
647What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/sz_filter_passed
648Date:		Dec 2024
649Contact:	SJ Park <sj@kernel.org>
650Description:	Reading this file returns the size of the memory in the region
651		that passed DAMON operations layer-handled filters of the
652		scheme in bytes.
653
654What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/probes/
655Date:		May 2026
656Contact:	SJ Park <sj@kernel.org>
657Description:	Directory for DAMON data-attribute monitoring probes of the
658		region.
659
660What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/probes/<P>/hits
661Date:		May 2026
662Contact:	SJ Park <sj@kernel.org>
663Description:	Reading this file returns the number of data-attribute
664		monitoring probe-hit positive samples of the region.
665