1what: /sys/kernel/mm/damon/ 2Date: Mar 2022 3Contact: SeongJae Park <[email protected]> 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: SeongJae Park <[email protected]> 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: SeongJae Park <[email protected]> 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: SeongJae Park <[email protected]> 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. 40 41What: /sys/kernel/mm/damon/admin/kdamonds/<K>/pid 42Date: Mar 2022 43Contact: SeongJae Park <[email protected]> 44Description: Reading this file returns the pid of the kdamond if it is 45 running. 46 47What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/nr_contexts 48Date: Mar 2022 49Contact: SeongJae Park <[email protected]> 50Description: 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. 53 54What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/avail_operations 55Date: Apr 2022 56Contact: SeongJae Park <[email protected]> 57Description: Reading this file returns the available monitoring operations 58 sets on the currently running kernel. 59 60What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/operations 61Date: Mar 2022 62Contact: SeongJae Park <[email protected]> 63Description: 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. 69 70 Note that only the operations sets that listed in 71 'avail_operations' file are valid inputs. 72 73What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/sample_us 74Date: Mar 2022 75Contact: SeongJae Park <[email protected]> 76Description: Writing a value to this file sets the sampling interval of the 77 DAMON context in microseconds as the value. Reading this file 78 returns the value. 79 80What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/aggr_us 81Date: Mar 2022 82Contact: SeongJae Park <[email protected]> 83Description: 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. 86 87What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/update_us 88Date: Mar 2022 89Contact: SeongJae Park <[email protected]> 90Description: Writing a value to this file sets the update interval of the 91 DAMON context in microseconds as the value. Reading this file 92 returns the value. 93 94What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/min 95 96WDate: Mar 2022 97Contact: SeongJae Park <[email protected]> 98Description: 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. 101 102What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/max 103Date: Mar 2022 104Contact: SeongJae Park <[email protected]> 105Description: 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. 108 109What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/nr_targets 110Date: Mar 2022 111Contact: SeongJae Park <[email protected]> 112Description: 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. 115 116What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/pid_target 117Date: Mar 2022 118Contact: SeongJae Park <[email protected]> 119Description: 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. 122 123What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/nr_regions 124Date: Mar 2022 125Contact: SeongJae Park <[email protected]> 126Description: 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 131 processes' mappings. 132 133What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/start 134Date: Mar 2022 135Contact: SeongJae Park <[email protected]> 136Description: Writing to and reading from this file sets and gets the start 137 address of the monitoring region. 138 139What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/end 140Date: Mar 2022 141Contact: SeongJae Park <[email protected]> 142Description: Writing to and reading from this file sets and gets the end 143 address of the monitoring region. 144 145What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/nr_schemes 146Date: Mar 2022 147Contact: SeongJae Park <[email protected]> 148Description: 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. 151 152What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/action 153Date: Mar 2022 154Contact: SeongJae Park <[email protected]> 155Description: Writing to and reading from this file sets and gets the action 156 of the scheme. 157 158What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/target_nid 159Date: Jun 2024 160Contact: SeongJae Park <[email protected]> 161Description: Action's target NUMA node id. Supported by only relevant 162 actions. 163 164What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/apply_interval_us 165Date: Sep 2023 166Contact: SeongJae Park <[email protected]> 167Description: Writing a value to this file sets the action apply interval of 168 the scheme in microseconds. Reading this file returns the 169 value. 170 171What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/min 172Date: Mar 2022 173Contact: SeongJae Park <[email protected]> 174Description: Writing to and reading from this file sets and gets the minimum 175 size of the scheme's target regions in bytes. 176 177What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/max 178Date: Mar 2022 179Contact: SeongJae Park <[email protected]> 180Description: Writing to and reading from this file sets and gets the maximum 181 size of the scheme's target regions in bytes. 182 183What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/min 184Date: Mar 2022 185Contact: SeongJae Park <[email protected]> 186Description: Writing to and reading from this file sets and gets the manimum 187 'nr_accesses' of the scheme's target regions. 188 189What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/max 190Date: Mar 2022 191Contact: SeongJae Park <[email protected]> 192Description: Writing to and reading from this file sets and gets the maximum 193 'nr_accesses' of the scheme's target regions. 194 195What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/min 196Date: Mar 2022 197Contact: SeongJae Park <[email protected]> 198Description: Writing to and reading from this file sets and gets the minimum 199 'age' of the scheme's target regions. 200 201What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/max 202Date: Mar 2022 203Contact: SeongJae Park <[email protected]> 204Description: Writing to and reading from this file sets and gets the maximum 205 'age' of the scheme's target regions. 206 207What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/ms 208Date: Mar 2022 209Contact: SeongJae Park <[email protected]> 210Description: Writing to and reading from this file sets and gets the time 211 quota of the scheme in milliseconds. 212 213What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/bytes 214Date: Mar 2022 215Contact: SeongJae Park <[email protected]> 216Description: Writing to and reading from this file sets and gets the size 217 quota of the scheme in bytes. 218 219What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/effective_bytes 220Date: Feb 2024 221Contact: SeongJae Park <[email protected]> 222Description: Reading from this file gets the effective size quota of the 223 scheme in bytes, which adjusted for the time quota and goals. 224 225What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/reset_interval_ms 226Date: Mar 2022 227Contact: SeongJae Park <[email protected]> 228Description: Writing to and reading from this file sets and gets the quotas 229 charge reset interval of the scheme in milliseconds. 230 231What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/nr_goals 232Date: Nov 2023 233Contact: SeongJae Park <[email protected]> 234Description: 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. 237 238What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/target_metric 239Date: Feb 2024 240Contact: SeongJae Park <[email protected]> 241Description: Writing to and reading from this file sets and gets the quota 242 auto-tuning goal metric. 243 244What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/target_value 245Date: Nov 2023 246Contact: SeongJae Park <[email protected]> 247Description: Writing to and reading from this file sets and gets the target 248 value of the goal metric. 249 250What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/goals/<G>/current_value 251Date: Nov 2023 252Contact: SeongJae Park <[email protected]> 253Description: Writing to and reading from this file sets and gets the current 254 value of the goal metric. 255 256What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/sz_permil 257Date: Mar 2022 258Contact: SeongJae Park <[email protected]> 259Description: Writing to and reading from this file sets and gets the 260 under-quota limit regions prioritization weight for 'size' in 261 permil. 262 263What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/nr_accesses_permil 264Date: Mar 2022 265Contact: SeongJae Park <[email protected]> 266Description: Writing to and reading from this file sets and gets the 267 under-quota limit regions prioritization weight for 268 'nr_accesses' in permil. 269 270What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/age_permil 271Date: Mar 2022 272Contact: SeongJae Park <[email protected]> 273Description: Writing to and reading from this file sets and gets the 274 under-quota limit regions prioritization weight for 'age' in 275 permil. 276 277What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/metric 278Date: Mar 2022 279Contact: SeongJae Park <[email protected]> 280Description: 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 284 rate in permil. 285 286What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/interval_us 287Date: Mar 2022 288Contact: SeongJae Park <[email protected]> 289Description: Writing to and reading from this file sets and gets the metric 290 check interval of the watermarks for the scheme in 291 microseconds. 292 293What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/high 294Date: Mar 2022 295Contact: SeongJae Park <[email protected]> 296Description: Writing to and reading from this file sets and gets the high 297 watermark of the scheme in permil. 298 299What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/mid 300Date: Mar 2022 301Contact: SeongJae Park <[email protected]> 302Description: Writing to and reading from this file sets and gets the mid 303 watermark of the scheme in permil. 304 305What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/low 306Date: Mar 2022 307Contact: SeongJae Park <[email protected]> 308Description: Writing to and reading from this file sets and gets the low 309 watermark of the scheme in permil. 310 311What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/nr_filters 312Date: Dec 2022 313Contact: SeongJae Park <[email protected]> 314Description: 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. 317 318What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/type 319Date: Dec 2022 320Contact: SeongJae Park <[email protected]> 321Description: 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. 326 327What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/memcg_path 328Date: Dec 2022 329Contact: SeongJae Park <[email protected]> 330Description: 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. 333 334What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/addr_start 335Date: Jul 2023 336Contact: SeongJae Park <[email protected]> 337Description: 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. 340 341What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/addr_end 342Date: Jul 2023 343Contact: SeongJae Park <[email protected]> 344Description: 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. 347 348What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/target_idx 349Date: Dec 2022 350Contact: SeongJae Park <[email protected]> 351Description: 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. 354 355What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/matching 356Date: Dec 2022 357Contact: SeongJae Park <[email protected]> 358Description: Writing 'Y' or 'N' to this file sets whether the filter is for 359 the memory of the 'type', or all except the 'type'. 360 361What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/filters/<F>/allow 362Date: Jan 2025 363Contact: SeongJae Park <[email protected]> 364Description: Writing 'Y' or 'N' to this file sets whether to allow or reject 365 applying the scheme's action to the memory that satisfies the 366 'type' and the 'matching' of the directory. 367 368What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_tried 369Date: Mar 2022 370Contact: SeongJae Park <[email protected]> 371Description: Reading this file returns the number of regions that the action 372 of the scheme has tried to be applied. 373 374What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_tried 375Date: Mar 2022 376Contact: SeongJae Park <[email protected]> 377Description: Reading this file returns the total size of regions that the 378 action of the scheme has tried to be applied in bytes. 379 380What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_applied 381Date: Mar 2022 382Contact: SeongJae Park <[email protected]> 383Description: Reading this file returns the number of regions that the action 384 of the scheme has successfully applied. 385 386What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_applied 387Date: Mar 2022 388Contact: SeongJae Park <[email protected]> 389Description: Reading this file returns the total size of regions that the 390 action of the scheme has successfully applied in bytes. 391 392What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_ops_filter_passed 393Date: Dec 2024 394Contact: SeongJae Park <[email protected]> 395Description: Reading this file returns the total size of memory that passed 396 DAMON operations layer-handled filters of the scheme in bytes. 397 398What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/qt_exceeds 399Date: Mar 2022 400Contact: SeongJae Park <[email protected]> 401Description: Reading this file returns the number of the exceed events of 402 the scheme's quotas. 403 404What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/total_bytes 405Date: Jul 2023 406Contact: SeongJae Park <[email protected]> 407Description: Reading this file returns the total amount of memory that 408 corresponding DAMON-based Operation Scheme's action has tried 409 to be applied. 410 411What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/start 412Date: Oct 2022 413Contact: SeongJae Park <[email protected]> 414Description: Reading this file returns the start address of a memory region 415 that corresponding DAMON-based Operation Scheme's action has 416 tried to be applied. 417 418What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/end 419Date: Oct 2022 420Contact: SeongJae Park <[email protected]> 421Description: Reading this file returns the end address of a memory region 422 that corresponding DAMON-based Operation Scheme's action has 423 tried to be applied. 424 425What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/nr_accesses 426Date: Oct 2022 427Contact: SeongJae Park <[email protected]> 428Description: Reading this file returns the 'nr_accesses' of a memory region 429 that corresponding DAMON-based Operation Scheme's action has 430 tried to be applied. 431 432What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/age 433Date: Oct 2022 434Contact: SeongJae Park <[email protected]> 435Description: Reading this file returns the 'age' of a memory region that 436 corresponding DAMON-based Operation Scheme's action has tried 437 to be applied. 438 439What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/tried_regions/<R>/sz_filter_passed 440Date: Dec 2024 441Contact: SeongJae Park <[email protected]> 442Description: Reading this file returns the size of the memory in the region 443 that passed DAMON operations layer-handled filters of the 444 scheme in bytes. 445