From owner-freebsd-acpi@FreeBSD.ORG Thu May 6 10:46:49 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2AEBD16A4CE for ; Thu, 6 May 2004 10:46:49 -0700 (PDT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id AE71F43D1F for ; Thu, 6 May 2004 10:46:48 -0700 (PDT) (envelope-from nate@root.org) Received: (qmail 42497 invoked by uid 1000); 6 May 2004 17:46:49 -0000 Date: Thu, 6 May 2004 10:46:49 -0700 (PDT) From: Nate Lawson To: Len Brown In-Reply-To: <1083861299.2296.107.camel@dhcppc4> Message-ID: <20040506104041.U42462@root.org> References: <200405052004.i45K4EnF029671@repoman.freebsd.org> <20040506025051.V630@odysseus.silby.com> <20040506035840.G811@odysseus.silby.com> <20040506084132.L41848@root.org> <1083861299.2296.107.camel@dhcppc4> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: acpi@freebsd.org cc: Mike Silbersack Subject: Re: power savings and usb X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2004 17:46:49 -0000 On Thu, 6 May 2004, Len Brown wrote: > On Thu, 2004-05-06 at 11:50, Nate Lawson wrote: > > Nope, we auto-switch cpu idle values (and optionally throttle states) on > > AC line transition. See /etc/rc.d/power_profile and the options in > > /etc/defaults/rc.conf: > > > > performance_cx_lowest="HIGH" # Online CPU idle state > > performance_throttle_state="HIGH" # Online throttling state > > economy_cx_lowest="LOW" # Offline CPU idle state > > economy_throttle_state="HIGH" # Offline throttling state > > > > The default online is to use C1 (or HLT as it's known elsewhere). This is > > existing behavior. The default offline is to switch to the lowest state > > available. On my laptop, this is C3. (The default for throttling is to > > leave it off since it is more disruptive). The problem with C3 is that if > > you have USB loaded, it is rarely used for idling as USB constantly uses > > bus mastering in polling for new devices. This is ok since we demote to > > C2 in this case. You can observe this via sysctl hw.acpi.cpu: > > > > hw.acpi.cpu.cx_supported: C1/0 C2/84 C3/120 > > hw.acpi.cpu.cx_lowest: 1 > > hw.acpi.cpu.cx_history: 9175/0 173443/9175 0/0 > > > > This means I am requesting a lowest sleep of C2 (idx 1 of the options > > supported). The history values show that I haven't used C3 at all and am > > using C2 at a rate of about 95%. > > > > ohci may have problems with C3. On my uhci, it demotes to C2 without > > causing problems. You can override this by setting in /etc/rc.conf: > > > > economy_cx_lowest="1" > > Why disable C3 when plugged into AC? > Seems to me that if the hardware supports it, default should be to use > it whenever the latency and bus master activity allow us to. Well, the default is to use only C1 when on AC and the lowest available (in many cases, C3) when off AC. The reason for this is that many server-class machines run FreeBSD and we didn't want to affect performance in any way. If people find that C2 on a server works for them, they can easily override this by setting performance_cx_lowest="1" in /etc/rc.conf. On laptops, once you're off AC power, you really want to do everything you can to save batteries that doesn't drastically affect performace. Idle states are a minor impact on performance and so I chose as the default to use the lowest possible when on batteries. Again, this can be overridden. Once more hardware becomes available that has low-impact C3+ states (i.e. 20 usec or so), we can move to that as the default. I expect later this year that we should see server machines using a big bundle of P4-M or similar parts and so then Cx states will move out of a pure laptop solution. -Nate