From owner-freebsd-acpi@FreeBSD.ORG Mon Nov 10 16:28:02 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 060F0106567F; Mon, 10 Nov 2008 16:28:02 +0000 (UTC) (envelope-from nate@root.org) Received: from nlpi025.prodigy.net (nlpi025.sbcis.sbc.com [207.115.36.54]) by mx1.freebsd.org (Postfix) with ESMTP id C9D178FC13; Mon, 10 Nov 2008 16:28:01 +0000 (UTC) (envelope-from nate@root.org) Received: from [10.0.5.18] (ppp-71-139-3-53.dsl.snfc21.pacbell.net [71.139.3.53]) (authenticated bits=0) by nlpi025.prodigy.net (8.13.8 smtpauth/dk/8.13.8) with ESMTP id mAAGRxZ4008929; Mon, 10 Nov 2008 10:28:00 -0600 Message-ID: <49186111.9020103@root.org> Date: Mon, 10 Nov 2008 08:28:01 -0800 From: Nate Lawson User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Alexander Motin References: <491404BF.1090807@FreeBSD.org> In-Reply-To: <491404BF.1090807@FreeBSD.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: FreeBSD acpi Subject: Re: RFC: powerd algorithms enhancements 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: Mon, 10 Nov 2008 16:28:02 -0000 Alexander Motin wrote: > The discussion of this is going on mobile@: > > -------- Original Message -------- > Subject: RFC: powerd algorithms enhancements > Date: Wed, 05 Nov 2008 22:57:55 +0200 > From: Alexander Motin > To: freebsd-mobile@FreeBSD.org > > Hi. > > I would like to propose the patch for powerd that fixes some issues, > makes it more universal and on my opinion more usable. The main ideas of > mine were: I have not yet reviewed the patch but have some comments. > 1. To make it more SMP polite. Previous version uses average CPU load > that leads to the often load underestimation. It make powerd with > default configuration unusable on systems with more then 2 CPUs. I > propose to use summary load instead of average one. IMO this is the best > we can do without specially tuned scheduler. Also as soon as measuring > total load on SMP systems is more useful then total idle, I have > switched to it. Ok. > 2. To make powerd's operation independent from number and size of > frequency levels I have added internal frequency counter which > translated into real frequencies only on a last stage and only as good > as gone. Some systems may have only several power levels, while mine has > 17 of them, so adaptation time in completely different. It would be good > if algorithm was not depending on it. I don't understand the advantage of this. > 3. As part of previous I have changed adaptive mode to rise frequency on > demand up to 2 times and fall on 1/8 per time internal. > > 4. For desktop (AC-powered) systems I have added one more mode - > "hiadaptive". It rises frequency twice faster, drops it 4 times slower, > prefers twice lower CPU load and has additional delay before leaving the > highest frequency after the period of maximum load. This mode was > specially made to improve interactivity of the systems where operation > capabilities are more significant then power consumption, but keeping > maximum frequency all the time is not needed. > > 5. I have reduced polling interval from 1/2 to 1/4 of second. It is not > important for algorithm math now, but gives better system interactivity. There's a patch Cyrille Szymanski has sent me to review that implements the FLAT and PAST algorithms in powerd. I think we should not add new modes that are heuristics (including this one) until we have a chance to compare it to algorithms that have been the result of real research. I'll try to get Cyrille to send out an amended patch for public review. -- Nate