View Single Post
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#3254
Originally Posted by Benson View Post
> It is difficult to say. The total energy from battery definitely increases with higher frequency even you run with low voltage. And most of that energy dissipates on CPU.

> Just to understand better that a small example. I ran a stock kernel and measured a current from battery under different frequencies. The 250MHz (playing MP3 music) takes only around 110mA but 600MHz (hard loop in shell) takes TEN times more - around 1400mA (screen is dark etc). But CPU VDD1 voltage still differs only 1.26 times (1.58 in square).

> So, the biggest power consumption increase is in frequency increase.

Your data's not sufficient to show that. You're running two quite different workloads, and I suspect it's not clocking most of the time with the MP3 load. Now if you run the same loop with the frequency limited to 250 MHz, you'd have an accurate comparison, and I'd expect the power to scale something like V^2*F.
OK, I re-did measurements with the same hard loop in shell. I used scaling_max_freq to limit to frequency to 250MHz and verified each time via scaling_cur_freq and cpuinfo_cur_freq. For more accurate measurement I switched phone to offline and delayed measurement via "sleep 10" after I locked phone.

In 600MHz I got

battery current = 1000mA (approx), w/out SmartReflex = 1200mA
VDD1 = 5 (1.350V)
VDD2 = 3 (1.200V)

In 250MHz I got

battery current = 400mA (pretty close), w/out SmartReflex = 460mA
VDD1 = 2 (1.075V)
VDD2 = 2 (1.075V)

("w/out SmartReflex" means setting 0 to /sys/power/sr_vdd1_autocomp and /sys/power/sr_vdd2_autocomp)

So, in accordance with your formula (V^2 * F) voltage increase should increase energy consumption by 1.58 but a real energy consumption increase is 6.25 due to (1000mA/400mA)^2, formula: W = I^2 * R. And frequency increase takes multiplier == 3.96 (3.96 * 1.58 == 6.25). So, frequency increase from 250 to 600 (2.4 times) increases energy consumption by 4 times. Almost double increase!


Additional results - on idle it take something from 22 to 39mA, doesn't depend from frequency. With VDD1/2 == 2 it is around 22, with VDD1 == 5 and VDD2 == 3 it is around 34.

Yet another result - on idle with scaling_max_freq == 250000 it actually sits with 500MHz but it is only during idle. With scaling_max_freq == 600000 it sits at normal 249600. And that is done inside kernel, the max and min still stay 250000.

Last edited by egoshin; 2010-04-23 at 05:50.