calc_global_pstate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

calc_global_pstate β€” calculate global pstate. This page is from the Kernel API Manual, and the full title energy is calc_global_pstate(9). Bestie, we're in the cpufreq group chat now. πŸ’–


🌸 SYNOPSIS 🌸

int calc_global_pstate (unsigned int elapsed_time , int highest_lpstate_idx , int local_pstate_idx );

It's giving int, periodt. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • elapsed_time β€” elapsed time in milliseconds. Literally milliseconds, no cap. ⏱️
  • highest_lpstate_idx β€” the pstate from which it's ramping down. πŸ“‰
  • local_pstate_idx β€” the new local pstate. πŸ†•

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so what this function does: it finds the appropriate global pstate based on the pstate from which it's ramping down and the time elapsed in ramping down. It follows a quadratic equation β€” yes, math ate β€” and that equation ensures it reaches ramping down to pmin in 5sec. That's the whole tea. 🌈


πŸ’… SEE ALSO πŸ’…

  • Kernel file ./drivers/cpufreq/powernv-cpufreq.c
  • struct global_pstate_info(9)
  • struct pstate_idx_revmap_data(9)
  • gpstate_timer_handler(9)

mwah πŸ’‹ shoutout to the footer glow-up: source/version ./drivers/cpufreq, date October 2026, title calc_global_pstate(9). That's the sign-off, bestie. 🫢

πŸ“¦ where this page comes from