From owner-freebsd-current@FreeBSD.ORG Mon May 4 18:40:41 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 714FF1065708; Mon, 4 May 2009 18:40:41 +0000 (UTC) (envelope-from lwindschuh@googlemail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id 13BAF8FC0C; Mon, 4 May 2009 18:40:40 +0000 (UTC) (envelope-from lwindschuh@googlemail.com) Received: by yx-out-2324.google.com with SMTP id 8so2476384yxb.13 for ; Mon, 04 May 2009 11:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pVHndkLoel/dDf3T7QhRgr0F+FW0JewyPjQJXOv+qAk=; b=dqFTBCu/S235gSWzohtF25MZuLELY+lmvrcMo3ndRSqXzyd1z/uRSYDA9VZwEgSJ3j Mt7G1wsdONmS8X7Dld/9z/KJBsuuM2YmQDNxxxyVcIZEfWRxuoPVYNfBw6vwZ+a8/QIt ZIKV8O7ZM6XUQlt8Hgj71mdYb6wC/f+1DXICg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=i0r/ZX4mJVU/gIIVt0c6+yUN1DnlN+3T+R/MCZ32ESmsZ1tE/oV1nSfcQJ9YRU+Jal 9KbZWDcYvQLIDIH6MSjyAzhNp91np8xgyo3JOegh2gSjPUrXAE3V8hZZIzpaMOrJF4XL efg4CM4b+inmZHJpjBZWnpLOqxtHO6I50o5/k= MIME-Version: 1.0 Received: by 10.150.138.8 with SMTP id l8mr12588155ybd.63.1241461141253; Mon, 04 May 2009 11:19:01 -0700 (PDT) In-Reply-To: <49FE1826.4060000@FreeBSD.org> References: <49FE1826.4060000@FreeBSD.org> Date: Mon, 4 May 2009 20:19:01 +0200 Message-ID: <90a5caac0905041119h70101d12i56863e57b27d2e55@mail.gmail.com> From: Lucius Windschuh To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Fighting for the power. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 18:40:42 -0000 2009/5/4 Alexander Motin : > 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