Documentation
¶
Overview ¶
Package cpuidle is the C-state writer used by the cpuclass handler. It wraps the goresctrl cstates library, exposing a uniform Hooks-injectable interface that matches the cpufreq and uncorefreq writers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hooks ¶
Hooks lets tests intercept the cstate apply operations without touching real sysfs. Production use leaves all hooks nil; the writer then talks to the platform via goresctrl. The two hooks mirror the two Apply calls performed per enforce(): enable and disable.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer enforces per-class enable/disable bits across the cstate names exposed by the platform. The cstates handle is created lazily on first enforce() call that has any disabled cstates; hosts and tests that never request a cstate change therefore never touch the cpuidle sysfs.
func NewWriter ¶
NewWriter returns a Writer wired to the given hooks. Pass a zero-valued Hooks to use real sysfs via goresctrl.