-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scheduler: optimize numa affinity store
Signed-off-by: wangjianyu.wjy <wangjianyu.wjy@alibaba-inc.com>
- Loading branch information
wangjianyu.wjy
committed
Sep 19, 2024
1 parent
cd6ce25
commit 27bc349
Showing
4 changed files
with
57 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
pkg/scheduler/frameworkext/schedulingphase/scheduling_phase.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package schedulingphase | ||
|
||
import ( | ||
"k8s.io/kubernetes/pkg/scheduler/framework" | ||
|
||
"github.com/koordinator-sh/koordinator/apis/extension" | ||
) | ||
|
||
const ( | ||
phaseStateKey = extension.SchedulingDomainPrefix + "/scheduling-phase" | ||
) | ||
|
||
const ( | ||
PostFilter = "PostFilter" | ||
) | ||
|
||
type SchedulingPhase struct { | ||
extensionPoint string | ||
} | ||
|
||
func (s *SchedulingPhase) Clone() framework.StateData { | ||
return s | ||
} | ||
|
||
func RecordPhase(cycleState *framework.CycleState, extensionPoint string) { | ||
cycleState.Write(phaseStateKey, &SchedulingPhase{ | ||
extensionPoint: PostFilter, | ||
}) | ||
} | ||
|
||
func GetExtensionPointBeingExecuted(cycleState *framework.CycleState) string { | ||
s, err := cycleState.Read(phaseStateKey) | ||
if err != nil || s == nil { | ||
return "" | ||
} | ||
return s.(*SchedulingPhase).extensionPoint | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters