- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for CpuSharesToCpuWeight (0.5 sec)
-
pkg/kubelet/cm/cgroup_manager_linux_test.go
cpuShares: 245, expectedCpuWeight: 10, }, { cpuShares: 262144, expectedCpuWeight: 10000, }, } for _, testCase := range testCases { if actual := CpuSharesToCpuWeight(testCase.cpuShares); actual != testCase.expectedCpuWeight { t.Errorf("cpuShares: %v, expectedCpuWeight: %v, actualCpuWeight: %v", testCase.cpuShares, testCase.expectedCpuWeight, actual) } } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Feb 24 18:21:21 UTC 2023 - 6.1K bytes - Viewed (0) -
pkg/kubelet/cm/cgroup_manager_linux.go
} // Convert cgroup v1 cpu.shares value to cgroup v2 cpu.weight // https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2254-cgroup-v2#phase-1-convert-from-cgroups-v1-settings-to-v2 func CpuSharesToCpuWeight(cpuShares uint64) uint64 { return uint64((((cpuShares - 2) * 9999) / 262142) + 1) } // Convert cgroup v2 cpu.weight value to cgroup v1 cpu.shares
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 27 13:02:15 UTC 2023 - 26.5K bytes - Viewed (0)