This patchset adds cgroup v2 support to cgroup_init() and cg_test_mounted_fs(). For simple cgroup interfaces like cgget and cgset, these were the only changes necessary to add cgroup v2 support to those tools.
I tested the changes by hand on a cgroup v1 mount, a cgroup v2 mount, and the cgroup v2 unified hierarchy. I have started adding cgroup v2 support to the automated test suite, but a lot of work remains. Since the tests have been split into a separate git repo, those patches will come out in a separate patchset. $ sudo ./cgset -r cpu.weight=999 foo $ sudo ./cgget -r cpu.weight foo foo: cpu.weight: 999 Automated test results are here: https://travis-ci.com/github/drakenclimber/libcgroup/builds/164557653 Code coverage increased by 0.8% and is available here: https://coveralls.io/builds/30636913 Tom Hromatka (4): api.c: Refactor cgroup v1 logic in cgroup_init() api.c: cgget: cgset: Add cgroup v2 support api.c: Declare cgroup_process_v1_mnt() as STATIC api.c: Declare cgroup_process_v2_mnt() as STATIC src/api.c | 358 ++++++++++++++++++++++++++------------- src/libcgroup-internal.h | 12 ++ 2 files changed, 255 insertions(+), 115 deletions(-) -- 2.25.3 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel