Skip to content

Commit cc07cb9

Browse files
authored
Merge pull request #988 from linericyang/master
config-linux: add Intel RDT CLOS name sharing support
2 parents eba862d + 06cf899 commit cc07cb9

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

config-linux.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,17 +488,20 @@ You MUST specify at least one of the `hcaHandles` or `hcaObjects` in a given ent
488488
## <a name="configLinuxIntelRdt" />IntelRdt
489489

490490
**`intelRdt`** (object, OPTIONAL) represents the [Intel Resource Director Technology][intel-rdt-cat-kernel-interface].
491-
If `intelRdt` is set, the runtime MUST write the container process ID to the `<container-id>/tasks` file in a mounted `resctrl` pseudo-filesystem, using the container ID from [`start`](runtime.md#start) and creating the `<container-id>` directory if necessary.
491+
If `intelRdt` is set, the runtime MUST write the container process ID to the `tasks` file in a proper sub-directory in a mounted `resctrl` pseudo-filesystem. That sub-directory name is specified by `closID` parameter.
492492
If no mounted `resctrl` pseudo-filesystem is available in the [runtime mount namespace](glossary.md#runtime-namespace), the runtime MUST [generate an error](runtime.md#errors).
493493

494494
If `intelRdt` is not set, the runtime MUST NOT manipulate any `resctrl` pseudo-filesystems.
495495

496496
The following parameters can be specified for the container:
497497

498+
* **`closID`** *(string, OPTIONAL)* - specifies the identity for RDT Class of Service (CLOS).
499+
If `closID` is set, runtimes MUST create `closID` directory in a mounted `resctrl` pseudo-filesystem if it doesn't exist. If not set, runtimes MUST use the container ID from [`start`](runtime.md#start) and create the `<container-id>` directory.
500+
498501
* **`l3CacheSchema`** *(string, OPTIONAL)* - specifies the schema for L3 cache id and capacity bitmask (CBM).
499-
If `l3CacheSchema` is set, runtimes MUST write the value to the `schemata` file in the `<container-id>` directory discussed in `intelRdt`.
502+
If `l3CacheSchema` is set, runtimes MUST write the value to the `schemata` file in that sub-directory discussed in `closID`. If not set, runtimes MUST NOT write to `schemata` files in any `resctrl` pseudo-filesystems.
500503

501-
If `l3CacheSchema` is not set, runtimes MUST NOT write to `schemata` files in any `resctrl` pseudo-filesystems.
504+
If `closID` and `l3CacheSchema` both are set, runtimes MUST compare `l3CacheSchema` value with `schemata` file, and [generate an error](runtime.md#errors) if doesn't match.
502505

503506
### Example
504507

@@ -508,6 +511,7 @@ Tasks inside the container only have access to the "upper" 80% of L3 cache id 0
508511
```json
509512
"linux": {
510513
"intelRdt": {
514+
"closID": "guaranteed_group",
511515
"l3CacheSchema": "L3:0=ffff0;1=3ff"
512516
}
513517
}

schema/config-linux.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@
228228
"intelRdt": {
229229
"type": "object",
230230
"properties": {
231+
"closID": {
232+
"type": "string"
233+
},
231234
"l3CacheSchema": {
232235
"type": "string"
233236
}

specs-go/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,8 @@ type LinuxSyscall struct {
626626
// LinuxIntelRdt has container runtime resource constraints
627627
// for Intel RDT/CAT which introduced in Linux 4.10 kernel
628628
type LinuxIntelRdt struct {
629+
// The identity for RDT Class of Service
630+
ClosID string `json:"closID,omitempty"`
629631
// The schema for L3 cache id and capacity bitmask (CBM)
630632
// Format: "L3:<cache_id0>=<cbm0>;<cache_id1>=<cbm1>;..."
631633
L3CacheSchema string `json:"l3CacheSchema,omitempty"`

0 commit comments

Comments
 (0)