Remove inner loop for finding MinReclaim in ParseThresholdConfig

This commit is contained in:
Ted Yu 2019-06-03 19:20:18 -07:00 committed by Ted Yu
parent 5f6cd471dc
commit f7d9e037d9

View File

@ -128,11 +128,8 @@ func ParseThresholdConfig(allocatableConfig []string, evictionHard, evictionSoft
} }
results = append(results, softThresholds...) results = append(results, softThresholds...)
for i := range results { for i := range results {
for signal, minReclaim := range minReclaims { if minReclaim, ok := minReclaims[results[i].Signal]; ok {
if results[i].Signal == signal { results[i].MinReclaim = &minReclaim
results[i].MinReclaim = &minReclaim
break
}
} }
} }
for _, key := range allocatableConfig { for _, key := range allocatableConfig {