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