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