#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct CpusetControllerConfiguration
{
pub hyper_threads: HyperThreads,
pub hyper_threads_partition: Partition,
pub numa_nodes: NumaNodes,
}
impl ControllerConfiguration for CpusetControllerConfiguration
{
const Controller: Controller = Controller::cpuset;
fn configure(&self, mount_point: &CgroupMountPoint, cgroup: &Rc<NonRootCgroup>, _defaults: &DefaultHugePageSizes) -> io::Result<()>
{
cgroup.write_cpuset_hyper_threads(mount_point, &self.hyper_threads)?;
cgroup.write_cpuset_hyper_threads_partition(mount_point, self.hyper_threads_partition)?;
cgroup.write_cpuset_numa_nodes(mount_point, &self.numa_nodes)
}
}