STRUCT EM_PERF_STATE(9)
๐ struct em_perf_state(9)
okay so bestie, welcome to struct em_perf_state(9) โ the Kernel API Manual page that's genuinely about the performance state of a performance domain. yes that's the NAME section, and yes it ate. this is a struct, it lives in the kernel, and it's lowkey the main character of energy-aware scheduling. periodt. โจ
๐ SYNOPSIS ๐
here's the whole vibe, literally character for character, don't touch:
struct em_perf_state {
unsigned long performance;
unsigned long frequency;
unsigned long power;
unsigned long cost;
unsigned long flags;
};
five unsigned long fields, all iconic, no notes. ๐ซถ
๐ MEMBERS ๐
performanceโ the CPU performance (aka capacity) at a given frequency. it's giving "how much can you actually do at this clock speed" energy. ๐ชfrequencyโ the frequency in KHz, kept in KHz for consistency with CPUFreq. yes, KHz, not MHz, not GHz, bestie โ consistency is the moment here. โญpowerโ the power consumed at this level (by 1 CPU or by a registered device). and ngl, it can be a total power: static and dynamic. both. together. ๐costโ the cost coefficient associated with this level, used during energy calculation. it's equal to:
10 * power * max_frequency / frequency
that's the whole formula, no cap. use it exactly. ๐งฎโจ
flagsโ see the"em_perf_state flags"description below. that's literally what it says, i'm just the messenger. ๐
๐ฆ SEE ALSO ๐ฆ
- Kernel file
./include/linux/energy_model.h struct em_perf_table(9)struct em_perf_domain(9)em_pd_get_efficient_state(9)em_cpu_energy(9)em_pd_nr_perf_states(9)em_perf_state_from_pd(9)
go read those too, they're all in the same friend group, iykyk. ๐
and that's the page, bestie! ๐ this one's from ./include/linux, dated October 2026, and it's literally titled struct em_perf_state(9) โ slay, go touch some energy model code, you got this ๐ธ๐
๐ฆ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms