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