pid_controller(9)
β¨ NAME β¨
okay bestie, welcome to the pid_controller(9) page from the Kernel API Manual. The star of the show is pid_controller β literally a PID controller, no cap. π
π¦ SYNOPSIS π¦
u32 pid_controller (struct thermal_zone_device *tz , int control_temp ,
u32 max_allocatable_power );
πΈ ARGUMENTS πΈ
tzβ the thermal zone we're operating in. that's the arena. ποΈcontrol_tempβ the target temperature, in millicelsius. yes, milli. keep the units, bestie. π‘οΈmax_allocatable_powerβ the maximum allocatable power for this thermal zone. that's the ceiling. π§
π DESCRIPTION π
This PID controller increases the available power budget so the thermal zone's temperature gets as close as possible to control_temp β and if the temperature exceeds that target, it limits the power. slay, boundaries. β
k_po is the proportional term for when we're overshooting. k_pu is the proportional term for when we're undershooting. both iconic, both doing their job. βοΈ
integral_cutoff is a threshold β below it, we stop accumulating the error. The accumulated error only counts if the requested power will actually make the system warmer. π₯ And if the system is mostly idle? there's no point in accumulating positive error, bestie. it's giving waste of energy. π
π RETURN π
The power budget for the next period. that's the whole return bag. π°β¨
π₯ SEE ALSO π₯
- Kernel file:
./drivers/thermal/gov_power_allocator.cβ go read the source, iykyk. π mul_frac(9)div_frac(9)struct power_actor(9)struct power_allocator_params(9)estimate_sustainable_power(9)estimate_pid_constants(9)get_sustainable_power(9)power_actor_set_power(9)divvy_up_power(9)get_governor_trips(9)check_power_actors(9)power_allocator_bind(9)
mwah π this page lives under ./drivers/thermal, dated October 2026, and it's pid_controller(9) β bye bestie, go budget that power responsibly. π«Άβ¨
π¦ 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