Documentation
¶
Overview ¶
Package types defines the internal class-definition struct used by the cpuclass writers (cpufreq, cpuidle, uncorefreq). It exists as a separate package so each writer can depend on the same struct without depending on the public cpuclass API or on the soon-to-be-deprecated control/cpu config package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocationHints ¶
type AllocationHints struct {
Prefer []CpuPreference
Avoid []CpuPreference
}
AllocationHints carries technology-agnostic placement preferences for an upcoming allocation. Both slices are ordered by descending priority.
type AllocationIntent ¶
type AllocationIntent struct {
ClassName string
CurrentCpus cpuset.CPUSet
FreeCpus cpuset.CPUSet
RequestedCount int
}
AllocationIntent describes an upcoming CPU allocation for which the caller wants placement preferences. Lives here so internal helpers (e.g. pct) can implement Hints without depending on the public cpuclass package.
type CPUSet ¶
CPUSet aliases cpuset.CPUSet for callers that want to refer to it via this package without re-importing pkg/utils/cpuset.
type ClassDef ¶
type ClassDef struct {
MinFreq uint
MaxFreq uint
EnergyPerformancePreference uint
UncoreMinFreq uint
UncoreMaxFreq uint
FreqGovernor string
DisabledCstates []string
}
ClassDef is the resolved, platform-aware definition of a CPU class as consumed by the writers. All frequency fields are in kHz; zero means "no enforcement". Symbolic frequencies in the user-facing configuration are resolved before being placed into a ClassDef.
type CpuPreference ¶
CpuPreference is a named CPU set carrying a single placement preference (prefer or avoid depending on the slice it appears in).