cpuset_device

package
v1.20.9 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeletSocketName  = "kubelet.sock"
	CpusetSocketName   = "cpuset.sock"
	CpusetResourceName = "bkbcs.tencent.com/cpuset"

	//docker env, examples: bkbcs_allocate_cpuset=node:0;cpuset:0,1,2,3
	EnvBkbcsAllocateCpuset = "bkbcs_allocate_cpuset"
)
View Source
const CgroupCpusetRoot = "/sys/fs/cgroup/cpuset/docker"

Variables

View Source
var ErrNumaNotAvailable = fmt.Errorf("No NUMA support available on this system")

ErrNumaNotAvailable error type for NUMA

Functions

func IsNumaAvailable

func IsNumaAvailable() bool

IsNumaAvailable Is Numa available

func NUMACPUsOfNode

func NUMACPUsOfNode(node string) ([]string, error)

NUMACPUsOfNode Get CPU slice from the specified Node

func NUMAConfiguredCPUs

func NUMAConfiguredCPUs() int

NUMAConfiguredCPUs get configure cpu number

func NUMANodes

func NUMANodes() ([]string, error)

NUMANodes Get Numa Nodes

Types

type CpusetDevicePlugin

type CpusetDevicePlugin struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewCpusetDevicePlugin

func NewCpusetDevicePlugin(conf *config.Config) *CpusetDevicePlugin

func (*CpusetDevicePlugin) Allocate

Allocate which return list of devices.

func (*CpusetDevicePlugin) GetDevicePluginOptions

func (*CpusetDevicePlugin) ListAndWatch

ListAndWatch lists devices and update that list according to the health status

func (*CpusetDevicePlugin) Start

func (c *CpusetDevicePlugin) Start() error

Jump to

Keyboard shortcuts

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