1what: /sys/kernel/mm/damon/ 2Date: Mar 2022 3Contact: SeongJae 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: SeongJae 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: SeongJae 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: SeongJae 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 'update_schemes_stats' to 27 the file updates contents of schemes stats files of the 28 kdamond. 29 30What: /sys/kernel/mm/damon/admin/kdamonds/<K>/pid 31Date: Mar 2022 32Contact: SeongJae Park <sj@kernel.org> 33Description: Reading this file returns the pid of the kdamond if it is 34 running. 35 36What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/nr_contexts 37Date: Mar 2022 38Contact: SeongJae Park <sj@kernel.org> 39Description: Writing a number 'N' to this file creates the number of 40 directories for controlling each DAMON context named '0' to 41 'N-1' under the contexts/ directory. 42 43What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/avail_operations 44Date: Apr 2022 45Contact: SeongJae Park <sj@kernel.org> 46Description: Reading this file returns the available monitoring operations 47 sets on the currently running kernel. 48 49What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/operations 50Date: Mar 2022 51Contact: SeongJae Park <sj@kernel.org> 52Description: Writing a keyword for a monitoring operations set ('vaddr' for 53 virtual address spaces monitoring, 'fvaddr' for fixed virtual 54 address ranges monitoring, and 'paddr' for the physical address 55 space monitoring) to this file makes the context to use the 56 operations set. Reading the file returns the keyword for the 57 operations set the context is set to use. 58 59 Note that only the operations sets that listed in 60 'avail_operations' file are valid inputs. 61 62What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/sample_us 63Date: Mar 2022 64Contact: SeongJae Park <sj@kernel.org> 65Description: Writing a value to this file sets the sampling interval of the 66 DAMON context in microseconds as the value. Reading this file 67 returns the value. 68 69What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/aggr_us 70Date: Mar 2022 71Contact: SeongJae Park <sj@kernel.org> 72Description: Writing a value to this file sets the aggregation interval of 73 the DAMON context in microseconds as the value. Reading this 74 file returns the value. 75 76What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/intervals/update_us 77Date: Mar 2022 78Contact: SeongJae Park <sj@kernel.org> 79Description: Writing a value to this file sets the update interval of the 80 DAMON context in microseconds as the value. Reading this file 81 returns the value. 82 83What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/min 84 85WDate: Mar 2022 86Contact: SeongJae Park <sj@kernel.org> 87Description: Writing a value to this file sets the minimum number of 88 monitoring regions of the DAMON context as the value. Reading 89 this file returns the value. 90 91What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/nr_regions/max 92Date: Mar 2022 93Contact: SeongJae Park <sj@kernel.org> 94Description: Writing a value to this file sets the maximum number of 95 monitoring regions of the DAMON context as the value. Reading 96 this file returns the value. 97 98What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/nr_targets 99Date: Mar 2022 100Contact: SeongJae Park <sj@kernel.org> 101Description: Writing a number 'N' to this file creates the number of 102 directories for controlling each DAMON target of the context 103 named '0' to 'N-1' under the contexts/ directory. 104 105What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/pid_target 106Date: Mar 2022 107Contact: SeongJae Park <sj@kernel.org> 108Description: Writing to and reading from this file sets and gets the pid of 109 the target process if the context is for virtual address spaces 110 monitoring, respectively. 111 112What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/nr_regions 113Date: Mar 2022 114Contact: SeongJae Park <sj@kernel.org> 115Description: Writing a number 'N' to this file creates the number of 116 directories for setting each DAMON target memory region of the 117 context named '0' to 'N-1' under the regions/ directory. In 118 case of the virtual address space monitoring, DAMON 119 automatically sets the target memory region based on the target 120 processes' mappings. 121 122What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/start 123Date: Mar 2022 124Contact: SeongJae Park <sj@kernel.org> 125Description: Writing to and reading from this file sets and gets the start 126 address of the monitoring region. 127 128What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/<T>/regions/<R>/end 129Date: Mar 2022 130Contact: SeongJae Park <sj@kernel.org> 131Description: Writing to and reading from this file sets and gets the end 132 address of the monitoring region. 133 134What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/nr_schemes 135Date: Mar 2022 136Contact: SeongJae Park <sj@kernel.org> 137Description: Writing a number 'N' to this file creates the number of 138 directories for controlling each DAMON-based operation scheme 139 of the context named '0' to 'N-1' under the schemes/ directory. 140 141What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/action 142Date: Mar 2022 143Contact: SeongJae Park <sj@kernel.org> 144Description: Writing to and reading from this file sets and gets the action 145 of the scheme. 146 147What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/min 148Date: Mar 2022 149Contact: SeongJae Park <sj@kernel.org> 150Description: Writing to and reading from this file sets and gets the mimimum 151 size of the scheme's target regions in bytes. 152 153What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/sz/max 154Date: Mar 2022 155Contact: SeongJae Park <sj@kernel.org> 156Description: Writing to and reading from this file sets and gets the maximum 157 size of the scheme's target regions in bytes. 158 159What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/min 160Date: Mar 2022 161Contact: SeongJae Park <sj@kernel.org> 162Description: Writing to and reading from this file sets and gets the manimum 163 'nr_accesses' of the scheme's target regions. 164 165What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/nr_accesses/max 166Date: Mar 2022 167Contact: SeongJae Park <sj@kernel.org> 168Description: Writing to and reading from this file sets and gets the maximum 169 'nr_accesses' of the scheme's target regions. 170 171What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/min 172Date: Mar 2022 173Contact: SeongJae Park <sj@kernel.org> 174Description: Writing to and reading from this file sets and gets the minimum 175 'age' of the scheme's target regions. 176 177What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/access_pattern/age/max 178Date: Mar 2022 179Contact: SeongJae Park <sj@kernel.org> 180Description: Writing to and reading from this file sets and gets the maximum 181 'age' of the scheme's target regions. 182 183What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/ms 184Date: Mar 2022 185Contact: SeongJae Park <sj@kernel.org> 186Description: Writing to and reading from this file sets and gets the time 187 quota of the scheme in milliseconds. 188 189What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/bytes 190Date: Mar 2022 191Contact: SeongJae Park <sj@kernel.org> 192Description: Writing to and reading from this file sets and gets the size 193 quota of the scheme in bytes. 194 195What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/reset_interval_ms 196Date: Mar 2022 197Contact: SeongJae Park <sj@kernel.org> 198Description: Writing to and reading from this file sets and gets the quotas 199 charge reset interval of the scheme in milliseconds. 200 201What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/sz_permil 202Date: Mar 2022 203Contact: SeongJae Park <sj@kernel.org> 204Description: Writing to and reading from this file sets and gets the 205 under-quota limit regions prioritization weight for 'size' in 206 permil. 207 208What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/nr_accesses_permil 209Date: Mar 2022 210Contact: SeongJae Park <sj@kernel.org> 211Description: Writing to and reading from this file sets and gets the 212 under-quota limit regions prioritization weight for 213 'nr_accesses' in permil. 214 215What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/quotas/weights/age_permil 216Date: Mar 2022 217Contact: SeongJae Park <sj@kernel.org> 218Description: Writing to and reading from this file sets and gets the 219 under-quota limit regions prioritization weight for 'age' in 220 permil. 221 222What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/metric 223Date: Mar 2022 224Contact: SeongJae Park <sj@kernel.org> 225Description: Writing to and reading from this file sets and gets the metric 226 of the watermarks for the scheme. The writable/readable 227 keywords for this file are 'none' for disabling the watermarks 228 feature, or 'free_mem_rate' for the system's global free memory 229 rate in permil. 230 231What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/interval_us 232Date: Mar 2022 233Contact: SeongJae Park <sj@kernel.org> 234Description: Writing to and reading from this file sets and gets the metric 235 check interval of the watermarks for the scheme in 236 microseconds. 237 238What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/high 239Date: Mar 2022 240Contact: SeongJae Park <sj@kernel.org> 241Description: Writing to and reading from this file sets and gets the high 242 watermark of the scheme in permil. 243 244What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/mid 245Date: Mar 2022 246Contact: SeongJae Park <sj@kernel.org> 247Description: Writing to and reading from this file sets and gets the mid 248 watermark of the scheme in permil. 249 250What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/watermarks/low 251Date: Mar 2022 252Contact: SeongJae Park <sj@kernel.org> 253Description: Writing to and reading from this file sets and gets the low 254 watermark of the scheme in permil. 255 256What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_tried 257Date: Mar 2022 258Contact: SeongJae Park <sj@kernel.org> 259Description: Reading this file returns the number of regions that the action 260 of the scheme has tried to be applied. 261 262What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_tried 263Date: Mar 2022 264Contact: SeongJae Park <sj@kernel.org> 265Description: Reading this file returns the total size of regions that the 266 action of the scheme has tried to be applied in bytes. 267 268What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/nr_applied 269Date: Mar 2022 270Contact: SeongJae Park <sj@kernel.org> 271Description: Reading this file returns the number of regions that the action 272 of the scheme has successfully applied. 273 274What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/sz_applied 275Date: Mar 2022 276Contact: SeongJae Park <sj@kernel.org> 277Description: Reading this file returns the total size of regions that the 278 action of the scheme has successfully applied in bytes. 279 280What: /sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/schemes/<S>/stats/qt_exceeds 281Date: Mar 2022 282Contact: SeongJae Park <sj@kernel.org> 283Description: Reading this file returns the number of the exceed events of 284 the scheme's quotas. 285