diff --git a/chapter9.adoc b/chapter9.adoc index 863fc29..ba71a90 100644 --- a/chapter9.adoc +++ b/chapter9.adoc @@ -38,7 +38,7 @@ Supporting supervisor domains requires the following additional capabilities: along with the `MCID` is used to identify the ID of the counter used to monitor resource usage in a capacity or bandwidth controller. -== Smqosid - Supervisor Domain Quality-of-Service Identifiers +=== Smqosid - Supervisor Domain Quality-of-Service Identifiers The Smqosid introduces a read/write M-mode register (`mrmcfg`) to configure `MCID` and `RCID` for requests made by a hart at privilege mode M. @@ -121,23 +121,22 @@ and 1, which, along with `SRL` and `SML` determine the range of `RCID` and .... When the `srmcfg` CSR is read at privilege modes less than M, the value returned -for the `RCID` and `MCID` fields of the register is computed using <>. +for the `RCID` and `MCID` fields of the register is computed as follows: -[latexmath#eq-1,reftext="equation ({counter:eqs0})"] -++++ -\begin{equation} +.`RCID` and `MCID` read value compuation +[listing] +---- RCID-value = (SSM == 1) ? (srmcfg.RCID & ((1 << SRL) - 1)) : srmcfg.RCID MCID-value = (SSM == 1) ? (srmcfg.MCID & ((1 << SML) - 1)) : srmcfg.MCID -\end{equation} -++++ +---- On a write to the `srmcfg` CSR at privilege modes less than M, the value stored in the `RCID` and `MCID` fields of the register is computed using -<>. +<> and <> respetively. -[latexmath#eq-2,reftext="equation ({counter:eqs1})"] -++++ -\begin{equation} +.`RCID` and `MCID` read value processing +[listing] +---- if SSM == 1 srmcfg.RCID = (srmcfg.RCID & ~((1 << SRL) - 1)) | (RCID-value & ((1 << SRL) - 1)) else @@ -152,8 +151,7 @@ else srmcfg.MCID = MCID-value endif endif -\end{equation} -++++ +---- When `SSM` is 0, the `SRL` configuration enables the RDSM to configure a `RCID` prefix value in the `srmcfg.RCID` field while allowing the supervisor domain to @@ -174,9 +172,9 @@ follows: * The RDSM configures `SRL` to 3 and `SSM` to 1 for the second SD and programs the `srmcfg` with a value of 24. The second SD is allowed to program the low - order 3 bits of `srmcfg.RCID`, thereby selecting `RCID` values between 24 and - 31. When this SD reads `srmcfg.RCID`, the value returned consist of the low 3 - bits, with all upper bits set to 0. + order 3 bits of `srmcfg.RCID`, thereby selecting `RCID` values between 24 and 31. + When this SD reads `srmcfg.RCID`, the value returned consist of the low 3 bits, + with all upper bits set to 0. ==== When `SSM` is 0, the `SML` configuration enables the RDSM to configure a `MCID` @@ -200,7 +198,7 @@ determine the resource allocation configurations. The capacity and bandwidth controllers use the `QRID` along with `MCID` to determine the ID of the counter used for resource usage monitoring. -== QoS Register interfaces (QRI) +=== QoS Register interfaces (QRI) Capacity and bandwidth controllers that support supervisor domains provide one or more memory-mapped QoS register interfaces (QRI). A QRI may be made @@ -241,6 +239,16 @@ the operation, the `cc_capabilities.NCBLKS` shall update to a value that is the number of 1 bits in value held in the `cc_block_mask` and only bits `NCBLKS-1:0` are writable in `cc_block_mask`. +[NOTE] +==== +The `CONFIG_QRI_LIMIT` operation is a one time operation to allow the RDSM to +configure the capacity limit for a QRI before passing through the QRI to the +associated SD. An SD may then allocate capacity for RCIDs from within this limit +established by the RDSM. +==== + +<<< + [NOTE] ==== Let's consider a cache with `NCBLKS=8`. In this example, this cache supports two @@ -262,11 +270,6 @@ capacity block allocation in the controller is as follows: | `QRID=0`, `RCID=5`, `AT=0` | `0` | `1` | `0` | `0` | `0` | `0` | `0` | `0` | `QRID=1`, `RCID=5`, `AT=0` | `0` | `0` | `0` | `0` | `0` | `1` | `0` | `0` |=== - -The `CONFIG_QRI_LIMIT` operation is a one time operation to allow the RDSM to -configure the capacity limit for a QRI before passing through the QRI to the -associated SD. An SD may then allocate capacity for RCIDs from within this limit -established by the RDSM. ==== To optionally support bandwidth reservation to a QRI, the bandwidth controllers @@ -287,12 +290,12 @@ unused or non-reserved bandwidth occurs. When the `Mweight` parameter for a QRI is not set to 0, the amount of unused bandwidth allocated to `QRID=x` during contention with another `QRI` that is also permitted to use unused bandwidth is determined by dividing the `Mweight` of `QRID=q` by the sum of the `Mweight` of -all other contending `QRIs`. This ratio `Pq` is determined by <>. This +all other contending `QRIs`. This ratio `Pq` is determined by <>. This weight share of the unused bandwidth made available to a QRI is then shared among the contending RCIDs of that QRI using the weights configured for the RCIDs. -[latexmath#eq-3,reftext="equation ({counter:eqs})"] +[latexmath#eq-1,reftext="equation ({counter:eqs})"] ++++ \begin{equation} Pq = \frac{Mweight_{q}}{\sum_{q=1}^{q=n} Mweight_{q}} @@ -301,14 +304,6 @@ Pq = \frac{Mweight_{q}}{\sum_{q=1}^{q=n} Mweight_{q}} [NOTE] ==== -The bandwidth enforcement is typically work-conserving, meaning that it allows -unused bandwidth to be used by QRIs enabled to use it even if they have consumed -their `Rbwb`. - -When contending for unused bandwidth, the weighted share is typically -computed among the `QRIs` that are actively generating requests in that -accounting interval and have a non-zero weight programmed. - Consider a bandwidth controller that supports two QRIs. In this example, the `QRID=0` has been configured with `Rbwb` of 100 bandwidth units and `QRID=1` has been configured with `Rbwb` of 50 bandwidth units. The `Mweight` configured for @@ -330,5 +325,15 @@ effective configurations in the bandwidth controller are as follows: | `QRID=1`, `RCID=5` | `10` | `50` | `50` | `16` | `QRID=1`, `RCID=6` | `10` | `25` | `50` | `16` |=== +==== +[NOTE] +==== +The bandwidth enforcement is typically work-conserving, meaning that it allows +unused bandwidth to be used by QRIs enabled to use it even if they have consumed +their `Rbwb`. + +When contending for unused bandwidth, the weighted share is typically +computed among the `QRIs` that are actively generating requests in that +accounting interval and have a non-zero weight programmed. ====