RFC: powerd algorithms enhancements

Alexander Motin mav at FreeBSD.org
Wed Nov 5 23:02:23 PST 2008


> The biggest problem I see with powerd is that when a system is running 
> with a reduced clock frequency interrupts are not processed at full 
> clock speed.  This, for example, breaks the ath driver which can 
> generate interrupts very quickly when  h/w MIB counters overflow in a 
> noisy environment.  Because processing happens at the reduced frequency 
> until powerd gets to run it causes livelock

You wanted to say that ath driver/hardware unable to operate on slow CPUs? Ok, but may be it is an ath driver problem? May be it must use some kind of interrupt moderation to avoid it?

> (or perhaps powerd does not 
> raise the clock frequency because it's only accounting for user code--I 
> haven't looked).

powerd counts all nonidle load from system CPU stats. My patch makes it even more accurate in some cases.

> There's been talk about temporarily boosting the clock frequency in the 
> kernel when processing interrupts.

I am not sure it is a good idea. First, CPU may not be able to adapt it's power (voltage) level so fast, and the second, one of powerd goals is to deny CPU reach full frequency until it is really needed to reduce peak current cunsumption which will drain battery faster.

-- 
Alexander Motin


More information about the freebsd-mobile mailing list