]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api: Introduce a new API to find the cgroup setup mode
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Mon, 10 Oct 2022 15:50:34 +0000 (21:20 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 18 Oct 2022 19:32:09 +0000 (19:32 +0000)
commit4aefa6d04f5e8a4b3914bdcdf2825943c4aef3fc
treee5a8200f205dbf2d3971628256a2befe461c3f0c
parentd3ac1bb4cd0ab94fb168bbcaa917496a7d537c64
api: Introduce a new API to find the cgroup setup mode

This patch introduces a new API to detect the current cgroup setup
mode (Legacy/Unified/Hybrid). The setup will depend on the Linux
Kernel's grub command line, the system/VM is booted with.

Uses cases:
Depending upon the cgroup setup, the users can enable or disable
features in their applications. Like some controllers are only available
on cgroup v2, so they might need to set/get settings for those available
controllers only.

Suggested-by: Tom Hromatka <tom.hromatka@oracle.com>
Suggested-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
include/libcgroup/groups.h
src/api.c
src/libcgroup.map