cpuallocator

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 3

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
	// 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 interface {
	AllocateCpus(*cpuset.CPUSet, int, bool) (cpuset.CPUSet, error)
	ReleaseCpus(*cpuset.CPUSet, int, bool) (cpuset.CPUSet, error)
}

CPUAllocator is an interface for a generic CPU allocator

func NewCPUAllocator

func NewCPUAllocator(sys sysfs.System) CPUAllocator

NewCPUAllocator return a new cpuAllocator instance

type IDFilter

type IDFilter func(sysfs.ID) bool

IDFilter helps filtering Ids.

type IDSorter

type IDSorter func(int, int) bool

IDSorter helps sorting Ids.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL