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 = "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 NUMACPUsOfNode ¶
NUMACPUsOfNode Get CPU slice from the specified Node
Types ¶
type CpusetDevicePlugin ¶
func NewCpusetDevicePlugin ¶
func NewCpusetDevicePlugin(conf *config.Config) *CpusetDevicePlugin
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)
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)
func (*CpusetDevicePlugin) Start ¶
func (c *CpusetDevicePlugin) Start() error
Click to show internal directories.
Click to hide internal directories.