From owner-freebsd-current@FreeBSD.ORG Sun Jan 13 01:03:30 2008 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 196D516A41A for ; Sun, 13 Jan 2008 01:03:30 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.freebsd.org (Postfix) with ESMTP id ED0EB13C458 for ; Sun, 13 Jan 2008 01:03:29 +0000 (UTC) (envelope-from nate@root.org) Received: (qmail 35868 invoked from network); 13 Jan 2008 01:03:30 -0000 Received: from ppp-71-139-9-226.dsl.snfc21.pacbell.net (HELO ?10.0.5.18?) (nate-mail@71.139.9.226) by root.org with ESMTPA; 13 Jan 2008 01:03:30 -0000 Message-ID: <4789635E.609@root.org> Date: Sat, 12 Jan 2008 17:03:26 -0800 From: Nate Lawson User-Agent: Thunderbird 2.0.0.9 (X11/20071122) MIME-Version: 1.0 To: Igor Mozolevsky References: <20080111181344.5E7244500E@ptavv.es.net> <478930D2.90806@digifonica.com> In-Reply-To: X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: njl@freebsd.org, bruno@freebsd.org, Stefan Lambrev , freebsd-current@freebsd.org, =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , Maxim Sobolev Subject: Re: powerd adaptive mode latching 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: Sun, 13 Jan 2008 01:03:30 -0000 Igor Mozolevsky wrote: > On 12/01/2008, Maxim Sobolev wrote: >> I wonder if somebody did measurement of power consumption with powerd >> and without it on typical tasks. There is very interesting idea in the >> last issue of ACM Queue that it might be much more beneficial to run CPU >> at the full speed and then switch it to low-power mode as soon as >> possible in the idle loop than to run longer at reduced speed for a >> longer period of time. > > That's a pretty neat idea, and will certainly get rid of the polling > issue. The scheduler could scale the cpu clock, but I presume it would > require some hacking effort... Note that we've known this for a long time. The ACPI CPU idling code (C1-C3) aggressively tries to sleep a long time unless it has been woken up by interrupts several times recently. For powerd and Enhanced Speedstep (no throttling), it's often best to run at the highest CPU speed while tasks are runnable and then go straight to the lowest when the user stops typing. As time goes by, the latency for switching modes keeps going down. There's been a long outstanding request for someone to actually profile some different algorithms instead of just suggest changes. Kevin Oberman did some of this but much more needs to be done before we have an idea what's the best current thing to do. -Nate