Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocFlag ¶
type AllocFlag uint
AllocFlag represents CPU allocation preferences.
const ( // AllocIdlePackages requests allocation of full idle packages. AllocIdlePackages AllocFlag = 1 << iota // AllocIdleNodes requests allocation of full idle NUMA nodes. AllocIdleNodes // AllocIdleClusters requests allocation of full idle CPU clusters. AllocIdleClusters // AllocCacheGroups requests allocation and splitting of idle and used cache groups AllocCacheGroups // AllocIdleCores requests allocation of full idle cores (all threads in core). AllocIdleCores // AllocDefault is the default allocation preferences. AllocDefault = AllocIdlePackages | AllocIdleClusters | AllocCacheGroups | AllocIdleCores )
type CPUAllocator ¶
type CPUAllocator interface { AllocateCpus(from *cpuset.CPUSet, cnt int, prefer CPUPriority) (cpuset.CPUSet, error) ReleaseCpus(from *cpuset.CPUSet, cnt int, prefer CPUPriority) (cpuset.CPUSet, error) GetCPUPriorities() map[CPUPriority]cpuset.CPUSet }
CPUAllocator is an interface for a generic CPU allocator
func NewCPUAllocator ¶
func NewCPUAllocator(sys sysfs.System) CPUAllocator
NewCPUAllocator return a new cpuAllocator instance
type CPUPriority ¶
type CPUPriority int
const ( PriorityHigh CPUPriority = iota PriorityNormal PriorityLow NumCPUPriorities PriorityNone = NumCPUPriorities )
func (CPUPriority) String ¶
func (p CPUPriority) String() string
Click to show internal directories.
Click to hide internal directories.