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 theoverall scheme of things.  Those of us who have done power usagemeasurements know this already.The only case where this really makes sense is where the CPU powerusage outweighs the power consumption of all other peripherals byat least an order of magnitude such that the rest of the system isinsignificant 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 occuringThis means that the average current consumption is about:	245mA * 2 * 10^-6 + 90mA * (1 - 2 * 10^-6) = 90.00031mAThis means that the timer interrupt has increased CPU power by0.00034%.Now, lets factor in the rest of a system.  Lets the rest of thesystem takes 84mA.  Recalculating (by increasing each figure by84mA) gives us 174.00031mA, or an increase in overall systempower by about 0.00018%.Assuming your battery normally lasts exactly 24 hours on a currentdrain of 174.00031mA, completely eliminating the tick gives youan extra 0.15 seconds battery life.Note: the above CPU power consumption figures were taken fromthe Intel PXA255 processor electrical specifications, and the"rest of the system" current consumption taken from a real lifedevice.  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 niceto eliminate the timer tick to save some power.  However, I'venever been able to justify the extra code complexity against thepower 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" inthe body of a message to majordomo@vger.kernel.orgMore majordomo info at  http://vger.kernel.org/majordomo-info.htmlPlease read the FAQ at  http://www.tux.org/lkml/`

Last update: 2005-03-22 14:08    [from the cache]
©2003-2010