Documentation ¶
Index ¶
- Constants
- func CalculateTSCLabelDiff(frequenciesInUse []int64, frequenciesOnNode []int64, nodeFrequency int64, ...) (toAdd []int64, toRemove []int64)
- func FilterNodesFromCache(objs []interface{}, predicates ...FilterPredicateFunc) []*v1.Node
- func HasInvTSCFrequency(node *v1.Node) bool
- func IsSchedulable(node *v1.Node) bool
- func LowestTSCFrequency(nodes []*v1.Node) int64
- func NewTopologyHinter(nodeStore cache.Store, vmiStore cache.Store, arch string, ...) *topologyHinter
- func TSCFrequenciesOnNode(node *v1.Node) (frequencies []int64)
- func TSCFrequencyFromNode(node *v1.Node) (frequency int64, scalable bool, err error)
- func TSCFrequencyFromPod(pod *v1.Pod) (frequency int64, err error)
- func ToTSCSchedulableLabel(frequency int64) string
- func ToTSCSchedulableLabels(frequencies []int64) (labels []string)
- func VMIHasInvTSCFeature(vmi *k6tv1.VirtualMachineInstance) bool
- type FilterPredicateFunc
- type Hinter
- type MockHinter
- func (_m *MockHinter) EXPECT() *_MockHinterRecorder
- func (_m *MockHinter) LowestTSCFrequencyOnCluster() (int64, error)
- func (_m *MockHinter) TSCFrequenciesInUse() []int64
- func (_m *MockHinter) TopologyHintsForVMI(vmi *v1.VirtualMachineInstance) (*v1.TopologyHints, error)
- func (_m *MockHinter) TopologyHintsRequiredForVMI(vmi *v1.VirtualMachineInstance) bool
- type MockNodeTopologyUpdater
- type NodeTopologyUpdater
Constants ¶
View Source
const TSCFrequencyLabel = virtv1.CPUTimerLabel + "tsc-frequency"
View Source
const TSCFrequencySchedulingLabel = "scheduling.node.kubevirt.io/tsc-frequency"
View Source
const TSCScalableLabel = virtv1.CPUTimerLabel + "tsc-scalable"
Variables ¶
This section is empty.
Functions ¶
func CalculateTSCLabelDiff ¶
func FilterNodesFromCache ¶
func FilterNodesFromCache(objs []interface{}, predicates ...FilterPredicateFunc) []*v1.Node
func HasInvTSCFrequency ¶
func IsSchedulable ¶
func LowestTSCFrequency ¶
func NewTopologyHinter ¶
func NewTopologyHinter(nodeStore cache.Store, vmiStore cache.Store, arch string, clusterConfig *virtconfig.ClusterConfig) *topologyHinter
func TSCFrequenciesOnNode ¶
func TSCFrequencyFromNode ¶
func ToTSCSchedulableLabel ¶
func ToTSCSchedulableLabels ¶
func VMIHasInvTSCFeature ¶
func VMIHasInvTSCFeature(vmi *k6tv1.VirtualMachineInstance) bool
Types ¶
type FilterPredicateFunc ¶
func NodeOfVMI ¶
func NodeOfVMI(vmi *virtv1.VirtualMachineInstance) FilterPredicateFunc
func Not ¶
func Not(f FilterPredicateFunc) FilterPredicateFunc
func TSCFrequencyGreaterEqual ¶
func TSCFrequencyGreaterEqual(frequency int64) FilterPredicateFunc
type Hinter ¶
type Hinter interface { TopologyHintsForVMI(vmi *k6tv1.VirtualMachineInstance) (hints *k6tv1.TopologyHints, err error) TopologyHintsRequiredForVMI(vmi *k6tv1.VirtualMachineInstance) bool TSCFrequenciesInUse() []int64 LowestTSCFrequencyOnCluster() (int64, error) }
type MockHinter ¶
type MockHinter struct {
// contains filtered or unexported fields
}
Mock of Hinter interface
func NewMockHinter ¶
func NewMockHinter(ctrl *gomock.Controller) *MockHinter
func (*MockHinter) EXPECT ¶
func (_m *MockHinter) EXPECT() *_MockHinterRecorder
func (*MockHinter) LowestTSCFrequencyOnCluster ¶
func (_m *MockHinter) LowestTSCFrequencyOnCluster() (int64, error)
func (*MockHinter) TSCFrequenciesInUse ¶
func (_m *MockHinter) TSCFrequenciesInUse() []int64
func (*MockHinter) TopologyHintsForVMI ¶
func (_m *MockHinter) TopologyHintsForVMI(vmi *v1.VirtualMachineInstance) (*v1.TopologyHints, error)
func (*MockHinter) TopologyHintsRequiredForVMI ¶
func (_m *MockHinter) TopologyHintsRequiredForVMI(vmi *v1.VirtualMachineInstance) bool
type MockNodeTopologyUpdater ¶
type MockNodeTopologyUpdater struct {
// contains filtered or unexported fields
}
Mock of NodeTopologyUpdater interface
func NewMockNodeTopologyUpdater ¶
func NewMockNodeTopologyUpdater(ctrl *gomock.Controller) *MockNodeTopologyUpdater
func (*MockNodeTopologyUpdater) EXPECT ¶
func (_m *MockNodeTopologyUpdater) EXPECT() *_MockNodeTopologyUpdaterRecorder
func (*MockNodeTopologyUpdater) Run ¶
func (_m *MockNodeTopologyUpdater) Run(interval time.Duration, stopChan <-chan struct{})
type NodeTopologyUpdater ¶
func NewNodeTopologyUpdater ¶
func NewNodeTopologyUpdater(clientset kubecli.KubevirtClient, hinter Hinter, nodeInformer cache.SharedIndexInformer) NodeTopologyUpdater
Click to show internal directories.
Click to hide internal directories.