Skip to content

Commit f5ca480

Browse files
committed
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 <[email protected]>
1 parent d7df1b4 commit f5ca480

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

runtime-config-linux.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ The following parameters can be specified:
141141
## Control groups
142142

143143
Also known as cgroups, they are used to restrict resource usage for a container and handle device access.
144-
cgroups provide controls to restrict cpu, memory, IO, pids and network for the container.
144+
cgroups provide controls to restrict cpu, memory, IO, pids, network and intel_rdt for the container.
145145
For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt).
146146

147147
The path to the cgroups can be specified in the Spec via `cgroupsPath`.
@@ -384,6 +384,23 @@ The following paramters can be specified to setup the controller:
384384
}
385385
```
386386

387+
#### Intel_rdt
388+
389+
`intel_rdt` represents the cgroup subsystem `intel_rdt`.
390+
For more information, see [the intel_rdt cgroup man page](https://lkml.org/lkml/2015/10/2/74).
391+
392+
The following paramters can be specified to setup the controller:
393+
394+
* **`l3Cbm`** *(string, optional)* - specifies L3 cache capacity bitmask (CBM) in the cgroup
395+
396+
###### Example
397+
398+
```json
399+
"intel_rdt": {
400+
"l3Cbm": "0xff0"
401+
}
402+
```
403+
387404
## Sysctl
388405

389406
sysctl allows kernel parameters to be modified at runtime for the container.

runtime_config_linux.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ type Network struct {
198198
Priorities []InterfacePriority `json:"priorities"`
199199
}
200200

201+
// IntelRdt for Linux cgroup 'intel_rdt' resource management
202+
type IntelRdt struct {
203+
// L3 cache capacity bitmask (CBM) for container
204+
L3Cbm *string `json:"l3Cbm,omitempty"`
205+
}
206+
201207
// Resources has container runtime resource constraints
202208
type Resources struct {
203209
// DisableOOMKiller disables the OOM killer for out of memory conditions
@@ -216,6 +222,8 @@ type Resources struct {
216222
HugepageLimits []HugepageLimit `json:"hugepageLimits,omitempty"`
217223
// Network restriction configuration
218224
Network *Network `json:"network,omitempty"`
225+
// IntelRdt restriction configuration
226+
IntelRdt *IntelRdt `json:"intelRdt,omitempty"`
219227
}
220228

221229
// Device represents the information on a Linux special device file

0 commit comments

Comments
 (0)