calc_global_pstate(9)
β¨ 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
- 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