Messages in this thread | | | Date | Mon, 13 Dec 2004 13:58:20 +0000 | From | Russell King <> | Subject | Re: dynamic-hz |
| |
On Mon, Dec 13, 2004 at 08:43:55AM +0100, Stefan Seyfried wrote: > Con Kolivas wrote: > > Just being devils advocate here... > > > > I had variable Hz in my tree for a while and found there was one > > solitary purpose to setting Hz to 100; to silence cheap capacitors. > > power savings? Having the cpu wake up 1000 times per second if the > machine is idle cannot be better than only waking it up 100 times. > > Yes, i am always on the quest for the 5 extra minutes on battery :-)
This is an easy thing to grab hold of, but rather pointless in the overall scheme of things. Those of us who have done power usage measurements know this already.
The only case where this really makes sense is where the CPU power usage outweighs the power consumption of all other peripherals by at least an order of magnitude such that the rest of the system is insignificant compared to the CPU power.
Lets take an example. Lets say that: * a CPU runs at about 245mA when active * 90mA when inactive * the timer interrupt takes 2us to execute 1000 times a second * no other processing is occuring
This means that the average current consumption is about: 245mA * 2 * 10^-6 + 90mA * (1 - 2 * 10^-6) = 90.00031mA
This means that the timer interrupt has increased CPU power by 0.00034%.
Now, lets factor in the rest of a system. Lets the rest of the system takes 84mA. Recalculating (by increasing each figure by 84mA) gives us 174.00031mA, or an increase in overall system power by about 0.00018%.
Assuming your battery normally lasts exactly 24 hours on a current drain of 174.00031mA, completely eliminating the tick gives you an extra 0.15 seconds battery life.
Note: the above CPU power consumption figures were taken from the Intel PXA255 processor electrical specifications, and the "rest of the system" current consumption taken from a real life device. The timer interrupt taking 2us is probably an over- estimation. Only the battery lifetime of 24 hours is ficticious.
And yes, from time to time I keep thinking that it would be nice to eliminate the timer tick to save some power. However, I've never been able to justify the extra code complexity against the power savings. It really only makes sense if you can essentially _power off_ your system until the next timer interrupt (thereby, in the above example, reducing the power consumption by some 174mA)
-- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |