From 3f61bc569d59215a2a0822f75814e13121707264 Mon Sep 17 00:00:00 2001 From: Xiaochen Shen Date: Sat, 12 Dec 2015 01:55:05 +0800 Subject: [PATCH] specs: linux: add intel_rdt cgroup support in specs Add support for the intel_rdt cgroup resource in Linux-specific runtime configuration to support runtime.json. The intel_rdt cgroup subsystem will be available in Linux 4.6 (or later). Signed-off-by: Xiaochen Shen --- runtime-config-linux.md | 2 +- runtime_config_linux.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/runtime-config-linux.md b/runtime-config-linux.md index b9d633c87..76ce4a826 100644 --- a/runtime-config-linux.md +++ b/runtime-config-linux.md @@ -141,7 +141,7 @@ The following parameters can be specified: ## Control groups Also known as cgroups, they are used to restrict resource usage for a container and handle device access. -cgroups provide controls to restrict cpu, memory, IO, pids and network for the container. +cgroups provide controls to restrict cpu, memory, IO, pids, network and intel_rdt for the container. For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt). The path to the cgroups can be specified in the Spec via `cgroupsPath`. diff --git a/runtime_config_linux.go b/runtime_config_linux.go index 0ce0c1083..aabe5f153 100644 --- a/runtime_config_linux.go +++ b/runtime_config_linux.go @@ -198,6 +198,12 @@ type Network struct { Priorities []InterfacePriority `json:"priorities"` } +// IntelRdt for Linux cgroup 'intel_rdt' resource management +type IntelRdt struct { + // L3 cache allocation CBM (cache bit mask) for container + L3Cbm string `json:"l3Cbm,omitempty"` +} + // Resources has container runtime resource constraints type Resources struct { // DisableOOMKiller disables the OOM killer for out of memory conditions @@ -216,6 +222,8 @@ type Resources struct { HugepageLimits []HugepageLimit `json:"hugepageLimits,omitempty"` // Network restriction configuration Network *Network `json:"network,omitempty"` + // IntelRdt restriction configuration + IntelRdt IntelRdt `json:"intelRdt,omitempty"` } // Device represents the information on a Linux special device file