Skip to content

Commit c3b1cf7

Browse files
committed
specs: linux: add intel_rdt cgroup support in specs
Add support for the intel_rdt cgroup resource in Linux-specific configuration to support config.json. The intel_rdt cgroup subsystem will be available in Linux 4.6 (or later). Signed-off-by: Xiaochen Shen <[email protected]>
1 parent b6d9ebf commit c3b1cf7

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

config-linux.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ In addition to any devices configured with this setting, the runtime MUST also s
163163
## Control groups
164164

165165
Also known as cgroups, they are used to restrict resource usage for a container and handle device access.
166-
cgroups provide controls to restrict cpu, memory, IO, pids and network for the container.
166+
cgroups provide controls to restrict cpu, memory, IO, pids, network and intel_rdt for the container.
167167
For more information, see the [kernel cgroups documentation][cgroup-v1].
168168

169169
The path to the cgroups can be specified in the Spec via `cgroupsPath`.
@@ -454,6 +454,23 @@ The following paramters can be specified to setup the controller:
454454
}
455455
```
456456

457+
#### Intel rdt
458+
459+
`intelRdt` represents the cgroup subsystem `intel_rdt`.
460+
For more information, see [the intel_rdt cgroup man page](https://lkml.org/lkml/2015/12/17/574).
461+
462+
The following paramters can be specified to setup the controller:
463+
464+
* **`l3Cbm`** *(uint64, optional)* - specifies L3 cache capacity bitmask (CBM) in the cgroup
465+
466+
###### Example
467+
468+
```json
469+
"intelRdt": {
470+
"l3Cbm": 4080
471+
}
472+
```
473+
457474
## Sysctl
458475

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

config_linux.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ type Network struct {
211211
Priorities []InterfacePriority `json:"priorities,omitempty"`
212212
}
213213

214+
// IntelRdt for Linux cgroup 'intel_rdt' resource management
215+
type IntelRdt struct {
216+
// L3 cache capacity bitmask (CBM) for container
217+
L3Cbm *uint64 `json:"l3Cbm,omitempty"`
218+
}
219+
214220
// Resources has container runtime resource constraints
215221
type Resources struct {
216222
// Devices are a list of device rules for the whitelist controller
@@ -231,6 +237,8 @@ type Resources struct {
231237
HugepageLimits []HugepageLimit `json:"hugepageLimits,omitempty"`
232238
// Network restriction configuration
233239
Network *Network `json:"network,omitempty"`
240+
// IntelRdt restriction configuration
241+
IntelRdt *IntelRdt `json:"intelRdt,omitempty"`
234242
}
235243

236244
// Device represents the mknod information for a Linux special device file

0 commit comments

Comments
 (0)