Documentation ¶
Index ¶
- func CellEqual(c1 Cell, c2 Cell) bool
- func NewTopologyAwareScheduler(ccl ChainCellList, levelGpuNum map[CellLevel]int32, crossPriorityPack bool, ...) *topologyAwareScheduler
- func ParseConfig(sConfig *api.Config) (physicalFullCellList map[CellChain]ChainCellList, ...)
- type AlgoAffinityGroup
- type Cell
- type CellChain
- type CellLevel
- type CellList
- type CellPriority
- type ChainCellList
- type GenericCell
- func (c *GenericCell) AtOrHigherThanNode() bool
- func (c *GenericCell) GetAddress() api.CellAddress
- func (c *GenericCell) GetChain() CellChain
- func (c *GenericCell) GetChildren() CellList
- func (c *GenericCell) GetLevel() CellLevel
- func (c *GenericCell) GetParent() Cell
- func (c *GenericCell) GetPriority() CellPriority
- func (c *GenericCell) GetTotalGpuNum() int32
- func (c *GenericCell) GetUsedGpuNumAtPriorities() map[CellPriority]int32
- func (c *GenericCell) IncreaseUsedGpuNumAtPriority(p CellPriority, delta int32)
- func (c *GenericCell) SetParent(p Cell)
- type HivedAlgorithm
- func (h *HivedAlgorithm) AddAllocatedPod(pod *core.Pod)
- func (h *HivedAlgorithm) AddNode(node *core.Node)
- func (h *HivedAlgorithm) AddUnallocatedPod(pod *core.Pod)
- func (h *HivedAlgorithm) DeleteAllocatedPod(pod *core.Pod)
- func (h *HivedAlgorithm) DeleteNode(node *core.Node)
- func (h *HivedAlgorithm) DeleteUnallocatedPod(pod *core.Pod)
- func (h *HivedAlgorithm) GetAffinityGroup(name string) api.AffinityGroup
- func (h *HivedAlgorithm) GetAllAffinityGroups() api.AffinityGroupList
- func (h *HivedAlgorithm) GetAllVirtualClustersStatus() map[api.VirtualClusterName]api.VirtualClusterStatus
- func (h *HivedAlgorithm) GetClusterStatus() api.ClusterStatus
- func (h *HivedAlgorithm) GetPhysicalClusterStatus() api.PhysicalClusterStatus
- func (h *HivedAlgorithm) GetVirtualClusterStatus(vcn api.VirtualClusterName) api.VirtualClusterStatus
- func (h *HivedAlgorithm) Schedule(pod *core.Pod, suggestedNodes []string) internal.PodScheduleResult
- func (h *HivedAlgorithm) UpdateNode(oldNode, newNode *core.Node)
- type PhysicalCell
- func (c *PhysicalCell) AddAffinityGroup(g *AlgoAffinityGroup)
- func (c *PhysicalCell) DeleteAffinityGroup(g *AlgoAffinityGroup)
- func (c *PhysicalCell) GetAPIStatus() *api.PhysicalCellStatus
- func (c *PhysicalCell) GetAffinityGroup() *AlgoAffinityGroup
- func (c *PhysicalCell) GetPhysicalPlacement() ([]string, []int32)
- func (c *PhysicalCell) GetPhysicalPlacementString() string
- func (c *PhysicalCell) GetPreBoundVirtualCell() *VirtualCell
- func (c *PhysicalCell) GetVirtualCell() *VirtualCell
- func (c *PhysicalCell) IsReserved() bool
- func (c *PhysicalCell) IsSplit() bool
- func (c *PhysicalCell) SetChildren(children CellList)
- func (c *PhysicalCell) SetPhysicalResources(nodes []string, gpuIndices []int32)
- func (c *PhysicalCell) SetPreBoundVirtualCell(cell *VirtualCell)
- func (c *PhysicalCell) SetPriority(p CellPriority)
- func (c *PhysicalCell) SetReserved(reserved bool)
- func (c *PhysicalCell) SetSplit(split bool)
- func (c *PhysicalCell) SetVirtualCell(cell *VirtualCell)
- type VirtualCell
- func (c *VirtualCell) GetAPIStatus() *api.VirtualCellStatus
- func (c *VirtualCell) GetPhysicalCell() *PhysicalCell
- func (c *VirtualCell) GetPreAssignedCell() *VirtualCell
- func (c *VirtualCell) GetPreBoundPhysicalCell() *PhysicalCell
- func (c *VirtualCell) SetChildren(children CellList)
- func (c *VirtualCell) SetPhysicalCell(cell *PhysicalCell)
- func (c *VirtualCell) SetPreAssignedCell(cell *VirtualCell)
- func (c *VirtualCell) SetPreBoundPhysicalCell(cell *PhysicalCell)
- func (c *VirtualCell) SetPriority(p CellPriority)
- func (c *VirtualCell) SetReservation(rid api.ReservationId)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTopologyAwareScheduler ¶ added in v0.2.0
func NewTopologyAwareScheduler( ccl ChainCellList, levelGpuNum map[CellLevel]int32, crossPriorityPack bool, considerSuggestedNodes bool) *topologyAwareScheduler
NewTopologyAwareScheduler initializes the scheduler by extracting node-level cells (lower-level if no node-level) from a free cell list.
func ParseConfig ¶
func ParseConfig(sConfig *api.Config) ( physicalFullCellList map[CellChain]ChainCellList, physicalFreeCellList map[CellChain]ChainCellList, vcFreeCellNum map[api.VirtualClusterName]map[CellChain]map[CellLevel]int32, virtualNonReservedFullCellList map[api.VirtualClusterName]map[CellChain]ChainCellList, virtualNonReservedFreeCellList map[api.VirtualClusterName]map[CellChain]ChainCellList, virtualReservedFullCellList map[api.VirtualClusterName]map[api.ReservationId]ChainCellList, reservedPhysicalCells map[api.VirtualClusterName]map[api.ReservationId]*PhysicalCell, cellLevelToGpuNum map[CellChain]map[CellLevel]int32, gpuTypeToChain map[string][]CellChain, cellLevelToType map[CellChain]map[CellLevel]api.CellType, )
Types ¶
type AlgoAffinityGroup ¶
type AlgoAffinityGroup struct {
// contains filtered or unexported fields
}
AlgoAffinityGroup is the algorithm-internal representation of an affinity group.
func (*AlgoAffinityGroup) ToAffinityGroup ¶ added in v0.2.4
func (aag *AlgoAffinityGroup) ToAffinityGroup() api.AffinityGroup
type Cell ¶
type Cell interface { GetChain() CellChain GetLevel() CellLevel GetPriority() CellPriority SetPriority(CellPriority) GetAddress() api.CellAddress GetParent() Cell SetParent(Cell) GetChildren() CellList SetChildren(CellList) AtOrHigherThanNode() bool GetTotalGpuNum() int32 GetUsedGpuNumAtPriorities() map[CellPriority]int32 IncreaseUsedGpuNumAtPriority(CellPriority, int32) }
A Cell represents a set of GPUs affinitized by their interconnection topology. Cells are organized as a tree through pointers to their parents / children.
type CellPriority ¶
type CellPriority int32
type ChainCellList ¶
ChainCellList maps each level in a chain to a CellList.
func NewChainCellList ¶
func NewChainCellList(top CellLevel) ChainCellList
func (ChainCellList) String ¶
func (ccl ChainCellList) String() string
type GenericCell ¶
type GenericCell struct {
// contains filtered or unexported fields
}
func (*GenericCell) AtOrHigherThanNode ¶ added in v0.2.0
func (c *GenericCell) AtOrHigherThanNode() bool
func (*GenericCell) GetAddress ¶ added in v0.3.0
func (c *GenericCell) GetAddress() api.CellAddress
func (*GenericCell) GetChain ¶
func (c *GenericCell) GetChain() CellChain
func (*GenericCell) GetChildren ¶
func (c *GenericCell) GetChildren() CellList
func (*GenericCell) GetLevel ¶
func (c *GenericCell) GetLevel() CellLevel
func (*GenericCell) GetParent ¶
func (c *GenericCell) GetParent() Cell
func (*GenericCell) GetPriority ¶
func (c *GenericCell) GetPriority() CellPriority
func (*GenericCell) GetTotalGpuNum ¶ added in v0.2.0
func (c *GenericCell) GetTotalGpuNum() int32
func (*GenericCell) GetUsedGpuNumAtPriorities ¶ added in v0.2.0
func (c *GenericCell) GetUsedGpuNumAtPriorities() map[CellPriority]int32
func (*GenericCell) IncreaseUsedGpuNumAtPriority ¶ added in v0.2.0
func (c *GenericCell) IncreaseUsedGpuNumAtPriority(p CellPriority, delta int32)
func (*GenericCell) SetParent ¶
func (c *GenericCell) SetParent(p Cell)
type HivedAlgorithm ¶
type HivedAlgorithm struct {
// contains filtered or unexported fields
}
HivedAlgorithm implements an internal.SchedulerAlgorithm. It schedules pods using the algorithm of HiveD. Note that the topologyAwareScheduler used in this struct is not another implementation of SchedulerAlgorithm; that is a specific algorithm for pod placement, used in intra-VC scheduling and opportunistic pod scheduling.
func NewHivedAlgorithm ¶
func NewHivedAlgorithm(sConfig *api.Config) *HivedAlgorithm
NewHivedAlgorithm initializes a HivedAlgorithm from the config file.
func (*HivedAlgorithm) AddAllocatedPod ¶
func (h *HivedAlgorithm) AddAllocatedPod(pod *core.Pod)
func (*HivedAlgorithm) AddNode ¶
func (h *HivedAlgorithm) AddNode(node *core.Node)
func (*HivedAlgorithm) AddUnallocatedPod ¶ added in v0.3.0
func (h *HivedAlgorithm) AddUnallocatedPod(pod *core.Pod)
func (*HivedAlgorithm) DeleteAllocatedPod ¶
func (h *HivedAlgorithm) DeleteAllocatedPod(pod *core.Pod)
func (*HivedAlgorithm) DeleteNode ¶
func (h *HivedAlgorithm) DeleteNode(node *core.Node)
func (*HivedAlgorithm) DeleteUnallocatedPod ¶ added in v0.3.0
func (h *HivedAlgorithm) DeleteUnallocatedPod(pod *core.Pod)
func (*HivedAlgorithm) GetAffinityGroup ¶ added in v0.2.4
func (h *HivedAlgorithm) GetAffinityGroup(name string) api.AffinityGroup
func (*HivedAlgorithm) GetAllAffinityGroups ¶ added in v0.3.0
func (h *HivedAlgorithm) GetAllAffinityGroups() api.AffinityGroupList
func (*HivedAlgorithm) GetAllVirtualClustersStatus ¶ added in v0.3.0
func (h *HivedAlgorithm) GetAllVirtualClustersStatus() map[api.VirtualClusterName]api.VirtualClusterStatus
func (*HivedAlgorithm) GetClusterStatus ¶ added in v0.3.0
func (h *HivedAlgorithm) GetClusterStatus() api.ClusterStatus
func (*HivedAlgorithm) GetPhysicalClusterStatus ¶ added in v0.3.0
func (h *HivedAlgorithm) GetPhysicalClusterStatus() api.PhysicalClusterStatus
func (*HivedAlgorithm) GetVirtualClusterStatus ¶ added in v0.3.0
func (h *HivedAlgorithm) GetVirtualClusterStatus(vcn api.VirtualClusterName) api.VirtualClusterStatus
func (*HivedAlgorithm) Schedule ¶
func (h *HivedAlgorithm) Schedule(pod *core.Pod, suggestedNodes []string) internal.PodScheduleResult
func (*HivedAlgorithm) UpdateNode ¶
func (h *HivedAlgorithm) UpdateNode(oldNode, newNode *core.Node)
type PhysicalCell ¶
type PhysicalCell struct { GenericCell // contains filtered or unexported fields }
PhysicalCell defines a cell in the physical cluster.
func NewPhysicalCell ¶
func NewPhysicalCell(c CellChain, l CellLevel, g bool, n int32, cellType api.CellType, address api.CellAddress) *PhysicalCell
func (*PhysicalCell) AddAffinityGroup ¶ added in v0.2.0
func (c *PhysicalCell) AddAffinityGroup(g *AlgoAffinityGroup)
func (*PhysicalCell) DeleteAffinityGroup ¶ added in v0.2.0
func (c *PhysicalCell) DeleteAffinityGroup(g *AlgoAffinityGroup)
func (*PhysicalCell) GetAPIStatus ¶ added in v0.3.0
func (c *PhysicalCell) GetAPIStatus() *api.PhysicalCellStatus
func (*PhysicalCell) GetAffinityGroup ¶ added in v0.2.0
func (c *PhysicalCell) GetAffinityGroup() *AlgoAffinityGroup
func (*PhysicalCell) GetPhysicalPlacement ¶
func (c *PhysicalCell) GetPhysicalPlacement() ([]string, []int32)
func (*PhysicalCell) GetPhysicalPlacementString ¶
func (c *PhysicalCell) GetPhysicalPlacementString() string
func (*PhysicalCell) GetPreBoundVirtualCell ¶ added in v0.2.0
func (c *PhysicalCell) GetPreBoundVirtualCell() *VirtualCell
func (*PhysicalCell) GetVirtualCell ¶
func (c *PhysicalCell) GetVirtualCell() *VirtualCell
func (*PhysicalCell) IsReserved ¶
func (c *PhysicalCell) IsReserved() bool
func (*PhysicalCell) IsSplit ¶ added in v0.2.0
func (c *PhysicalCell) IsSplit() bool
func (*PhysicalCell) SetChildren ¶ added in v0.3.0
func (c *PhysicalCell) SetChildren(children CellList)
func (*PhysicalCell) SetPhysicalResources ¶
func (c *PhysicalCell) SetPhysicalResources(nodes []string, gpuIndices []int32)
func (*PhysicalCell) SetPreBoundVirtualCell ¶ added in v0.2.0
func (c *PhysicalCell) SetPreBoundVirtualCell(cell *VirtualCell)
func (*PhysicalCell) SetPriority ¶ added in v0.3.0
func (c *PhysicalCell) SetPriority(p CellPriority)
func (*PhysicalCell) SetReserved ¶
func (c *PhysicalCell) SetReserved(reserved bool)
func (*PhysicalCell) SetSplit ¶ added in v0.2.0
func (c *PhysicalCell) SetSplit(split bool)
func (*PhysicalCell) SetVirtualCell ¶
func (c *PhysicalCell) SetVirtualCell(cell *VirtualCell)
type VirtualCell ¶
type VirtualCell struct { GenericCell // contains filtered or unexported fields }
VirtualCell defines a cell in a VC.
func NewVirtualCell ¶
func NewVirtualCell( vcn api.VirtualClusterName, c CellChain, l CellLevel, g bool, n int32, pac *VirtualCell, cellType api.CellType, address api.CellAddress) *VirtualCell
func (*VirtualCell) GetAPIStatus ¶ added in v0.3.0
func (c *VirtualCell) GetAPIStatus() *api.VirtualCellStatus
func (*VirtualCell) GetPhysicalCell ¶
func (c *VirtualCell) GetPhysicalCell() *PhysicalCell
func (*VirtualCell) GetPreAssignedCell ¶
func (c *VirtualCell) GetPreAssignedCell() *VirtualCell
func (*VirtualCell) GetPreBoundPhysicalCell ¶ added in v0.2.0
func (c *VirtualCell) GetPreBoundPhysicalCell() *PhysicalCell
func (*VirtualCell) SetChildren ¶ added in v0.3.0
func (c *VirtualCell) SetChildren(children CellList)
func (*VirtualCell) SetPhysicalCell ¶
func (c *VirtualCell) SetPhysicalCell(cell *PhysicalCell)
func (*VirtualCell) SetPreAssignedCell ¶
func (c *VirtualCell) SetPreAssignedCell(cell *VirtualCell)
func (*VirtualCell) SetPreBoundPhysicalCell ¶ added in v0.2.0
func (c *VirtualCell) SetPreBoundPhysicalCell(cell *PhysicalCell)
func (*VirtualCell) SetPriority ¶ added in v0.3.0
func (c *VirtualCell) SetPriority(p CellPriority)
func (*VirtualCell) SetReservation ¶
func (c *VirtualCell) SetReservation(rid api.ReservationId)