]>
git.ipfire.org Git - thirdparty/libcgroup.git/commit
cgconfig: Add support for multiple controllers on the same mount path
Add support to cgconfigparser for mounting multiple controllers to the
same mount point.
Given the following config:
mount {
cpu = /cg_sys;
cpuacct = /cg_sys;
}
cgconfigparser should mount both the cpu and cpuacct controllers to
/cg_sys. The mount should look as follows:
cgroup on /cg_sys type cgroup (rw,relatime,seclabel,cpu,cpuacct)
Without this change, the mount->name gets overwritten and the mount
fails, which can be categorized into two cases:
1.if cpu and cpuacct are at the same hierarchy before being mounted:
Error: cannot mount cpu to /cg_sys: Device or resource busy
2.if cpu and cpuacct are not at the same hierarchy before being mounted:
cgroup on /cg_sys type cgroup (rw,relatime,seclabel,cpu)
[TJH suggested improvements to commit message]
[Kamalesh fixed a few checkpatch warnings]
Signed-off-by: lipengyu <lipengyu@kylinos.cn>
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>