@@ -930,31 +930,37 @@ Not that this matters much, because dispatching for those is not
930
930
actually limited. The sum of those limits, however, is subtracted
931
931
from ` ServerCL ` to produce a value called ` RemainingServerCL ` that is
932
932
used in computing the allocations for the non-exempt priority levels.
933
- If ` RemainingServerCL ` is zero or negative then all the non-exempt
934
- priority levels get ` CurrentCL = 0 ` . Otherwise, the computation
935
- proceeds as follows.
936
933
937
934
Because of the borrowing by exempt priority levels, lower bounds could
938
- be problematic. Define ` LowerBoundSum ` as follows.
935
+ be problematic. Define ` MinCLSum ` and ` MinCurrentCLSum ` as follows.
939
936
940
937
```
941
- LowerBoundSum = sum[non-exempt priority level i] MinCurrentCL(i)
938
+ MinCLSum = sum[non-exempt priority level i] MinCL(i)
939
+ MinCurrentCLSum = sum[non-exempt priority level i] MinCurrentCL(i)
942
940
```
943
941
944
- If ` LowerBoundSum = RemainingServerCL ` then there is no wiggle room:
945
- each non-exempt priority level gets ` CurrentCL = MinCurrentCL ` .
942
+ When ` RemainingServerCL < MinCLSum ` , the expected usage by the exempt
943
+ levels is so high that we would like to give the non-exempt levels
944
+ less than their minimum. But that could be problematic. So in this
945
+ case and when ` RemainingServerCL = MinCLSum ` we set ` CurrentCL ` for
946
+ the non-exempt levels by the following formula.
946
947
947
- If ` LowerBoundSum > RemainingServerCL ` then the problem is
948
- over-constrained. The solution taken is to reduce all the lower
949
- bounds in the same proportion, to the point where their sum is
950
- feasible. At that point, there is no wiggle room. Thus, in this case
951
- the settings are as follows.
948
+ ```
949
+ CurrentCL(i) = MinCL(i)
950
+ ```
951
+
952
+ When ` MinCLSum < RemainingServerCL < MinCurrentCLSum ` , the concurrency
953
+ available to non-exempt levels is above their rock-bottom limit but
954
+ not enough to give each its ` MinCurrentCL ` . In this case and when
955
+ ` RemainingServerCL = MinCurrentCLSum ` we share the excess above
956
+ ` MinCL ` proportionally, using the following formula.
952
957
953
958
```
954
- CurrentCL(i) = MinCurrentCL(i) * RemainingServerCL / LowerBoundSum
959
+ CurrentCL(i) = MinCL(i) + ( MinCurrentCL(i) - MinCL(i) ) *
960
+ (RemainingServerCL-MinCLSum) / (MinCurrentCLSum-MinCLSum)
955
961
```
956
962
957
- Finally, when ` LowerBoundSum < RemainingServerCL` there _ is_ wiggle
963
+ Finally, when ` MinCurrentCLSum < RemainingServerCL` there _ is_ wiggle
958
964
room and the borrowing computation proceeds as follows.
959
965
960
966
The non-exempt priority levels would all be fairly happy if we set
0 commit comments