Cgroup attributes are set from three different contexts:
(1) From the process that creates the cgroup directories. These
processes are /system/bin/init, zygote and zygote64.
(2) From the created process. Some but not all created processes have
user ID and/or group ID 'system'.
(3) The system_server process modifies certain cgroup attributes from
other processes.
Allow all processes from the system group, including system_server, to
modify cgroup attributes from other processes. As one can see in
init.rc, that file includes commands for granting the system group
write permission for blkcg attributes. See also
https://cs.android.com/android/platform/superproject/+/master:system/core/rootdir/init.rc
Bug: 213617178
Test: Verified in the Cuttlefish emulator that this patch makes the
Test: io.bfq.weight write errors disappear from logcat.
Change-Id: Idbfb49c25afec12b21daea7a17db5322bc981ff0
Signed-off-by: Bart Van Assche <bvanassche@google.com>
45 lines
803 B
JSON
45 lines
803 B
JSON
{
|
|
"Cgroups": [
|
|
{
|
|
"Controller": "blkio",
|
|
"Path": "/dev/blkio",
|
|
"Mode": "0775",
|
|
"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": "0775",
|
|
"UID": "system",
|
|
"GID": "system",
|
|
"Controllers": [
|
|
{
|
|
"Controller": "freezer",
|
|
"Path": "."
|
|
}
|
|
]
|
|
}
|
|
}
|