Fighting for the power.

Tim Kientzle kientzle at freebsd.org
Mon May 11 06:14:00 UTC 2009


Alexander Motin wrote:
> I would like to summarize some of my knowledge on reducing FreeBSD power
> consumption and describe some new things I have recently implemented in
> 8-CURRENT. ...

This is great work!

>  - C3 state allows CPU completely stop all internal clocks, reduce
> voltage and disconnect from system bus. This state gives additional
> power saving effect, but ....  local APIC timers in
> each CPU core, used by FreeBSD as event sources on SMP, are not
> functioning. ...  Originally, before SMP era, FreeBSD used i8254 (for HZ)
> and RTC (for stats) chipset timers. I have made changes to 8-CURRENT to
> resurrect them for SMP systems. To use them, you can disable local APIC
> timers by adding to /boot/loader.conf:
> hint.apic.0.clock=0

I experimented a little bit with this and had a few
odd experiences:
  sysctl hw.acpi.cpu.cx_lowest=C3
did drop power consumption significantly but made the
system pretty unresponsive.  In particular, the
system completely hung at shutdown.

I presume the hang was the APIC timer problem you mentioned.
I started to try the "hint.apic.0.clock", but noticed
in your commit r191720:
> Add hint.apic.0.clock tunable. Setting it 0 disables using
> LAPIC timers as hard-/stat-/profclock sources falling back
> to using i8254 and rtc timers.
> ...
> This technique is not working for SMP yet, as only one CPU
> receives timer interrupts. But I think that problem could
> be fixed by forwarding interrupts to other CPUs with IPI.

Is anyone looking at this yet?

Tim


More information about the freebsd-mobile mailing list