Re: Fighting for the power.

Lucius Windschuh <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile,gmane.os.freebsd.current
Message-ID <[email protected]>
2009/5/4 Alexander Motin <[email protected]>:
> 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. The main character of this story is my 12" Acer TravelMate
> 6292 laptop with C2D T7700 2.4GHz CPU, 965GM chipset and SATA HDD, under
> amd64 8-CURRENT.

First, thank you for your report about power saving on current laptops. :-)

> 1. CPU
> [...]
>  - C3 state allows CPU completely stop all internal clocks, reduce
> voltage and disconnect from system bus. This state gives additional
> power saving effect, but it is not cheap and require trade-offs.
> As soon as CPU is completely stopped in C3 state, local APIC timers in
> each CPU core, used by FreeBSD as event sources on SMP, are not
> functioning. It stops system time, breaks scheduling that makes system
> close to dead. The only solution for this problem is to use some
> external timers. 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 tried this on CURRENT@r191784 (i386) on a Thinkpad T400 (Intel(R)
Core(TM)2 Duo CPU T9400) with INVARIANTS, etc. enabled.
The result was a panic shortly before /sbin/init is called:

panic: lapic1: zero divisor

So, the KASSERT in sys/i386/local_apic.c:325 fired:
    KASSERT(lapic_timer_period != 0, ("lapic%u: zero divisor",
        lapic_id()));

Did I forget something?

My /boot/loader.conf:
  hint.p4tcc.0.disabled=1
  hint.acpi_throttle.0.disabled=1
  kern.hz=100
  hint.atrtc.0.clock=0
  hint.apic.0.clock=0
  hint.ata.2.pm_level=2
  hint.ata.3.pm_level=3
  vm.pmap.pg_ps_enabled=1

dmesg: http://sites.google.com/site/lwfreebsd/Home/files/dmesg-T400-FreeBSD-CURRENT.txt
kernel config: http://sites.google.com/site/lwfreebsd/Home/files/kernel-CURRENT.txt


Regards

Lucius
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.