Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocateCpus ¶
AllocateCpus allocates a number of CPUs from the given set.
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 // AllocIdleCores requests allocation of full idle cores (all threads in core). AllocIdleCores // AllocDefault is the default allocation preferences. AllocDefault = AllocIdlePackages | AllocIdleCores )
type CPUAllocator ¶
type CPUAllocator struct { logger.Logger // allocator logger instance // contains filtered or unexported fields }
CPUAllocator encapsulates state for allocating CPUs.
func NewCPUAllocator ¶
func NewCPUAllocator(sys *sysfs.System) *CPUAllocator
NewCPUAllocator creates a new CPU allocator.
Click to show internal directories.
Click to hide internal directories.