Skip to content

Commit fc300e0

Browse files
author
nolancon
committed
Move filterSingleNumaHints call to top level Merge
1 parent 45660fd commit fc300e0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/kubelet/cm/topologymanager/policy_single_numa_node.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ func (p *singleNumaNodePolicy) mergeProvidersHints(filteredHints [][]TopologyHin
7676
// of NUMA Nodes available on this machine.
7777
defaultAffinity, _ := bitmask.NewBitMask(p.numaNodes...)
7878

79-
// Filter to only include don't cares and hints with a single NUMA node.
80-
filteredHints = filterSingleNumaHints(filteredHints)
81-
8279
// Set the bestHint to return from this function as {nil false}.
8380
// This will only be returned if no better hint can be found when
8481
// merging hints from each hint provider.
@@ -128,7 +125,9 @@ func (p *singleNumaNodePolicy) mergeProvidersHints(filteredHints [][]TopologyHin
128125

129126
func (p *singleNumaNodePolicy) Merge(providersHints []map[string][]TopologyHint) (TopologyHint, lifecycle.PodAdmitResult) {
130127
filteredHints := filterProvidersHints(providersHints)
131-
hint := p.mergeProvidersHints(filteredHints)
128+
// Filter to only include don't cares and hints with a single NUMA node.
129+
singleNumaHints := filterSingleNumaHints(filteredHints)
130+
hint := p.mergeProvidersHints(singleNumaHints)
132131
admit := p.canAdmitPodResult(&hint)
133132
return hint, admit
134133
}

0 commit comments

Comments
 (0)