cpuset_device

package
v1.28.0-alpha.39 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KubeletSocketName socket file name for kubelet
	KubeletSocketName = "kubelet.sock"
	// CpusetSocketName socket file name for cpuset
	CpusetSocketName = "bcs-cpuset-device.sock"
	// CpusetResourceName resource name for cpuset
	CpusetResourceName = "bkbcs.tencent.com/cpuset"

	// EnvBkbcsAllocateCpuset docker env, examples: bkbcs_allocate_cpuset=node:0;cpuset:0,1,2,3
	EnvBkbcsAllocateCpuset = "bkbcs_allocate_cpuset"

	// EnvBcsCpusetCheckIntervalMinute env name for check interval
	EnvBcsCpusetCheckIntervalMinute = "BKBCS_CPUSET_CHECK_INTERVAL_MINUTE"
	// EnvBcsCpusetCleanDelayMinute env name for cpuset expire duration
	EnvBcsCpusetCleanDelayMinute = "BKBCS_CPUSET_CLEAN_DELAY_MINUTE"
)

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
}

CpusetDevicePlugin device plugin for cpuset

func NewCpusetDevicePlugin

func NewCpusetDevicePlugin(conf *config.Config) *CpusetDevicePlugin

NewCpusetDevicePlugin new cpuset device plugin

func (*CpusetDevicePlugin) Allocate

Allocate which return list of devices.

func (*CpusetDevicePlugin) GetDevicePluginOptions

GetDevicePluginOptions get device plugin options

func (*CpusetDevicePlugin) ListAndWatch

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

func (*CpusetDevicePlugin) PreStartContainer

PreStartContainer callback before starting container

func (*CpusetDevicePlugin) Start

func (c *CpusetDevicePlugin) Start() error

Start start cpu device plugin

Jump to

Keyboard shortcuts

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