From a50857d3b7898e16f0a954a63a699d6d57e1b7fa Mon Sep 17 00:00:00 2001 From: Kersten Richter Date: Tue, 14 May 2024 16:31:35 -0500 Subject: [PATCH] Update qos_sw_guidelines.adoc Signed-off-by: Kersten Richter --- qos_sw_guidelines.adoc | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/qos_sw_guidelines.adoc b/qos_sw_guidelines.adoc index 570354b..7da9ea7 100644 --- a/qos_sw_guidelines.adoc +++ b/qos_sw_guidelines.adoc @@ -8,38 +8,38 @@ be reported to operating systems using methods such as ACPI and/or device tree. For each capacity and bandwidth controller, the following information should be reported using these methods: -* Type of controller (e.g, cache, interconnect, memory, etc.) +* Type of controller (for example, cache, interconnect, memory, and so on) * Location of the register programming interface for the controller * Placement and topology describing the hart and IO bridges that share the resources controlled by the controller * The number of QoS identifiers supported by the controller -* For memory bandwidth controllers, the controlled memory regions. These may be - described in the form of NUMA domains or proximity domains +* For memory bandwidth controllers, the controlled memory regions. These regions might + be described in the form of NUMA domains or proximity domains. * If a controller is part of a set of controllers that collectively control a shared resource such as memory bandwidth of a memory region, then information - to identify all members of the set should be reported + to identify all members of the set should be reported. * Constraints imposed by the controllers, such as the minimum number of capacity - or bandwidth blocks per RCID + or bandwidth blocks per RCID. === Context Switching QoS Identifiers Typically, the contents of the `srmcfg` CSR are updated with a new `RCID` and/or `MCID` by the HS/S-mode scheduler if the `RCID` and/or `MCID` of the -new workload (a process or a VM) is not same as that of the old workload. +new workload (a process or a VM) is not same as that of the previous workload. A context switch usually involves saving the context associated with the workload being switched away from and restoring the context of the workload -being switched to. Such a context switch may be invoked in response to an explicit -call from the workload (i.e, as a function of an `ECALL` invocation) or may be -done asynchronously (e.g., in response to a timer interrupt). In such cases the -scheduler may want to execute with the `srmcfg` configuration of the +being switched to. Such a context switch might be invoked in response to an explicit +call from the workload (for example, as a function of an `ECALL` invocation) or can be +done asynchronously (for example, in response to a timer interrupt). In such cases the +scheduler might want to execute with the `srmcfg` configuration of the workload being switched away from such that this execution is attributed to the workload being switched away from and then prior to restoring the new workloads context, first switch to the `srmcfg` configuration appropriate for the workload being switched to such that all of that execution is attributed to the new workload. Further in this context switch process, if the scheduler intends some of its execution to be attributed to neither the outgoing -workload nor the incoming workload, then the scheduler may switch to a new +workload nor the incoming workload, then the scheduler might switch to a new `srmcfg` configuration that is different from that of either of the workloads for the duration of such execution. @@ -52,7 +52,7 @@ hypervisor. Usually the Guest OS in a virtual machine does not participate in the QoS flows as the Guest OS does not know the physical capabilities of the platform or the resource allocations for other virtual machines in the system. -If a use case requires it, a hypervisor may virtualize the QoS capability to a +If a use case requires it, a hypervisor might virtualize the QoS capability to a VM by virtualizing the memory-mapped CBQRI register interface and virtualizing the virtual-instruction exception on access to `srmcfg` CSR by the Guest OS. @@ -60,7 +60,7 @@ the virtual-instruction exception on access to `srmcfg` CSR by the Guest OS. ==== If the use of directly selecting among a set of `RCID` and/or `MCID` by a VM becomes more prevalent and the overhead of virtualizing the `srmcfg` CSR using -the virtual instruction exception is not acceptable then a future extension may +the virtual instruction exception is not acceptable then a future extension can be introduced where the `RCID`/`MCID` attempted to be written by VS mode are used as a selector for a set of `RCID`/`MCID` that the hypervisor configures in a set of HS mode CSRs. @@ -71,21 +71,21 @@ a set of HS mode CSRs. The `RCID` and `MCID` configured in `srmcfg` also apply to execution in S/HS-mode, but this is typically not an issue. Usually, S/HS-mode execution occurs to provide services, such as through an ABI, to software executing at -lower privilege. Since the S/HS-mode invocation was to provide a service for -the lower privilege mode, the S/HS-mode software may opt not to modify the +lower privilege. Because the S/HS-mode invocation provides a service for +the lower privilege mode, the S/HS-mode software might not opt to modify the `srmcfg` CSR. Similarly, The `RCID` and `MCID` configured in `srmcfg` also apply to execution in M-mode, but this is typically not an issue either. Usually, M-mode execution occurs to provide services, such as through the SBI interface, to software -executing at lower privilege. Since the M-mode invocation was to provide a -service for the lower privilege mode, the M-mode software may opt not to modify +executing at lower privilege. Because the M-mode invocation provides a +service for the lower privilege mode, the M-mode software might not opt to modify the `srmcfg` CSR. If separate `RCID` and/or `MCID` are needed during software execution in -M/S/HS-mode, then the M/S/HS-mode software may update the `srmcfg` CSR and +M/S/HS-mode, then the M/S/HS-mode software might update the `srmcfg` CSR and restore it before returning to lower privilege mode execution. The statistical nature of QoS capabilities means that the brief duration, such as the few instructions in the M/S/HS-mode trap handler entry point, during which the trap -handler may execute with the `RCID` and/or `MCID` established for lower -privilege mode operation may not have a significant statistical impact. +handler might execute with the `RCID` and/or `MCID` established for lower +privilege mode operation might not have a significant statistical impact.