From owner-freebsd-acpi@FreeBSD.ORG Fri Feb 15 09:15:56 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF2D916A417 for ; Fri, 15 Feb 2008 09:15:56 +0000 (UTC) (envelope-from bengta@P142.sics.se) Received: from kloster.sics.se (kloster.sics.se [193.10.65.127]) by mx1.freebsd.org (Postfix) with ESMTP id 4E2B813C50A for ; Fri, 15 Feb 2008 09:15:55 +0000 (UTC) (envelope-from bengta@P142.sics.se) Received: from P142.sics.se (P142.sics.se [193.10.66.253]) by kloster.sics.se (8.13.7/8.13.7) with ESMTP id m1F9FlQ1019280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Feb 2008 10:15:47 +0100 Received: from P142.sics.se (localhost [127.0.0.1]) by P142.sics.se (8.14.2/8.14.2) with ESMTP id m1F9Fkhk001442; Fri, 15 Feb 2008 10:15:47 +0100 (CET) (envelope-from bengta@P142.sics.se) Received: (from bengta@localhost) by P142.sics.se (8.14.2/8.14.2/Submit) id m1F9Fjrg001441; Fri, 15 Feb 2008 10:15:45 +0100 (CET) (envelope-from bengta@P142.sics.se) To: "Kevin Oberman" From: Bengt Ahlgren In-Reply-To: <20080214200536.49E214500F@ptavv.es.net> (Kevin Oberman's message of "Thu\, 14 Feb 2008 12\:05\:36 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) References: <20080214200536.49E214500F@ptavv.es.net> Date: Fri, 15 Feb 2008 10:15:45 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-acpi@freebsd.org, Andriy Gapon Subject: Re: cx_lowest and CPU usage X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2008 09:15:56 -0000 "Kevin Oberman" writes: >> From: Bengt Ahlgren >> Date: Thu, 14 Feb 2008 18:14:33 +0100 >> Sender: owner-freebsd-acpi@freebsd.org >> >> Andriy Gapon writes: [...] >> > C2 has even stranger effects. >> > On almost idle system, with cx_lowest=C1, top reports about 0-2% user, >> > 0% nice, 0-2% system, 1-2% interrupt, 94-98% idle. >> > After changing cx_lowest to C2, I see the following: 0-2% user, 0% nice, >> > 0-2% system, 94-98% interrupt, 1-2% idle. >> >> I see a similar effect on my TP with Pentium-M when it is in C3 or C4, >> but it's more in the order of 4% when in C3 and some 10-15% in C4. I >> think that the additional time accounted to interrupts is due to the >> time it takes to wake the CPU up from the particular Cx-state. My C3 >> takes 85 (us?? or cycles???): (Just for the record: it's more like 6-9% using C4, not 10-15%.) >> [root@P142 ~]# sysctl dev.cpu.0.cx_supported >> dev.cpu.0.cx_supported: C1/1 C2/1 C3/85 >> >> [...] >> >> > Just in case, here's a little bit of sysctl output: >> > dev.cpu.0.freq: 448 >> > dev.cpu.0.freq_levels: 448/-1 224/-1 >> > dev.cpu.0.cx_supported: C1/0 C2/90 >> > dev.cpu.0.cx_lowest: C2 >> > dev.cpu.0.cx_usage: 1.71% 98.28% >> >> With this slow CPU, a wakeup time of 90 from C2 could very well result >> in this much interupt time. It just barely manages to wake up, >> execute the clock interrupt and go to sleep again before the next >> clock interrupt. What if you reduce HZ? > > Possible dumb question. Do you (either of you) have USB drivers in your > kernel or loaded? > > This is just a shot in the dark, but I have seen weird things when I > have USB drivers loaded and usually don't load them on my laptop > until/unless I need them. At very least, USB kills the battery on my > T43 a LOT faster. Nope, no USB driver, since it prevents C3 or higher to be used. I also load it only when I need it. I have not tried it, but reducing hz to 100 should save even more battery when using C3/C4, since the system wakes up less often. Bengt