Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2005 13:38:28 -0700
From:      Nate Lawson <nate@root.org>
To:        Hajimu UMEMOTO <ume@FreeBSD.org>
Cc:        acpi@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_cpu.c
Message-ID:  <43161544.1010802@root.org>
In-Reply-To: <ygehdd773fw.wl%ume@mahoroba.org>
References:  <20050830044536.C0AB416A4C6@hub.freebsd.org>	<4313E5C5.5060005@root.org> <ygehdd773fw.wl%ume@mahoroba.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <nate@root.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43161544.1010802>