Date: Thu, 6 May 2004 10:46:49 -0700 (PDT) From: Nate Lawson <nate@root.org> To: Len Brown <len.brown@intel.com> Cc: Mike Silbersack <silby@silby.com> Subject: Re: power savings and usb Message-ID: <20040506104041.U42462@root.org> In-Reply-To: <1083861299.2296.107.camel@dhcppc4> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040506104041.U42462>