mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
cgroup: support to set threaded mode in cgroup v2
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>
This commit is contained in:
@@ -11,7 +11,7 @@ use cgroups_rs::{Cgroup, MaxValue, PidResources, Resources};
|
||||
#[test]
|
||||
fn pid_resources() {
|
||||
let h = cgroups_rs::hierarchies::auto();
|
||||
let cg = Cgroup::new(h, String::from("pid_resources"));
|
||||
let cg = Cgroup::new(h, String::from("pid_resources")).unwrap();
|
||||
{
|
||||
let res = Resources {
|
||||
pid: PidResources {
|
||||
|
||||
Reference in New Issue
Block a user