File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ import (
23
23
24
24
const (
25
25
// MinExtenderPriority defines the min priority value for extender.
26
- MinExtenderPriority int = 0
26
+ MinExtenderPriority int64 = 0
27
27
28
28
// MaxExtenderPriority defines the max priority value for extender.
29
- MaxExtenderPriority int = 10
29
+ MaxExtenderPriority int64 = 10
30
30
)
31
31
32
32
// ExtenderPreemptionResult represents the result returned by preemption phase of extender.
Original file line number Diff line number Diff line change @@ -840,7 +840,9 @@ func PrioritizeNodes(
840
840
// wait for all go routines to finish
841
841
wg .Wait ()
842
842
for i := range result {
843
- result [i ].Score += combinedScores [result [i ].Name ]
843
+ // MaxExtenderPriority may diverge from the max priority used in the scheduler and defined by MaxNodeScore,
844
+ // therefore we need to scale the score returned by extenders to the score range used by the scheduler.
845
+ result [i ].Score += combinedScores [result [i ].Name ] * (framework .MaxNodeScore / extenderv1 .MaxExtenderPriority )
844
846
}
845
847
}
846
848
You can’t perform that action at this time.
0 commit comments