policy

package
v0.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NodeSchedulerPolicyAnnotationKey is user set Pod annotation to change this default node policy.
	NodeSchedulerPolicyAnnotationKey = "hami.io/node-scheduler-policy"
	// GPUSchedulerPolicyAnnotationKey is user set Pod annotation to change this default GPU policy.
	GPUSchedulerPolicyAnnotationKey = "hami.io/gpu-scheduler-policy"
)
View Source
const (
	Weight int = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceListsScore

type DeviceListsScore struct {
	Device *util.DeviceUsage
	// Score recode every device user/allocate score
	Score float32
}

func (*DeviceListsScore) ComputeScore

func (ds *DeviceListsScore) ComputeScore(requests util.ContainerDeviceRequests)

type DeviceUsageList

type DeviceUsageList struct {
	DeviceLists []*DeviceListsScore
	Policy      string
}

func (DeviceUsageList) Len

func (l DeviceUsageList) Len() int

func (DeviceUsageList) Less

func (l DeviceUsageList) Less(i, j int) bool

func (DeviceUsageList) Swap

func (l DeviceUsageList) Swap(i, j int)

type NodeScore

type NodeScore struct {
	NodeID  string
	Devices util.PodDevices
	// Score recode every node all device user/allocate score
	Score float32
}

func (*NodeScore) ComputeScore

func (ns *NodeScore) ComputeScore(devices DeviceUsageList)

type NodeScoreList

type NodeScoreList struct {
	NodeList []*NodeScore
	Policy   string
}

func (NodeScoreList) Len

func (l NodeScoreList) Len() int

func (NodeScoreList) Less

func (l NodeScoreList) Less(i, j int) bool

func (NodeScoreList) Swap

func (l NodeScoreList) Swap(i, j int)

type SchedulerPolicyName

type SchedulerPolicyName string
const (
	// NodeSchedulerPolicyBinpack is node use binpack scheduler policy.
	NodeSchedulerPolicyBinpack SchedulerPolicyName = "binpack"
	// NodeSchedulerPolicySpread is node use spread scheduler policy.
	NodeSchedulerPolicySpread SchedulerPolicyName = "spread"
	// GPUSchedulerPolicyBinpack is GPU use binpack scheduler.
	GPUSchedulerPolicyBinpack SchedulerPolicyName = "binpack"
	// GPUSchedulerPolicySpread is GPU use spread scheduler.
	GPUSchedulerPolicySpread SchedulerPolicyName = "spread"
)

func (SchedulerPolicyName) String

func (s SchedulerPolicyName) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL