Documentation ¶
Index ¶
- func AccumulateProvidersHints(container *v1.Container, topoInfo *api.NumatopoInfo, ...) (providersHints []map[string][]TopologyHint)
- func Allocate(container *v1.Container, bestHit *TopologyHint, topoInfo *api.NumatopoInfo, ...) map[string]cpuset.CPUSet
- type HintProvider
- type Policy
- type TopologyHint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccumulateProvidersHints ¶
func AccumulateProvidersHints(container *v1.Container, topoInfo *api.NumatopoInfo, resNumaSets api.ResNumaSets, hintProviders []HintProvider) (providersHints []map[string][]TopologyHint)
AccumulateProvidersHints return all TopologyHint collection from different providers
func Allocate ¶
func Allocate(container *v1.Container, bestHit *TopologyHint, topoInfo *api.NumatopoInfo, resNumaSets api.ResNumaSets, hintProviders []HintProvider) map[string]cpuset.CPUSet
Allocate return all resource assignment collection from different providers
Types ¶
type HintProvider ¶
type HintProvider interface { // Name returns provider name used for register and logging. Name() string // GetTopologyHints returns hints if this hint provider has a preference, GetTopologyHints(container *v1.Container, topoInfo *api.NumatopoInfo, resNumaSets api.ResNumaSets) map[string][]TopologyHint Allocate(container *v1.Container, bestHit *TopologyHint, topoInfo *api.NumatopoInfo, resNumaSets api.ResNumaSets) map[string]cpuset.CPUSet }
HintProvider is an interface for components that want to collaborate to achieve globally optimal concrete resource alignment with respect to NUMA locality.
type Policy ¶
type Policy interface { // Predicate Get the best hit. Predicate(providersHints []map[string][]TopologyHint) (TopologyHint, bool) }
Policy is an interface for topology manager policy
func NewPolicyBestEffort ¶
NewPolicyBestEffort return a new policy interface
func NewPolicyNone ¶
NewPolicyNone return a new policy interface
func NewPolicyRestricted ¶
NewPolicyRestricted return a new policy interface
func NewPolicySingleNumaNode ¶
NewPolicySingleNumaNode return a new policy interface
type TopologyHint ¶
type TopologyHint struct { NUMANodeAffinity bitmask.BitMask // Preferred is set to true when the NUMANodeAffinity encodes a preferred // allocation for the Container. It is set to false otherwise. Preferred bool }
TopologyHint is a struct containing the NUMANodeAffinity for a Container
Click to show internal directories.
Click to hide internal directories.