STRUCT EM_PERF_STATE(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… 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 ๐Ÿฆ‹

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