1 what: /sys/kernel/mm/damon/
3 Contact: SeongJae Park <sj@kernel.org>
4 Description: 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.
8 What: /sys/kernel/mm/damon/admin/
10 Contact: SeongJae Park <sj@kernel.org>
11 Description: Interface for privileged users of DAMON. Contains files for
12 controlling DAMON that aimed to be used by privileged users.
14 What: /sys/kernel/mm/damon/admin/kdamonds/nr_kdamonds
16 Contact: SeongJae Park <sj@kernel.org>
17 Description: 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.
21 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/state
23 Contact: SeongJae Park <sj@kernel.org>
24 Description: 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.
41 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/pid
43 Contact: SeongJae Park <sj@kernel.org>
44 Description: Reading this file returns the pid of the kdamond if it is
47 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/nr_contexts
49 Contact: SeongJae Park <sj@kernel.org>
50 Description: Writing a number 'N' to this file creates the number of
51 directories for controlling each DAMON context named '0' to
52 'N-1' under the contexts/ directory.
54 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/avail_operations
56 Contact: SeongJae Park <sj@kernel.org>
57 Description: Reading this file returns the available monitoring operations
58 sets on the currently running kernel.
60 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/operations
62 Contact: SeongJae Park <sj@kernel.org>
63 Description: Writing a keyword for a monitoring operations set ('vaddr' for
64 virtual address spaces monitoring, 'fvaddr' for fixed virtual
65 address ranges monitoring, and 'paddr' for the physical address
66 space monitoring) to this file makes the context to use the
67 operations set. Reading the file returns the keyword for the
68 operations set the context is set to use.
70 Note that only the operations sets that listed in
71 'avail_operations' file are valid inputs.
73 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/sample_us
75 Contact: SeongJae Park <sj@kernel.org>
76 Description: Writing a value to this file sets the sampling interval of the
77 DAMON context in microseconds as the value. Reading this file
80 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/aggr_us
82 Contact: SeongJae Park <sj@kernel.org>
83 Description: Writing a value to this file sets the aggregation interval of
84 the DAMON context in microseconds as the value. Reading this
85 file returns the value.
87 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/update_us
89 Contact: SeongJae Park <sj@kernel.org>
90 Description: Writing a value to this file sets the update interval of the
91 DAMON context in microseconds as the value. Reading this file
94 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/min
97 Contact: SeongJae Park <sj@kernel.org>
98 Description: Writing a value to this file sets the minimum number of
99 monitoring regions of the DAMON context as the value. Reading
100 this file returns the value.
102 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/max
104 Contact: SeongJae Park <sj@kernel.org>
105 Description: Writing a value to this file sets the maximum number of
106 monitoring regions of the DAMON context as the value. Reading
107 this file returns the value.
109 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/nr_targets
111 Contact: SeongJae Park <sj@kernel.org>
112 Description: Writing a number 'N' to this file creates the number of
113 directories for controlling each DAMON target of the context
114 named '0' to 'N-1' under the contexts/ directory.
116 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/pid_target
118 Contact: SeongJae Park <sj@kernel.org>
119 Description: Writing to and reading from this file sets and gets the pid of
120 the target process if the context is for virtual address spaces
121 monitoring, respectively.
123 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/nr_regions
125 Contact: SeongJae Park <sj@kernel.org>
126 Description: Writing a number 'N' to this file creates the number of
127 directories for setting each DAMON target memory region of the
128 context named '0' to 'N-1' under the regions/ directory. In
129 case of the virtual address space monitoring, DAMON
130 automatically sets the target memory region based on the target
133 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/start
135 Contact: SeongJae Park <sj@kernel.org>
136 Description: Writing to and reading from this file sets and gets the start
137 address of the monitoring region.
139 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/end
141 Contact: SeongJae Park <sj@kernel.org>
142 Description: Writing to and reading from this file sets and gets the end
143 address of the monitoring region.
145 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/nr_schemes
147 Contact: SeongJae Park <sj@kernel.org>
148 Description: Writing a number 'N' to this file creates the number of
149 directories for controlling each DAMON-based operation scheme
150 of the context named '0' to 'N-1' under the schemes/ directory.
152 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/action
154 Contact: SeongJae Park <sj@kernel.org>
155 Description: Writing to and reading from this file sets and gets the action
158 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/target_nid
160 Contact: SeongJae Park <sj@kernel.org>
161 Description: Action's target NUMA node id. Supported by only relevant
164 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/apply_interval_us
166 Contact: SeongJae Park <sj@kernel.org>
167 Description: Writing a value to this file sets the action apply interval of
168 the scheme in microseconds. Reading this file returns the
171 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/min
173 Contact: SeongJae Park <sj@kernel.org>
174 Description: Writing to and reading from this file sets and gets the minimum
175 size of the scheme's target regions in bytes.
177 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/max
179 Contact: SeongJae Park <sj@kernel.org>
180 Description: Writing to and reading from this file sets and gets the maximum
181 size of the scheme's target regions in bytes.
183 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/min
185 Contact: SeongJae Park <sj@kernel.org>
186 Description: Writing to and reading from this file sets and gets the manimum
187 'nr_accesses' of the scheme's target regions.
189 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/max
191 Contact: SeongJae Park <sj@kernel.org>
192 Description: Writing to and reading from this file sets and gets the maximum
193 'nr_accesses' of the scheme's target regions.
195 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/min
197 Contact: SeongJae Park <sj@kernel.org>
198 Description: Writing to and reading from this file sets and gets the minimum
199 'age' of the scheme's target regions.
201 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/max
203 Contact: SeongJae Park <sj@kernel.org>
204 Description: Writing to and reading from this file sets and gets the maximum
205 'age' of the scheme's target regions.
207 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/ms
209 Contact: SeongJae Park <sj@kernel.org>
210 Description: Writing to and reading from this file sets and gets the time
211 quota of the scheme in milliseconds.
213 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/bytes
215 Contact: SeongJae Park <sj@kernel.org>
216 Description: Writing to and reading from this file sets and gets the size
217 quota of the scheme in bytes.
219 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/effective_bytes
221 Contact: SeongJae Park <sj@kernel.org>
222 Description: Reading from this file gets the effective size quota of the
223 scheme in bytes, which adjusted for the time quota and goals.
225 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/reset_interval_ms
227 Contact: SeongJae Park <sj@kernel.org>
228 Description: Writing to and reading from this file sets and gets the quotas
229 charge reset interval of the scheme in milliseconds.
231 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/nr_goals
233 Contact: SeongJae Park <sj@kernel.org>
234 Description: Writing a number 'N' to this file creates the number of
235 directories for setting automatic tuning of the scheme's
236 aggressiveness named '0' to 'N-1' under the goals/ directory.
238 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/target_metric
240 Contact: SeongJae Park <sj@kernel.org>
241 Description: Writing to and reading from this file sets and gets the quota
242 auto-tuning goal metric.
244 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/target_value
246 Contact: SeongJae Park <sj@kernel.org>
247 Description: Writing to and reading from this file sets and gets the target
248 value of the goal metric.
250 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/current_value
252 Contact: SeongJae Park <sj@kernel.org>
253 Description: Writing to and reading from this file sets and gets the current
254 value of the goal metric.
256 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/sz_permil
258 Contact: SeongJae Park <sj@kernel.org>
259 Description: Writing to and reading from this file sets and gets the
260 under-quota limit regions prioritization weight for 'size' in
263 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/nr_accesses_permil
265 Contact: SeongJae Park <sj@kernel.org>
266 Description: Writing to and reading from this file sets and gets the
267 under-quota limit regions prioritization weight for
268 'nr_accesses' in permil.
270 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/age_permil
272 Contact: SeongJae Park <sj@kernel.org>
273 Description: Writing to and reading from this file sets and gets the
274 under-quota limit regions prioritization weight for 'age' in
277 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/metric
279 Contact: SeongJae Park <sj@kernel.org>
280 Description: Writing to and reading from this file sets and gets the metric
281 of the watermarks for the scheme. The writable/readable
282 keywords for this file are 'none' for disabling the watermarks
283 feature, or 'free_mem_rate' for the system's global free memory
286 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/interval_us
288 Contact: SeongJae Park <sj@kernel.org>
289 Description: Writing to and reading from this file sets and gets the metric
290 check interval of the watermarks for the scheme in
293 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/high
295 Contact: SeongJae Park <sj@kernel.org>
296 Description: Writing to and reading from this file sets and gets the high
297 watermark of the scheme in permil.
299 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/mid
301 Contact: SeongJae Park <sj@kernel.org>
302 Description: Writing to and reading from this file sets and gets the mid
303 watermark of the scheme in permil.
305 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/low
307 Contact: SeongJae Park <sj@kernel.org>
308 Description: Writing to and reading from this file sets and gets the low
309 watermark of the scheme in permil.
311 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/nr_filters
313 Contact: SeongJae Park <sj@kernel.org>
314 Description: Writing a number 'N' to this file creates the number of
315 directories for setting filters of the scheme named '0' to
316 'N-1' under the filters/ directory.
318 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/type
320 Contact: SeongJae Park <sj@kernel.org>
321 Description: Writing to and reading from this file sets and gets the type of
322 the memory of the interest. 'anon' for anonymous pages,
323 'memcg' for specific memory cgroup, 'young' for young pages,
324 'addr' for address range (an open-ended interval), or 'target'
325 for DAMON monitoring target can be written and read.
327 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/memcg_path
329 Contact: SeongJae Park <sj@kernel.org>
330 Description: If 'memcg' is written to the 'type' file, writing to and
331 reading from this file sets and gets the path to the memory
332 cgroup of the interest.
334 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/addr_start
336 Contact: SeongJae Park <sj@kernel.org>
337 Description: If 'addr' is written to the 'type' file, writing to or reading
338 from this file sets or gets the start address of the address
339 range for the filter.
341 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/addr_end
343 Contact: SeongJae Park <sj@kernel.org>
344 Description: If 'addr' is written to the 'type' file, writing to or reading
345 from this file sets or gets the end address of the address
346 range for the filter.
348 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/target_idx
350 Contact: SeongJae Park <sj@kernel.org>
351 Description: If 'target' is written to the 'type' file, writing to or
352 reading from this file sets or gets the index of the DAMON
353 monitoring target of the interest.
355 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/matching
357 Contact: SeongJae Park <sj@kernel.org>
358 Description: Writing 'Y' or 'N' to this file sets whether to filter out
359 pages that do or do not match to the 'type' and 'memcg_path',
360 respectively. Filter out means the action of the scheme will
363 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_tried
365 Contact: SeongJae Park <sj@kernel.org>
366 Description: Reading this file returns the number of regions that the action
367 of the scheme has tried to be applied.
369 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_tried
371 Contact: SeongJae Park <sj@kernel.org>
372 Description: Reading this file returns the total size of regions that the
373 action of the scheme has tried to be applied in bytes.
375 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_applied
377 Contact: SeongJae Park <sj@kernel.org>
378 Description: Reading this file returns the number of regions that the action
379 of the scheme has successfully applied.
381 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_applied
383 Contact: SeongJae Park <sj@kernel.org>
384 Description: Reading this file returns the total size of regions that the
385 action of the scheme has successfully applied in bytes.
387 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/qt_exceeds
389 Contact: SeongJae Park <sj@kernel.org>
390 Description: Reading this file returns the number of the exceed events of
393 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/total_bytes
395 Contact: SeongJae Park <sj@kernel.org>
396 Description: Reading this file returns the total amount of memory that
397 corresponding DAMON-based Operation Scheme's action has tried
400 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/start
402 Contact: SeongJae Park <sj@kernel.org>
403 Description: Reading this file returns the start address of a memory region
404 that corresponding DAMON-based Operation Scheme's action has
407 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/end
409 Contact: SeongJae Park <sj@kernel.org>
410 Description: Reading this file returns the end address of a memory region
411 that corresponding DAMON-based Operation Scheme's action has
414 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/nr_accesses
416 Contact: SeongJae Park <sj@kernel.org>
417 Description: Reading this file returns the 'nr_accesses' of a memory region
418 that corresponding DAMON-based Operation Scheme's action has
421 What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/age
423 Contact: SeongJae Park <sj@kernel.org>
424 Description: Reading this file returns the 'age' of a memory region that
425 corresponding DAMON-based Operation Scheme's action has tried