7f19b1e6de
Memory cgroup controller is not used by high-end Android devices and is disabled in Android kernels 5.10+, however Android Go devices still require this controller. Similarly schedtune controller is being replaced with cpu controller's utilclamp feature, however some devices are using older kernels which only support schedtune. To prevent spamming logcat with errors we need a way to mark a controller optional in such cases without removing it from cgroups.json file. Introduce "Optional" attribute to cgroup controller's cgroups.json description to accomodate these cases. When an optional controller fails to mount due to lack of support in the kernel it will log an informational message without generating further errors. Bug: 181866655 Test: boot and observe libprocessgroup messages in logcat Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: Ib5bcfdd8d338704f3f9d8b326d8ddd88b67915a1
48 lines
877 B
JSON
48 lines
877 B
JSON
{
|
|
"Cgroups": [
|
|
{
|
|
"Controller": "blkio",
|
|
"Path": "/dev/blkio",
|
|
"Mode": "0755",
|
|
"UID": "system",
|
|
"GID": "system"
|
|
},
|
|
{
|
|
"Controller": "cpu",
|
|
"Path": "/dev/cpuctl",
|
|
"Mode": "0755",
|
|
"UID": "system",
|
|
"GID": "system"
|
|
},
|
|
{
|
|
"Controller": "cpuset",
|
|
"Path": "/dev/cpuset",
|
|
"Mode": "0755",
|
|
"UID": "system",
|
|
"GID": "system"
|
|
},
|
|
{
|
|
"Controller": "memory",
|
|
"Path": "/dev/memcg",
|
|
"Mode": "0700",
|
|
"UID": "root",
|
|
"GID": "system",
|
|
"Optional": true
|
|
}
|
|
],
|
|
"Cgroups2": {
|
|
"Path": "/sys/fs/cgroup",
|
|
"Mode": "0755",
|
|
"UID": "system",
|
|
"GID": "system",
|
|
"Controllers": [
|
|
{
|
|
"Controller": "freezer",
|
|
"Path": ".",
|
|
"Mode": "0755",
|
|
"UID": "system",
|
|
"GID": "system"
|
|
}
|
|
]
|
|
}
|
|
}
|