Skip to content

Commit 50cfd29

Browse files
author
Paweł Szulik
committed
config-linux: Add Intel RDT CMT and MBM Linux support
Add support for Intel Resource Director Technology (RDT) / Cache Monitoring Technology (CMT) and Memory Bandwidth Monitoring (MBM). Example: "linux": { "intelRdt": { "monitoring": true } } This is the prerequisite of this runc proposal: opencontainers/runc#2519 For more information about Intel RDT CMT and MBM, please refer to: opencontainers/runc#2519 Signed-off-by: Paweł Szulik <pawel.szulik@intel.com>
1 parent e6143ca commit 50cfd29

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

config-linux.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ The following parameters can be specified for the container:
549549

550550
* If `closID` is set, and neither of `l3CacheSchema` and `memBwSchema` are set, runtime MUST check if corresponding pre-configured directory `closID` is present in mounted `resctrl`. If such pre-configured directory `closID` exists, runtime MUST assign container to this `closID` and [generate an error](runtime.md#errors) if directory does not exist.
551551

552+
* **`monitoring`** *(boolean OPTIONAL)* - specifies if monitoring features (eg. MBM, CMT) should be enabled
552553

553554
### Example
554555

schema/config-linux.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@
250250
"memBwSchema": {
251251
"type": "string",
252252
"pattern": "^MB:[^\\n]*$"
253+
},
254+
"monitoring": {
255+
"type": "boolean"
253256
}
254257
}
255258
},

specs-go/config.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ type Linux struct {
178178
// MountLabel specifies the selinux context for the mounts in the container.
179179
MountLabel string `json:"mountLabel,omitempty"`
180180
// IntelRdt contains Intel Resource Director Technology (RDT) information for
181-
// handling resource constraints (e.g., L3 cache, memory bandwidth) for the container
181+
// handling resource constraints (e.g., L3 cache, memory bandwidth) and monitoring (eg. MBM, CMT)
182+
// for the container
182183
IntelRdt *LinuxIntelRdt `json:"intelRdt,omitempty"`
183184
// Personality contains configuration for the Linux personality syscall
184185
Personality *LinuxPersonality `json:"personality,omitempty"`
@@ -679,7 +680,7 @@ type LinuxSyscall struct {
679680
}
680681

681682
// LinuxIntelRdt has container runtime resource constraints for Intel RDT
682-
// CAT and MBA features which introduced in Linux 4.10 and 4.12 kernel
683+
// CAT, MBA, CMT and MBM features which introduced in Linux 4.10 and 4.12 kernel
683684
type LinuxIntelRdt struct {
684685
// The identity for RDT Class of Service
685686
ClosID string `json:"closID,omitempty"`
@@ -692,4 +693,7 @@ type LinuxIntelRdt struct {
692693
// The unit of memory bandwidth is specified in "percentages" by
693694
// default, and in "MBps" if MBA Software Controller is enabled.
694695
MemBwSchema string `json:"memBwSchema,omitempty"`
696+
697+
// Monitoring flag that's indicated to monitor llc-occupancy or total and local memory bandwidth.
698+
Monitoring bool `json:"monitoring,omitempty"`
695699
}

0 commit comments

Comments
 (0)