From 9e6594453b5241407d874829ef02719db0d59914 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 26 Apr 2021 11:32:11 +0300 Subject: [PATCH 1/2] config-linux: fix indentation on IntelRdt Also, split out the rules regarding interdependency of parameters into a separate list. Signed-off-by: Markus Lehtonen --- config-linux.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/config-linux.md b/config-linux.md index c634112c1..5588b9dc8 100644 --- a/config-linux.md +++ b/config-linux.md @@ -535,19 +535,21 @@ The following parameters can be specified for the container: * **`l3CacheSchema`** *(string, OPTIONAL)* - specifies the schema for L3 cache id and capacity bitmask (CBM). The value SHOULD start with `L3:` and SHOULD NOT contain newlines. * **`memBwSchema`** *(string, OPTIONAL)* - specifies the schema of memory bandwidth per L3 cache id. - * The value MUST start with `MB:` and MUST NOT contain newlines. + The value MUST start with `MB:` and MUST NOT contain newlines. - * If both `l3CacheSchema` and `memBwSchema` are set, runtimes MUST write the combined value to the `schemata` file in that sub-directory discussed in `closID`. +The following rules on parameters MUST be applied: - * 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`. +* If both `l3CacheSchema` and `memBwSchema` are set, runtimes MUST write the combined value to the `schemata` file in that sub-directory discussed in `closID`. - * If either `l3CacheSchema` or `memBwSchema` is set, runtimes MUST write the value to the `schemata` file in the that sub-directory discussed in `closID`. +* 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`. - * If neither `l3CacheSchema` nor `memBwSchema` is set, runtimes MUST NOT write to `schemata` files in any `resctrl` pseudo-filesystems. +* If either `l3CacheSchema` or `memBwSchema` is set, runtimes MUST write the value to the `schemata` file in the that sub-directory discussed in `closID`. - * If `closID` is set, `l3CacheSchema` and/or `memBwSchema` is set, runtimes MUST compare `l3CacheSchema` and/or `memBwSchema` value with `schemata` file, and [generate an error](runtime.md#errors) if doesn't match. +* If neither `l3CacheSchema` nor `memBwSchema` is set, runtimes MUST NOT write to `schemata` files in any `resctrl` pseudo-filesystems. - * 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. +* If `closID` is set, `l3CacheSchema` and/or `memBwSchema` is set, runtimes MUST compare `l3CacheSchema` and/or `memBwSchema` value with `schemata` file, and [generate an error](runtime.md#errors) if doesn't match. + +* 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. ### Example From 0c021c1a44e0c6922b3b72dd51f0cdec4fe01444 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 26 Apr 2021 11:44:04 +0300 Subject: [PATCH 2/2] config-linux: clarify the handling of ClosID RDT parameter An attempt to make the spec easier to interpret by grouping all ClosID related contraints in one place. Signed-off-by: Markus Lehtonen --- config-linux.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config-linux.md b/config-linux.md index 5588b9dc8..37ea951f7 100644 --- a/config-linux.md +++ b/config-linux.md @@ -530,7 +530,6 @@ If `intelRdt` is not set, the runtime MUST NOT manipulate any `resctrl` pseudo-f The following parameters can be specified for the container: * **`closID`** *(string, OPTIONAL)* - specifies the identity for RDT Class of Service (CLOS). - 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 `` directory. * **`l3CacheSchema`** *(string, OPTIONAL)* - specifies the schema for L3 cache id and capacity bitmask (CBM). The value SHOULD start with `L3:` and SHOULD NOT contain newlines. @@ -547,7 +546,11 @@ The following rules on parameters MUST be applied: * If neither `l3CacheSchema` nor `memBwSchema` is set, runtimes MUST NOT write to `schemata` files in any `resctrl` pseudo-filesystems. -* If `closID` is set, `l3CacheSchema` and/or `memBwSchema` is set, runtimes MUST compare `l3CacheSchema` and/or `memBwSchema` value with `schemata` file, and [generate an error](runtime.md#errors) if doesn't match. +* If `closID` is not set, runtimes MUST use the container ID from [`start`](runtime.md#start) and create the `` directory. + +* If `closID` is set, `l3CacheSchema` and/or `memBwSchema` is set + * if `closID` directory in a mounted `resctrl` pseudo-filesystem doesn't exist, the runtimes MUST create it. + * if `closID` directory in a mounted `resctrl` pseudo-filesystem exists, runtimes MUST compare `l3CacheSchema` and/or `memBwSchema` value with `schemata` file, and [generate an error](runtime.md#errors) if doesn't match. * 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.