You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for Intel Resource Director Technology (RDT) /
Memory Bandwidth Allocation (MBA). Add memory bandwidth resource
constraints in Linux-specific configuration.
In this PR, the spec for memory bandwidth (memBwSchema) keeps
the same format as existed spec for L3 cache (l3CacheSchema)
for consistency and compatibility in runtime-spec 1.x.
Example:
"linux": {
"intelRdt": {
"l3CacheSchema": "L3:0=7f0;1=1f",
"memBwSchema": "MB:0=20;1=70"
}
}
This is the prerequisite of this runc proposal:
opencontainers/runc#1596
For more information about Intel RDT/MBA, please refer to:
opencontainers/runc#1596
Signed-off-by: Xiaochen Shen <[email protected]>
Copy file name to clipboardExpand all lines: config-linux.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -458,6 +458,7 @@ The following parameters can be specified to set up the controller:
458
458
## <aname="configLinuxIntelRdt" />IntelRdt
459
459
460
460
**`intelRdt`** (object, OPTIONAL) represents the [Intel Resource Director Technology][intel-rdt-cat-kernel-interface].
461
+
461
462
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.
462
463
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).
463
464
@@ -466,19 +467,29 @@ The following parameters can be specified to set up the controller:
466
467
The following parameters can be specified for the container:
467
468
468
469
***`l3CacheSchema`***(string, OPTIONAL)* - specifies the schema for L3 cache id and capacity bitmask (CBM).
469
-
If `l3CacheSchema` is set, runtimes MUST write the value to the `schemata` file in the `<container-id>` directory discussed in `intelRdt`.
470
+
The value SHOULD start with `L3:` and SHOULD NOT contain newlines.
471
+
***`memBwSchema`***(string, OPTIONAL)* - specifies the schema of memory bandwidth percentage per L3 cache id.
472
+
The value MUST start with `MB:` and MUST NOT contain newlines.
473
+
474
+
If both `l3CacheSchema` and `memBwSchema` are set, runtimes MUST write the combined value to the `schemata` file in the <container-id> directory discussed in intelRdt. If `l3CacheSchema` contains a line beginning with `MB:`, the value written to `schemata` file MUST be the non-`MB:` line(s) from `l3CacheSchema` and the line from `memBWSchema`.
470
475
471
-
If `l3CacheSchema` is not set, runtimes MUST NOT write to `schemata` files in any `resctrl` pseudo-filesystems.
476
+
If either `l3CacheSchema` or `memBwSchema` is set, runtimes MUST write the value to the `schemata` file in the `<container-id>` directory discussed in `intelRdt`.
477
+
478
+
If neither `l3CacheSchema` nor `memBwSchema` is set, runtimes MUST NOT write to `schemata` files in any `resctrl` pseudo-filesystems.
472
479
473
480
### Example
474
481
475
-
Consider a two-socket machine with two L3 caches where the default CBM is 0xfffff and the max CBM length is 20 bits.
476
-
Tasks inside the container only have access to the "upper" 80% of L3 cache id 0 and the "lower" 50% L3 cache id 1:
482
+
Consider a two-socket machine with two L3 caches where the default CBM is 0x7ff and the max CBM length is 11 bits,
483
+
and minimum memory bandwidth of 10% with a memory bandwidth granularity of 10%.
484
+
485
+
Tasks inside the container only have access to the "upper" 7/11 of L3 cache on socket 0 and the "lower" 5/11 L3 cache on socket 1,
486
+
and may use a maximum memory bandwidth of 20% on socket 0 and 70% on socket 1.
0 commit comments