Documentation ¶
Index ¶
- Constants
- func CPUListToHexMask(cpulist string) (hexMask string, err error)
- func CPUListToMaskList(cpulist string) (hexMask string, err error)
- func CPUMaskToCPUSet(cpuMask string) (cpuset.CPUSet, error)
- func GetComponentName(profileName string, prefix string) string
- func GetFirstKeyAndValue(m map[string]string) (string, string)
- func SplitLabelKey(s string) (domain, role string, err error)
- type CPULists
Constants ¶
const ( // ComponentNamePrefix defines the worker role for performance sensitive workflows // TODO: change it back to longer name once https://bugzilla.redhat.com/show_bug.cgi?id=1787907 fixed // ComponentNamePrefix = "worker-performance" ComponentNamePrefix = "performance" // MachineConfigRoleLabelKey is the label key to use as label and in MachineConfigSelector of MCP which targets the performance profile MachineConfigRoleLabelKey = "machineconfiguration.openshift.io/role" // NodeRoleLabelPrefix is the prefix for the role label of a node NodeRoleLabelPrefix = "node-role.kubernetes.io/" )
const ( // NamespaceNodeTuningOperator defines the tuned profiles namespace NamespaceNodeTuningOperator = "openshift-cluster-node-tuning-operator" // ProfileNamePerformance defines the performance tuned profile name ProfileNamePerformance = "openshift-node-performance" )
const ( // HugepagesSize2M contains the size of 2M hugepages HugepagesSize2M = "2M" // HugepagesSize1G contains the size of 1G hugepages HugepagesSize1G = "1G" )
const (
// AssetsDir defines the directory with assets under the operator image
AssetsDir = "/assets"
)
Variables ¶
This section is empty.
Functions ¶
func CPUListToHexMask ¶
CPUListToHexMask converts a list of cpus into a cpu mask represented in hexdecimal
func CPUListToMaskList ¶
CPUListToMaskList converts a list of cpus into a cpu mask represented in a list of hexadecimal mask devided by a delimiter ","
func CPUMaskToCPUSet ¶
CPUMaskToCPUSet parses a CPUSet received in a Mask Format, see: https://man7.org/linux/man-pages/man7/cpuset.7.html#FORMATS
func GetComponentName ¶
GetComponentName returns the component name for the specific performance profile
func GetFirstKeyAndValue ¶
GetFirstKeyAndValue return the first key / value pair of a map
func SplitLabelKey ¶
SplitLabelKey returns the given label key splitted up in domain and role
Types ¶
type CPULists ¶
type CPULists struct {
// contains filtered or unexported fields
}
CPULists allows easy checks between reserved and isolated cpu set definitons
func NewCPULists ¶
NewCPULists parse text representations of reserved and isolated cpusets definiton and returns a CPULists object
func (*CPULists) CountIsolated ¶
CountIsolated returns how many isolated cpus where specified