diff --git a/pkg/kubelet/cm/cpumanager/policy_static.go b/pkg/kubelet/cm/cpumanager/policy_static.go index 7abb868b8fc..d517aa698b5 100644 --- a/pkg/kubelet/cm/cpumanager/policy_static.go +++ b/pkg/kubelet/cm/cpumanager/policy_static.go @@ -456,7 +456,9 @@ func (p *staticPolicy) allocateCPUs(s state.State, numCPUs int, numaAffinity bit } func (p *staticPolicy) guaranteedCPUs(pod *v1.Pod, container *v1.Container) int { - if v1qos.GetPodQOS(pod) != v1.PodQOSGuaranteed { + qos := v1qos.GetPodQOS(pod) + if qos != v1.PodQOSGuaranteed { + klog.V(5).InfoS("Exclusive CPU allocation skipped, pod QoS is not guaranteed", "pod", klog.KObj(pod), "containerName", container.Name, "qos", qos) return 0 } cpuQuantity := container.Resources.Requests[v1.ResourceCPU] @@ -469,7 +471,9 @@ func (p *staticPolicy) guaranteedCPUs(pod *v1.Pod, container *v1.Container) int cpuQuantity = cs.AllocatedResources[v1.ResourceCPU] } } - if cpuQuantity.Value()*1000 != cpuQuantity.MilliValue() { + cpuValue := cpuQuantity.Value() + if cpuValue*1000 != cpuQuantity.MilliValue() { + klog.V(5).InfoS("Exclusive CPU allocation skipped, pod is not requesting integral CPUs", "pod", klog.KObj(pod), "containerName", container.Name, "cpu", cpuValue) return 0 } // Safe downcast to do for all systems with < 2.1 billion CPUs.