Revert "Small improve for GetContainerOOMScoreAdjust"

This commit is contained in:
Harry Zhang
2017-01-05 09:54:11 +08:00
committed by GitHub
parent 84df067967
commit 9712fe8455

View File

@@ -72,8 +72,8 @@ func GetContainerOOMScoreAdjust(pod *v1.Pod, container *v1.Container, memoryCapa
return (1000 + guaranteedOOMScoreAdj) return (1000 + guaranteedOOMScoreAdj)
} }
// Give burstable pods a higher chance of survival over besteffort pods. // Give burstable pods a higher chance of survival over besteffort pods.
if int(oomScoreAdjust) >= besteffortOOMScoreAdj { if int(oomScoreAdjust) == besteffortOOMScoreAdj {
return int(besteffortOOMScoreAdj - 1) return int(oomScoreAdjust - 1)
} }
return int(oomScoreAdjust) return int(oomScoreAdjust)
} }