From owner-freebsd-acpi@FreeBSD.ORG Tue Aug 30 04:51:25 2005 Return-Path: X-Original-To: acpi@FreeBSD.org 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 3C91216A41F for ; Tue, 30 Aug 2005 04:51:25 +0000 (GMT) (envelope-from nate@root.org) Received: from ylpvm15.prodigy.net (ylpvm15-ext.prodigy.net [207.115.57.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id C23E743D45 for ; Tue, 30 Aug 2005 04:51:24 +0000 (GMT) (envelope-from nate@root.org) Received: from pimout6-ext.prodigy.net (pimout6-int.prodigy.net [207.115.4.22]) by ylpvm15.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j7U4pWsv008252 for ; Tue, 30 Aug 2005 00:51:32 -0400 X-ORBL: [64.171.187.62] Received: from [10.0.0.115] (adsl-64-171-187-62.dsl.snfc21.pacbell.net [64.171.187.62]) by pimout6-ext.prodigy.net (8.13.4 outbound domainkey aix/8.13.4) with ESMTP id j7U4pHfv359368; Tue, 30 Aug 2005 00:51:18 -0400 Message-ID: <4313E5C5.5060005@root.org> Date: Mon, 29 Aug 2005 21:51:17 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050723) X-Accept-Language: en-us, en MIME-Version: 1.0 To: acpi@FreeBSD.org References: <20050830044536.C0AB416A4C6@hub.freebsd.org> In-Reply-To: <20050830044536.C0AB416A4C6@hub.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: cvs commit: src/sys/kern kern_cpu.c 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: Tue, 30 Aug 2005 04:51:25 -0000 Nate Lawson wrote: > njl 2005-08-30 04:45:32 UTC > > FreeBSD src repository > > Modified files: > sys/kern kern_cpu.c > Log: > Eliminate cpufreq levels for two cases that are less than optimal: > > 1. Walk the absolute list in reverse to prefer duplicated levels that have > a lower absolute setting, i.e. 800 Mhz/50% is better than 1600 Mhz/25% even > though both have the same actual frequency. This also removes the need to > check for already-modified levels since by definition, those will be added > later in the sorted list. > > 2. Compare the absolute settings for derived levels and don't use the new > level if it's higher. For example, a level of 800 Mhz/75% is preferable to > 1600 Mhz/25% even though the latter has a lower total frequency. > > This work is based on a patch from the submitter but reworked by myself. > > Submitted by: Tijl Coosemans (tijl/ulyssis.org) > > Revision Changes Path > 1.20 +48 -47 src/sys/kern/kern_cpu.c If this commit gives you problems, please set debug.cpufreq.verbose=1 and send me the output along with sysctl dev.cpu. It should reduce the levels the same as Tijl's patch. I took a very slightly different implementation approach but the code is mostly his. Thanks! -- Nate