sched/power: alwas take into current integral into account
authorLukasz Luba <l.luba@partner.samsung.com>
Thu, 8 Nov 2018 19:33:49 +0000 (20:33 +0100)
committerLukasz Luba <l.luba@partner.samsung.com>
Fri, 17 May 2019 07:15:49 +0000 (09:15 +0200)
In controler algorithm take into account current overshout error
and don't wait till next period.

Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
kernel/sched/power.c

index 20f5618d8f2b949ab411c23f7240763b028e645b..8bd8502681e3073ac0b059d54d42d1dfa8a04c0b 100644 (file)
@@ -548,7 +548,7 @@ static u32 calc_power_budget(struct _thermal_zone *zone)
        i = zone->trip_ctrl_alg.integral * k_i;
 
        if (temp_diff < 0) {
-               s64 i_0 = i + k_i * temp_diff;
+               i += k_i * temp_diff;
 
                zone->trip_ctrl_alg.integral += temp_diff;
        }