Support to set threaded mode in cgroup v2. The premise of switching to threaded mode is that only the cgroup of cpuset, cpu and pids is supported.
Fixes: #90
Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
Setting (writing into) `memory.kmem.limit_in_bytes` is not supported in
Linux kernel >= 5.16 (see kernel commit 58056f77502: "memcg, kmem:
further deprecate kmem.limit_in_bytes"):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=58056f77502
If the write call in `set_kmem_limit()` returns EOPNOTSUPP, log a
warning message but ignore the error (do nothing).
Add a unit-test for `set_kmem_limit` in cgroups v1.
Fix#81
Signed-off-by: Dov Murik <dov.murik1@il.ibm.com>