Date: Mon, 4 May 2009 20:19:01 +0200 From: Lucius Windschuh <lwindschuh@googlemail.com> To: Alexander Motin <mav@freebsd.org> Cc: freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Fighting for the power. Message-ID: <90a5caac0905041119h70101d12i56863e57b27d2e55@mail.gmail.com> In-Reply-To: <49FE1826.4060000@FreeBSD.org> References: <49FE1826.4060000@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
2009/5/4 Alexander Motin <mav@freebsd.org>: > 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 > [...] > =A0- 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=3D0 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 !=3D 0, ("lapic%u: zero divisor", lapic_id())); Did I forget something? My /boot/loader.conf: hint.p4tcc.0.disabled=3D1 hint.acpi_throttle.0.disabled=3D1 kern.hz=3D100 hint.atrtc.0.clock=3D0 hint.apic.0.clock=3D0 hint.ata.2.pm_level=3D2 hint.ata.3.pm_level=3D3 vm.pmap.pg_ps_enabled=3D1 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-CUR= RENT.txt Regards Lucius
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90a5caac0905041119h70101d12i56863e57b27d2e55>