You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found no device subsystem in cgroup v2. How to limit devices in cgroup v2. Thank you!
implHierarchyforV2{fnv2(&self) -> bool{true}fnsubsystems(&self) -> Vec<Subsystem>{let p = format!("{}/{}", UNIFIED_MOUNTPOINT, "cgroup.controllers");let ret = fs::read_to_string(p.as_str());if ret.is_err(){returnvec![];}letmut subs = vec![];let controllers = ret.unwrap().trim().to_string();letmut controller_list:Vec<&str> = controllers.split(' ').collect();// The freezer functionality is present in V2, but not as a controller,// but apparently as a core functionality. FreezerController supports// that, but we must explicitly fake the controller here.
controller_list.push("freezer");for s in controller_list {match s {"cpu" => {
subs.push(Subsystem::Cpu(CpuController::new(self.root(),true)));}"io" => {
subs.push(Subsystem::BlkIo(BlkIoController::new(self.root(),true)));}"cpuset" => {
subs.push(Subsystem::CpuSet(CpuSetController::new(self.root(),true)));}"memory" => {
subs.push(Subsystem::Mem(MemController::new(self.root(),true)));}"pids" => {
subs.push(Subsystem::Pid(PidController::new(self.root(),true)));}"freezer" => {
subs.push(Subsystem::Freezer(FreezerController::new(self.root(),true,)));}"hugetlb" => {
subs.push(Subsystem::HugeTlb(HugeTlbController::new(self.root(),true,)));}
_ => {}}}
subs
}}
The text was updated successfully, but these errors were encountered:
I found no device subsystem in cgroup v2. How to limit devices in cgroup v2. Thank you!
The text was updated successfully, but these errors were encountered: