Incorrect calculation of CPU Share from cgroups v2 CPU weight
evgenyfedorov2 opened this issue · 0 comments
evgenyfedorov2 commented
Description
The equation
does not match the formula
y = (1 + ((x - 2) * 9999) / 262142), where y is the CPU weight and x is the CPU share (cgroup v1)
.
Reproduction Steps
N/A
Expected behavior
X should be calculated like this: x = ((y- 1) * 262142 / 9999) + 2
Actual behavior
X is calculated incorrectly: x = ((y * 262142) + 19997) / 9999
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response