Re: 2.6.25.x: Wrong CPU frequency (cpufreq table) with p4-clockmod

Previous thread: Re: [PATCH 1/7] mmc: at91_mci: support for block size not modulo 4 by Marc Pignat on Friday, May 30, 2008 - 5:57 am. (1 message)

Next thread: 活力健康減重!索取試用包 by kmlsgxrvlxzqpqb on Friday, May 30, 2008 - 7:54 am. (1 message)
From: Guntsche Michael
Date: Friday, May 30, 2008 - 6:44 am

Hi list,

I recently upgraded one of my servers from 2.6.24.2 to 2.6.25. This is  
more or less a basic fileserver that also does some compilations from  
time to time.

cat /proc/cpuinfo from 2.6.24.2:

processor : 0
vendor_id : GenuineIntel
cpu family  : 15
model   : 1
model name  : Intel(R) Pentium(R) 4 CPU 1.70GHz
stepping  : 2
cpu MHz   : 425.000
cache size  : 256 KB
fdiv_bug  : no
hlt_bug   : no
f00f_bug  : no
coma_bug  : no
fpu   : yes
fpu_exception : yes
cpuid level : 2
wp    : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca  
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pebs bts  
sync_rdtsc
bogomips  : 3401.38
clflush size  : 64

scaling_available_frequencies (p4-clockmod): 425000 637500 850000  
1062500 1275000 1487500 1700000

Since the server is idling most of the time I enabled the ondemand  
governor and installed p4-clockmod. I read that this is not the best  
solution but acpi-cpufreq is not working for me.

Everything was good with 2.6.24. After switching to to 2.6.25 I have  
the following output.

cat /proc/cpuinfo from 2.6.25.4:

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 1
model name	: Intel(R) Pentium(R) 4 CPU 1.70GHz
stepping	: 2
cpu MHz		: 3450.000
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov  
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pebs bts
bogomips	: 3402.06
clflush size	: 64

scaling_available_frequencies (p4-clockmod): 3450000 5175000 6900000  
8625000 10350000 12075000 13800000

The scaling is working but the frequencies are way of. Every value is  
multiplied by ~8.12.
I get the same result with 2.6.25 and 2.6.25.4.
I am not sure if this is only a display related problem, or if  
something more serious is causing this.

Please CC me on any replies since I am not subscribed to the ...
From: Arjan van de Ven
Date: Friday, May 30, 2008 - 6:57 am

On Fri, 30 May 2008 15:44:55 +0200

... and it's not the best solution because it's not saving you any
energy...
(in fact it may cost you some)

p4-clockmod should go away.
(at least as cpufreq driver)
-- 
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--

From: Guntsche Michael
Date: Friday, May 30, 2008 - 7:07 am

I am most interested in keeping the temperature of my CPU down, which  
means slower fans, which means less noise.
The main "problem" I have is that I do not know if this is a simple  
display issue or if I am having a more fundamental problem here.

/Michael
--

From: Guntsche Michael
Date: Sunday, June 1, 2008 - 2:57 pm

Just FYI I found out the cause of my problem.

Reverting http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ed9cbcd400... 
  this patch resultsin the correct numbers for me.

<cpuinfo snip>
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 1
model name	: Intel(R) Pentium(R) 4 CPU 1.70GHz
stepping	: 2
cpu MHz		: 637.500
<snip>

This patch was reverted because other people seem to have problems  
with it, reverting the revert does not look like a good idea either.
But since I know now, that this is just a "display" problem and  
everything is working otherwise, I'll just patch this locally for my  
machine here.

Kind regards,
Michael
--

From: Arjan van de Ven
Date: Sunday, June 1, 2008 - 6:56 pm

On Sun, 1 Jun 2008 23:57:14 +0200

just as a side note.. you do realize that with p4-clockmod, your cpu is
still running at 1.7 GHz right? (it's just doing less work '-)
--

From: Roger Heflin
Date: Sunday, June 1, 2008 - 7:36 pm

From my testing, I believe the only thing that p4-clockmod does is forces an 
idle call when it could otherwise do work on an active process, so fullspeed and 
idle uses *EXACTLY* the same amount of power as p4-clockmod slower speed and 
idle (and therefore generates exactly the same amount of heat), the only power 
difference would be that if you were using p4-clockmod to slow down the cpu when 
it had an active running process (force the cpu to be idle a lot of the time 
even though it has work).   Arjan's point is that if you are using  p4-clockmod 
to slow down an idle cpu in hopes of saving power when the cpu is not being 
used, then it is not going to make *ANY* difference in the power usage at all.

I tried it on my p4 here, and cannot see any power difference in idle/fullspeed 
and idle/slowspeed, this is unlike the later power saving stuff that actually 
does slow down the cpu frequency, and you can measure a different amount of 
power usage with the different clock speeds and an idle cpu.

                                    Roger
--

From: Michael Guntsche
Date: Sunday, June 1, 2008 - 10:22 pm

On Sun, 01 Jun 2008 21:36:58 -0500, Roger Heflin <rogerheflin@gmail.com>
<snip>

Thanks for the detailed information everyone. The first time I tested this
I was under the impression that it indeed had an influence on the produced
heat of the CPU. I did a quick test this morning and of course you are
right, there is no change at all. 

This is a good thing though, since it gives me an excuse to upgrade this
machine to a C2D. :)
For the time being I will just disable the cpufreq stuff since it really
does not make a difference in my case.

Kind regards,
Michael

--

From: Henrique de Moraes Holschuh
Date: Monday, June 2, 2008 - 8:37 am

Indeed.  And if we had a generic interface for throttling (ACPI
T-states-like) and frequency changes (ACPI P-states-like), we could just
move p4-clockmod to the throttling one (and NOT letting it register with
the frequency changes interface), and be done with it.

Do we have these interfaces?

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--

From: Matthew Garrett
Date: Monday, June 2, 2008 - 9:44 am

No.
-- 
Matthew Garrett | mjg59@srcf.ucam.org
--

Previous thread: Re: [PATCH 1/7] mmc: at91_mci: support for block size not modulo 4 by Marc Pignat on Friday, May 30, 2008 - 5:57 am. (1 message)

Next thread: 活力健康減重!索取試用包 by kmlsgxrvlxzqpqb on Friday, May 30, 2008 - 7:54 am. (1 message)
<