From owner-freebsd-acpi@FreeBSD.ORG Wed Aug 31 20:38:32 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 75D8E16A423; Wed, 31 Aug 2005 20:38:32 +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 EDD3F43D45; Wed, 31 Aug 2005 20:38:31 +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 j7VKcexH005816; Wed, 31 Aug 2005 16:38:40 -0400 X-ORBL: [67.119.74.222] Received: from [10.0.0.33] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by pimout6-ext.prodigy.net (8.13.4 outbound domainkey aix/8.13.4) with ESMTP id j7VKcSCn283086; Wed, 31 Aug 2005 16:38:29 -0400 Message-ID: <43161544.1010802@root.org> Date: Wed, 31 Aug 2005 13:38:28 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050723) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Hajimu UMEMOTO References: <20050830044536.C0AB416A4C6@hub.freebsd.org> <4313E5C5.5060005@root.org> In-Reply-To: Content-Type: multipart/mixed; boundary="------------070309000505090302070205" Cc: acpi@FreeBSD.org 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: Wed, 31 Aug 2005 20:38:32 -0000 This is a multi-part message in MIME format. --------------070309000505090302070205 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hajimu UMEMOTO wrote: >>>>>>On Mon, 29 Aug 2005 21:51:17 -0700 >>>>>>Nate Lawson said: > > nate> Nate Lawson wrote: > > nate> If this commit gives you problems, please set debug.cpufreq.verbose=1 > nate> and send me the output along with sysctl dev.cpu. It should reduce the > nate> levels the same as Tijl's patch. I took a very slightly different > nate> implementation approach but the code is mostly his. Thanks! > > I applied the diff to latest RELENG_6. I believe it is equivalent to > HEAD's kern_cpu.c. > After applying the diff, the order of freq_level is apparently > strange: > > dev.cpu.0.freq_levels: 1200/5000 1050/4375 900/3750 750/3125 600/2500 450/1875 300/1250 150/625 1100/4700 962/4112 825/3525 687/2937 550/2350 412/1762 275/1175 137/587 1000/4300 875/3762 750/3225 625/2687 500/2150 375/1612 250/1075 125/537 900/4000 787/3500 675/3000 562/2500 450/2000 337/1500 225/1000 112/500 800/3700 700/3237 600/2775 500/2312 400/1850 300/1387 200/925 100/462 600/3000 525/2625 450/2250 375/1875 300/1500 225/1125 150/750 75/375 Please apply the attached patch and send me the output as you did before. -- Nate --------------070309000505090302070205 Content-Type: text/plain; name="cpu_dupes.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cpu_dupes.diff" Index: sys/kern/kern_cpu.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_cpu.c,v retrieving revision 1.20 diff -u -r1.20 kern_cpu.c --- sys/kern/kern_cpu.c 30 Aug 2005 04:45:32 -0000 1.20 +++ sys/kern/kern_cpu.c 31 Aug 2005 20:35:05 -0000 @@ -760,8 +760,12 @@ KASSERT(!TAILQ_EMPTY(list), ("all levels list empty in dup set")); TAILQ_FOREACH_REVERSE(itr, list, cf_level_lst, link) { itr_set = &itr->total_set; - if (fill_set->freq < itr_set->freq && - !CPUFREQ_CMP(fill_set->freq, itr_set->freq) && + if (CPUFREQ_CMP(fill_set->freq, itr_set->freq)) { + CF_DEBUG("dup set rejecting %d (dupe)\n", + fill_set->freq); + itr = NULL; + break; + } else if (fill_set->freq < itr_set->freq && fill->abs_set.freq <= itr->abs_set.freq) { CF_DEBUG( "dup done, inserting new level %d after %d\n", --------------070309000505090302070205--