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