1{
2  "Attributes": [
3    {
4      "Name": "LowCapacityCPUs",
5      "Controller": "cpuset",
6      "File": "background/cpus"
7    },
8    {
9      "Name": "HighCapacityCPUs",
10      "Controller": "cpuset",
11      "File": "foreground/cpus"
12    },
13    {
14      "Name": "MaxCapacityCPUs",
15      "Controller": "cpuset",
16      "File": "top-app/cpus"
17    },
18    {
19      "Name": "MemLimit",
20      "Controller": "memory",
21      "File": "memory.limit_in_bytes"
22    },
23    {
24      "Name": "MemSoftLimit",
25      "Controller": "memory",
26      "File": "memory.soft_limit_in_bytes"
27    },
28    {
29      "Name": "MemSwappiness",
30      "Controller": "memory",
31      "File": "memory.swappiness"
32    },
33    {
34      "Name": "UClampMin",
35      "Controller": "cpu",
36      "File": "cpu.uclamp.min"
37    },
38    {
39      "Name": "UClampMax",
40      "Controller": "cpu",
41      "File": "cpu.uclamp.max"
42    },
43    {
44      "Name": "UClampLatencySensitive",
45      "Controller": "cpu",
46      "File": "cpu.uclamp.latency_sensitive"
47    },
48    {
49      "Name": "FreezerState",
50      "Controller": "freezer",
51      "File": "cgroup.freeze"
52    }
53  ],
54
55  "Profiles": [
56    {
57      "Name": "HighEnergySaving",
58      "Actions": [
59        {
60          "Name": "JoinCgroup",
61          "Params":
62          {
63            "Controller": "cpu",
64            "Path": "background"
65          }
66        }
67      ]
68    },
69    {
70      "Name": "Frozen",
71      "Actions": [
72        {
73          "Name": "SetAttribute",
74          "Params":
75          {
76            "Name": "FreezerState",
77            "Value": "1"
78          }
79        }
80      ]
81    },
82    {
83      "Name": "Unfrozen",
84      "Actions": [
85        {
86          "Name": "SetAttribute",
87          "Params":
88          {
89            "Name": "FreezerState",
90            "Value": "0"
91          }
92        }
93      ]
94    },
95    {
96      "Name": "NormalPerformance",
97      "Actions": [
98        {
99          "Name": "JoinCgroup",
100          "Params":
101          {
102            "Controller": "cpu",
103            "Path": "system"
104          }
105        }
106      ]
107    },
108    {
109      "Name": "ServicePerformance",
110      "Actions": [
111        {
112          "Name": "JoinCgroup",
113          "Params":
114          {
115            "Controller": "cpu",
116            "Path": "system-background"
117          }
118        }
119      ]
120    },
121    {
122      "Name": "HighPerformance",
123      "Actions": [
124        {
125          "Name": "JoinCgroup",
126          "Params":
127          {
128            "Controller": "cpu",
129            "Path": "foreground"
130          }
131        }
132      ]
133    },
134    {
135      "Name": "MaxPerformance",
136      "Actions": [
137        {
138          "Name": "JoinCgroup",
139          "Params":
140          {
141            "Controller": "cpu",
142            "Path": "top-app"
143          }
144        }
145      ]
146    },
147    {
148      "Name": "RealtimePerformance",
149      "Actions": [
150        {
151          "Name": "JoinCgroup",
152          "Params":
153          {
154            "Controller": "cpu",
155            "Path": "rt"
156          }
157        }
158      ]
159    },
160    {
161      "Name": "CameraServicePerformance",
162      "Actions": [
163        {
164          "Name": "JoinCgroup",
165          "Params":
166          {
167            "Controller": "cpu",
168            "Path": "camera-daemon"
169          }
170        }
171      ]
172    },
173    {
174      "Name": "NNApiHALPerformance",
175      "Actions": [
176        {
177          "Name": "JoinCgroup",
178          "Params":
179          {
180            "Controller": "cpu",
181            "Path": "nnapi-hal"
182          }
183        }
184      ]
185    },
186    {
187      "Name": "Dex2oatPerformance",
188      "Actions": [
189        {
190          "Name": "JoinCgroup",
191          "Params":
192          {
193            "Controller": "cpu",
194            "Path": "dex2oat"
195          }
196        }
197      ]
198    },
199    {
200      "Name": "CpuPolicySpread",
201      "Actions": [
202        {
203          "Name": "SetAttribute",
204          "Params":
205          {
206            "Name": "UClampLatencySensitive",
207            "Value": "1"
208          }
209        }
210      ]
211    },
212    {
213      "Name": "CpuPolicyPack",
214      "Actions": [
215        {
216          "Name": "SetAttribute",
217          "Params":
218          {
219            "Name": "UClampLatencySensitive",
220            "Value": "0"
221          }
222        }
223      ]
224    },
225
226    {
227      "Name": "VrKernelCapacity",
228      "Actions": [
229        {
230          "Name": "JoinCgroup",
231          "Params":
232          {
233            "Controller": "cpuset",
234            "Path": ""
235          }
236        }
237      ]
238    },
239    {
240      "Name": "VrServiceCapacityLow",
241      "Actions": [
242        {
243          "Name": "JoinCgroup",
244          "Params":
245          {
246            "Controller": "cpuset",
247            "Path": "system/background"
248          }
249        }
250      ]
251    },
252    {
253      "Name": "VrServiceCapacityNormal",
254      "Actions": [
255        {
256          "Name": "JoinCgroup",
257          "Params":
258          {
259            "Controller": "cpuset",
260            "Path": "system"
261          }
262        }
263      ]
264    },
265    {
266      "Name": "VrServiceCapacityHigh",
267      "Actions": [
268        {
269          "Name": "JoinCgroup",
270          "Params":
271          {
272            "Controller": "cpuset",
273            "Path": "system/performance"
274          }
275        }
276      ]
277    },
278    {
279      "Name": "VrProcessCapacityLow",
280      "Actions": [
281        {
282          "Name": "JoinCgroup",
283          "Params":
284          {
285            "Controller": "cpuset",
286            "Path": "application/background"
287          }
288        }
289      ]
290    },
291    {
292      "Name": "VrProcessCapacityNormal",
293      "Actions": [
294        {
295          "Name": "JoinCgroup",
296          "Params":
297          {
298            "Controller": "cpuset",
299            "Path": "application"
300          }
301        }
302      ]
303    },
304    {
305      "Name": "VrProcessCapacityHigh",
306      "Actions": [
307        {
308          "Name": "JoinCgroup",
309          "Params":
310          {
311            "Controller": "cpuset",
312            "Path": "application/performance"
313          }
314        }
315      ]
316    },
317
318    {
319      "Name": "ProcessCapacityLow",
320      "Actions": [
321        {
322          "Name": "JoinCgroup",
323          "Params":
324          {
325            "Controller": "cpuset",
326            "Path": "background"
327          }
328        }
329      ]
330    },
331    {
332      "Name": "ProcessCapacityNormal",
333      "Actions": [
334        {
335          "Name": "JoinCgroup",
336          "Params":
337          {
338            "Controller": "cpuset",
339            "Path": ""
340          }
341        }
342      ]
343    },
344    {
345      "Name": "ProcessCapacityHigh",
346      "Actions": [
347        {
348          "Name": "JoinCgroup",
349          "Params":
350          {
351            "Controller": "cpuset",
352            "Path": "foreground"
353          }
354        }
355      ]
356    },
357    {
358      "Name": "ProcessCapacityMax",
359      "Actions": [
360        {
361          "Name": "JoinCgroup",
362          "Params":
363          {
364            "Controller": "cpuset",
365            "Path": "top-app"
366          }
367        }
368      ]
369    },
370
371    {
372      "Name": "ServiceCapacityLow",
373      "Actions": [
374        {
375          "Name": "JoinCgroup",
376          "Params":
377          {
378            "Controller": "cpuset",
379            "Path": "system-background"
380          }
381        }
382      ]
383    },
384    {
385      "Name": "ServiceCapacityRestricted",
386      "Actions": [
387        {
388          "Name": "JoinCgroup",
389          "Params":
390          {
391            "Controller": "cpuset",
392            "Path": "restricted"
393          }
394        }
395      ]
396    },
397
398    {
399      "Name": "CameraServiceCapacity",
400      "Actions": [
401        {
402          "Name": "JoinCgroup",
403          "Params":
404          {
405            "Controller": "cpuset",
406            "Path": "camera-daemon"
407          }
408        }
409      ]
410    },
411
412    {
413      "Name": "LowIoPriority",
414      "Actions": [
415        {
416          "Name": "JoinCgroup",
417          "Params":
418          {
419            "Controller": "blkio",
420            "Path": "background"
421          }
422        }
423      ]
424    },
425    {
426      "Name": "NormalIoPriority",
427      "Actions": [
428        {
429          "Name": "JoinCgroup",
430          "Params":
431          {
432            "Controller": "blkio",
433            "Path": ""
434          }
435        }
436      ]
437    },
438    {
439      "Name": "HighIoPriority",
440      "Actions": [
441        {
442          "Name": "JoinCgroup",
443          "Params":
444          {
445            "Controller": "blkio",
446            "Path": ""
447          }
448        }
449      ]
450    },
451    {
452      "Name": "MaxIoPriority",
453      "Actions": [
454        {
455          "Name": "JoinCgroup",
456          "Params":
457          {
458            "Controller": "blkio",
459            "Path": ""
460          }
461        }
462      ]
463    },
464
465    {
466      "Name": "TimerSlackHigh",
467      "Actions": [
468        {
469          "Name": "SetTimerSlack",
470          "Params":
471          {
472            "Slack": "40000000"
473          }
474        }
475      ]
476    },
477    {
478      "Name": "TimerSlackNormal",
479      "Actions": [
480        {
481          "Name": "SetTimerSlack",
482          "Params":
483          {
484            "Slack": "50000"
485          }
486        }
487      ]
488    },
489
490    {
491      "Name": "SFMainPolicy",
492      "Actions": [
493        {
494          "Name": "JoinCgroup",
495          "Params":
496          {
497            "Controller": "cpuset",
498            "Path": "system-background"
499          }
500        }
501      ]
502    },
503    {
504      "Name": "SFRenderEnginePolicy",
505      "Actions": [
506        {
507          "Name": "JoinCgroup",
508          "Params":
509          {
510            "Controller": "cpuset",
511            "Path": "system-background"
512          }
513        }
514      ]
515    },
516
517    {
518      "Name": "PerfBoost",
519      "Actions": [
520        {
521          "Name": "SetClamps",
522          "Params":
523          {
524            "Boost": "50%",
525            "Clamp": "0"
526          }
527        }
528      ]
529    },
530    {
531      "Name": "PerfClamp",
532      "Actions": [
533        {
534          "Name": "SetClamps",
535          "Params":
536          {
537            "Boost": "0",
538            "Clamp": "30%"
539          }
540        }
541      ]
542    },
543
544    {
545      "Name": "LowMemoryUsage",
546      "Actions": [
547        {
548          "Name": "SetAttribute",
549          "Params":
550          {
551            "Name": "MemSoftLimit",
552            "Value": "16MB"
553          }
554        },
555        {
556          "Name": "SetAttribute",
557          "Params":
558          {
559            "Name": "MemSwappiness",
560            "Value": "150"
561
562          }
563        }
564      ]
565    },
566    {
567      "Name": "HighMemoryUsage",
568      "Actions": [
569        {
570          "Name": "SetAttribute",
571          "Params":
572          {
573            "Name": "MemSoftLimit",
574            "Value": "512MB"
575          }
576        },
577        {
578          "Name": "SetAttribute",
579          "Params":
580          {
581            "Name": "MemSwappiness",
582            "Value": "100"
583          }
584        }
585      ]
586    },
587    {
588      "Name": "SystemMemoryProcess",
589      "Actions": [
590        {
591          "Name": "JoinCgroup",
592          "Params":
593          {
594            "Controller": "memory",
595            "Path": "system"
596          }
597        }
598      ]
599    }
600  ],
601
602  "AggregateProfiles": [
603    {
604      "Name": "SCHED_SP_DEFAULT",
605      "Profiles": [ "TimerSlackNormal" ]
606    },
607    {
608      "Name": "SCHED_SP_BACKGROUND",
609      "Profiles": [ "HighEnergySaving", "LowIoPriority", "TimerSlackHigh" ]
610    },
611    {
612      "Name": "SCHED_SP_FOREGROUND",
613      "Profiles": [ "HighPerformance", "HighIoPriority", "TimerSlackNormal" ]
614    },
615    {
616      "Name": "SCHED_SP_TOP_APP",
617      "Profiles": [ "MaxPerformance", "MaxIoPriority", "TimerSlackNormal" ]
618    },
619    {
620      "Name": "SCHED_SP_SYSTEM",
621      "Profiles": [ "ServicePerformance", "LowIoPriority", "TimerSlackNormal" ]
622    },
623    {
624      "Name": "SCHED_SP_RT_APP",
625      "Profiles": [ "RealtimePerformance", "MaxIoPriority", "TimerSlackNormal" ]
626    },
627    {
628      "Name": "CPUSET_SP_DEFAULT",
629      "Profiles": [ "TimerSlackNormal" ]
630    },
631    {
632      "Name": "CPUSET_SP_BACKGROUND",
633      "Profiles": [ "HighEnergySaving", "ProcessCapacityLow", "LowIoPriority", "TimerSlackHigh" ]
634    },
635    {
636      "Name": "CPUSET_SP_FOREGROUND",
637      "Profiles": [ "HighPerformance", "ProcessCapacityHigh", "HighIoPriority", "TimerSlackNormal" ]
638    },
639    {
640      "Name": "CPUSET_SP_TOP_APP",
641      "Profiles": [ "MaxPerformance", "ProcessCapacityMax", "MaxIoPriority", "TimerSlackNormal" ]
642    },
643    {
644      "Name": "CPUSET_SP_SYSTEM",
645      "Profiles": [ "ServiceCapacityLow", "TimerSlackNormal" ]
646    },
647    {
648      "Name": "CPUSET_SP_RESTRICTED",
649      "Profiles": [ "ServiceCapacityRestricted", "TimerSlackNormal" ]
650    },
651    {
652      "Name": "Dex2OatBootComplete",
653      "Profiles": [ "Dex2oatPerformance", "LowIoPriority", "TimerSlackHigh" ]
654    }
655  ]
656}
657