STRUCT PSTATE_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct pstate_data(9) πŸ’–

okay bestie, welcome to the Kernel API Manual glow-up ✨ this one's all about struct pstate_data, and it's giving "per-CPU P-state lore" in the best way possible πŸŽ€


✨ NAME ✨

struct pstate_data β€” literally the place where P state data is stored, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the struct in all its iconic glory, copy it exactly bestie:

struct pstate_data {
    int current_pstate;
    int min_pstate;
    int max_pstate;
    int max_pstate_physical;
    int perf_ctl_scaling;
    int scaling;
    int turbo_pstate;
    unsigned int min_freq;
    unsigned int max_freq;
    unsigned int turbo_freq;
 };

πŸ‘‘ Members πŸ‘‘

  • current_pstate β€” the current requested P state, aka the main character of the moment 🌟
  • min_pstate β€” the minimum P state this platform can even do, the floor bestie 🫢
  • max_pstate β€” the maximum P state this platform can do, the ceiling ✨
  • max_pstate_physical β€” this is the physical max P state for a processor πŸ’€ and yes, it can be higher than max_pstate, because max_pstate can be limited by platform thermal design power limits β€” thermal said "not today" 🌑️
  • perf_ctl_scaling β€” the PERF_CTL P-state to frequency scaling factor, math but make it slay πŸ”₯
  • scaling β€” the scaling factor between performance and frequency, the vibe check between the two βš–οΈ
  • turbo_pstate β€” the max Turbo P state possible for this platform, zoom zoom 🏎️
  • min_freq β€” the min_pstate frequency in cpufreq units, frequency but tiny πŸ“
  • max_freq β€” the max_pstate frequency in cpufreq units, frequency but big 🌈
  • turbo_freq β€” the turbo_pstate frequency in cpufreq units, frequency but turbo-charged ⚑

🌸 Description 🌸

so what does this struct actually do? it stores the per cpu model P state limits and the current P state. that's it, that's the tea β˜• β€” per-CPU model limits plus the current state, all cozy in one struct πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/cpufreq/intel_pstate.c
  • struct sample(9)
  • struct vid_data(9)
  • struct global_params(9)
  • struct cpudata(9)
  • struct pstate_funcs(9)

bestie if you're touching this struct, you're already in the cpufreq deep end β€” hydrate and read the whole file, fr fr πŸ˜­πŸ’–

kisses and good vibes from the ./drivers/cpufreq girlies 🫢✨ this page is brought to you by the Kernel API Manual, dated October 2026, and yes it's still struct pstate_data(9) β€” periodt πŸ’…πŸ‘‘

πŸ“¦ where this page comes from