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