runtimehandlerhooks

package
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HighPerformance contains the high-performance runtime handler name
	HighPerformance = "high-performance"
	// IrqBannedCPUConfigFile contains the original banned cpu mask configuration
	IrqBannedCPUConfigFile = "/etc/sysconfig/orig_irq_banned_cpus"
	// IrqSmpAffinityProcFile contains the default smp affinity mask configuration
	IrqSmpAffinityProcFile = "/proc/irq/default_smp_affinity"
)

Variables

This section is empty.

Functions

func RestoreIrqBalanceConfig added in v1.20.2

func RestoreIrqBalanceConfig(irqBalanceConfigFile, irqBannedCPUConfigFile, irqSmpAffinityProcFile string) error

RestoreIrqBalanceConfig restores irqbalance service with original banned cpu mask settings

func UpdateIRQSmpAffinityMask added in v1.20.0

func UpdateIRQSmpAffinityMask(cpus, current string, set bool) (cpuMask, bannedCPUMask string, err error)

UpdateIRQSmpAffinityMask take input cpus that need to change irq affinity mask and the current mask string, return an update mask string and inverted mask, with those cpus enabled or disable in the mask.

Types

type HighPerformanceHooks

type HighPerformanceHooks struct {
	// contains filtered or unexported fields
}

HighPerformanceHooks used to run additional hooks that will configure a system for the latency sensitive workloads

func (*HighPerformanceHooks) PreStart

func (*HighPerformanceHooks) PreStop

type RuntimeHandlerHooks

type RuntimeHandlerHooks interface {
	PreStart(ctx context.Context, c *oci.Container, s *sandbox.Sandbox) error
	PreStop(ctx context.Context, c *oci.Container, s *sandbox.Sandbox) error
}

func GetRuntimeHandlerHooks

func GetRuntimeHandlerHooks(ctx context.Context, config *libconfig.Config, handler string, annotations map[string]string) (RuntimeHandlerHooks, error)

GetRuntimeHandlerHooks returns RuntimeHandlerHooks implementation by the runtime handler name

Jump to

Keyboard shortcuts

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