summaryrefslogtreecommitdiff
path: root/Documentation/ABI/testing/sysfs-kernel-mm-damon
blob: 2744f21b5a6b360c25758a48abf12ac609949fc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
what:		/sys/kernel/mm/damon/
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Interface for Data Access MONitoring (DAMON).  Contains files
		for controlling DAMON.  For more details on DAMON itself,
		please refer to Documentation/admin-guide/mm/damon/index.rst.

What:		/sys/kernel/mm/damon/admin/
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Interface for privileged users of DAMON.  Contains files for
		controlling DAMON that aimed to be used by privileged users.

What:		/sys/kernel/mm/damon/admin/kdamonds/nr_kdamonds
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a number 'N' to this file creates the number of
		directories for controlling each DAMON worker thread (kdamond)
		named '0' to 'N-1' under the kdamonds/ directory.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/state
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing 'on' or 'off' to this file makes the kdamond starts or
		stops, respectively.  Reading the file returns the keywords
		based on the current status.  Writing 'commit' to this file
		makes the kdamond reads the user inputs in the sysfs files
		except 'state' again.  Writing 'update_schemes_stats' to the
		file updates contents of schemes stats files of the kdamond.
		Writing 'update_schemes_tried_regions' to the file updates
		contents of 'tried_regions' directory of every scheme directory
		of this kdamond.  Writing 'clear_schemes_tried_regions' to the
		file removes contents of the 'tried_regions' directory.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/pid
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the pid of the kdamond if it is
		running.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/nr_contexts
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a number 'N' to this file creates the number of
		directories for controlling each DAMON context named '0' to
		'N-1' under the contexts/ directory.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/avail_operations
Date:		Apr 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the available monitoring operations
		sets on the currently running kernel.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/operations
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a keyword for a monitoring operations set ('vaddr' for
		virtual address spaces monitoring, 'fvaddr' for fixed virtual
		address ranges monitoring, and 'paddr' for the physical address
		space monitoring) to this file makes the context to use the
		operations set.  Reading the file returns the keyword for the
		operations set the context is set to use.

		Note that only the operations sets that listed in
		'avail_operations' file are valid inputs.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/sample_us
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a value to this file sets the sampling interval of the
		DAMON context in microseconds as the value.  Reading this file
		returns the value.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/aggr_us
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a value to this file sets the aggregation interval of
		the DAMON context in microseconds as the value.  Reading this
		file returns the value.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/update_us
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a value to this file sets the update interval of the
		DAMON context in microseconds as the value.  Reading this file
		returns the value.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/min

WDate:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a value to this file sets the minimum number of
		monitoring regions of the DAMON context as the value.  Reading
		this file returns the value.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/max
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a value to this file sets the maximum number of
		monitoring regions of the DAMON context as the value.  Reading
		this file returns the value.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/nr_targets
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a number 'N' to this file creates the number of
		directories for controlling each DAMON target of the context
		named '0' to 'N-1' under the contexts/ directory.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/pid_target
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the pid of
		the target process if the context is for virtual address spaces
		monitoring, respectively.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/nr_regions
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a number 'N' to this file creates the number of
		directories for setting each DAMON target memory region of the
		context named '0' to 'N-1' under the regions/ directory.  In
		case of the virtual address space monitoring, DAMON
		automatically sets the target memory region based on the target
		processes' mappings.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/start
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the start
		address of the monitoring region.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/end
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the end
		address of the monitoring region.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/nr_schemes
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a number 'N' to this file creates the number of
		directories for controlling each DAMON-based operation scheme
		of the context named '0' to 'N-1' under the schemes/ directory.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/action
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the action
		of the scheme.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/min
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the mimimum
		size of the scheme's target regions in bytes.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/max
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the maximum
		size of the scheme's target regions in bytes.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/min
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the manimum
		'nr_accesses' of the scheme's target regions.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/max
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the maximum
		'nr_accesses' of the scheme's target regions.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/min
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the minimum
		'age' of the scheme's target regions.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/max
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the maximum
		'age' of the scheme's target regions.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/ms
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the time
		quota of the scheme in milliseconds.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/bytes
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the size
		quota of the scheme in bytes.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/reset_interval_ms
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the quotas
		charge reset interval of the scheme in milliseconds.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/sz_permil
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the
		under-quota limit regions prioritization weight for 'size' in
		permil.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/nr_accesses_permil
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the
		under-quota limit regions prioritization weight for
		'nr_accesses' in permil.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/age_permil
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the
		under-quota limit regions prioritization weight for 'age' in
		permil.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/metric
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the metric
		of the watermarks for the scheme.  The writable/readable
		keywords for this file are 'none' for disabling the watermarks
		feature, or 'free_mem_rate' for the system's global free memory
		rate in permil.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/interval_us
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the metric
		check interval of the watermarks for the scheme in
		microseconds.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/high
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the high
		watermark of the scheme in permil.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/mid
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the mid
		watermark of the scheme in permil.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/low
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the low
		watermark of the scheme in permil.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/nr_filters
Date:		Dec 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing a number 'N' to this file creates the number of
		directories for setting filters of the scheme named '0' to
		'N-1' under the filters/ directory.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/type
Date:		Dec 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing to and reading from this file sets and gets the type of
		the memory of the interest.  'anon' for anonymous pages, or
		'memcg' for specific memory cgroup can be written and read.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/memcg_path
Date:		Dec 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	If 'memcg' is written to the 'type' file, writing to and
		reading from this file sets and gets the path to the memory
		cgroup of the interest.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/matching
Date:		Dec 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Writing 'Y' or 'N' to this file sets whether to filter out
		pages that do or do not match to the 'type' and 'memcg_path',
		respectively.  Filter out means the action of the scheme will
		not be applied to.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_tried
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the number of regions that the action
		of the scheme has tried to be applied.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_tried
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the total size of regions that the
		action of the scheme has tried to be applied in bytes.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_applied
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the number of regions that the action
		of the scheme has successfully applied.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_applied
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the total size of regions that the
		action of the scheme has successfully applied in bytes.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/qt_exceeds
Date:		Mar 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the number of the exceed events of
		the scheme's quotas.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/start
Date:		Oct 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the start address of a memory region
		that corresponding DAMON-based Operation Scheme's action has
		tried to be applied.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/end
Date:		Oct 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the end address of a memory region
		that corresponding DAMON-based Operation Scheme's action has
		tried to be applied.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/nr_accesses
Date:		Oct 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the 'nr_accesses' of a memory region
		that corresponding DAMON-based Operation Scheme's action has
		tried to be applied.

What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/age
Date:		Oct 2022
Contact:	SeongJae Park <sj@kernel.org>
Description:	Reading this file returns the 'age' of a memory region that
		corresponding DAMON-based Operation Scheme's action has tried
		to be applied.