STRUCT GLOBAL_PSTATE_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, struct global_pstate_info(9) β€” from the Kernel API Manual, hi β€” is the per policy data structure to maintain history of global pstates. That's the whole assignment, no cap. πŸ’…

✨ SYNOPSIS ✨

       struct global_pstate_info {
           int highest_lpstate_idx;
           unsigned int elapsed_time;
           unsigned int last_sampled_time;
           int last_lpstate_idx;
           int last_gpstate_idx;
           spinlock_t gpstate_lock;
           struct timer_list timer;
           struct cpufreq_policy *policy;
        };

🫢 Members 🫢

  • highest_lpstate_idx β€” the local pstate index from which we are ramping down. iconic.
  • elapsed_time β€” time in ms spent in ramping down from highest_lpstate_idx.
  • last_sampled_time β€” time from boot in ms when global pstates were last set.
  • last_lpstate_idx β€” last set value of local pstate and global. iykyk.
  • last_gpstate_idx β€” pstate in terms of cpufreq table index.
  • gpstate_lock β€” a spinlock to maintain synchronization between routines called by the timer handler and governer's target_index calls. keeping that spelling exactly, bestie 🫢
  • timer β€” is used for ramping down if cpu goes idle for a long time with global pstate held high.
  • policy β€” associated CPUFreq policy.

🌈 SEE ALSO 🌈

Kernel file ./drivers/cpufreq/powernv-cpufreq.c β€” plus struct pstate_idx_revmap_data(9), calc_global_pstate(9), and gpstate_timer_handler(9). Go read those too, fr fr.


xoxo, your kernel bestie πŸ§šπŸ’œ β€” source/version: ./drivers/cpufreq; date: October 2026; this page: struct global_pstate_info(9). periodt ✨

πŸ“¦ where this page comes from