Skip to content

Commit b5d4ee3

Browse files
authored
Update least_numa.go
1 parent 23e7ea8 commit b5d4ee3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/noderesourcetopology/least_numa.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func findSuitableCombination(identifier string, qos v1.PodQOSClass, numaNodes NU
197197
minDistance float32 = 256
198198
)
199199
for _, combination := range numaNodesCombination {
200-
if isInvalidCombineResources(numaNodes, resources, combination) {
200+
if !isValidCombineResources(numaNodes, resources, combination) {
201201
continue
202202
}
203203
combinationResources := combineResources(numaNodes, combination)
@@ -234,13 +234,13 @@ func checkResourcesFit(identifier string, qos v1.PodQOSClass, resources v1.Resou
234234
return true
235235
}
236236

237-
func isInvalidCombineResources(numaNodes NUMANodeList, resources v1.ResourceList, combination []int) bool {
237+
func isValidCombineResources(numaNodes NUMANodeList, resources v1.ResourceList, combination []int) bool {
238238
for _, nodeIndex := range combination {
239239
for resourceName := range resources {
240240
if _, ok := numaNodes[nodeIndex].Resources[resourceName]; !ok {
241-
return true
241+
return false
242242
}
243243
}
244244
}
245-
return false
245+
return true
246246
}

0 commit comments

Comments
 (0)