Documentation ¶
Index ¶
- Constants
- Variables
- func IsNumaAvailable() bool
- func NUMACPUsOfNode(node string) ([]string, error)
- func NUMAConfiguredCPUs() int
- func NUMANodes() ([]string, error)
- type CpusetDevicePlugin
- func (c *CpusetDevicePlugin) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (c *CpusetDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (c *CpusetDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (c *CpusetDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (c *CpusetDevicePlugin) Start() error
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 NUMACPUsOfNode ¶
NUMACPUsOfNode Get CPU slice from the specified Node
Types ¶
type CpusetDevicePlugin ¶
CpusetDevicePlugin device plugin for cpuset
func NewCpusetDevicePlugin ¶
func NewCpusetDevicePlugin(conf *config.Config) *CpusetDevicePlugin
NewCpusetDevicePlugin new cpuset device plugin
func (*CpusetDevicePlugin) Allocate ¶
func (c *CpusetDevicePlugin) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) ( *pluginapi.AllocateResponse, error)
Allocate which return list of devices.
func (*CpusetDevicePlugin) GetDevicePluginOptions ¶
func (c *CpusetDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) ( *pluginapi.DevicePluginOptions, error)
GetDevicePluginOptions get device plugin options
func (*CpusetDevicePlugin) ListAndWatch ¶
func (c *CpusetDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status
func (*CpusetDevicePlugin) PreStartContainer ¶
func (c *CpusetDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) ( *pluginapi.PreStartContainerResponse, error)
PreStartContainer callback before starting container
func (*CpusetDevicePlugin) Start ¶
func (c *CpusetDevicePlugin) Start() error
Start start cpu device plugin
Click to show internal directories.
Click to hide internal directories.