From owner-freebsd-current@FreeBSD.ORG Mon May 11 05:49:02 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 812B7106566B; Mon, 11 May 2009 05:49:02 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 515208FC15; Mon, 11 May 2009 05:49:02 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.14.3/8.14.3) id n4B5n1UB053816; Sun, 10 May 2009 22:49:01 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id uc8j7saqsugxnw4y76kruznc3i; Sun, 10 May 2009 22:49:01 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <4A07BC4D.7080604@freebsd.org> Date: Sun, 10 May 2009 22:49:01 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090409 SeaMonkey/1.1.15 MIME-Version: 1.0 To: Alexander Motin References: <49FE1826.4060000@FreeBSD.org> In-Reply-To: <49FE1826.4060000@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD acpi , FreeBSD-Current , 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, 11 May 2009 05:49:02 -0000 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