* 2G P4M won't go above 1.2 - cpuinfo_max_freq too low
@ 2003-11-26 17:02 Simon
2003-12-04 15:35 ` Thomas Renninger
0 siblings, 1 reply; 4+ messages in thread
From: Simon @ 2003-11-26 17:02 UTC (permalink / raw)
To: cpufreq
Hope I should be posting this here and not on linux-kernel...
I've just upgraded to 2.6.0-test10 and am trying to use the new cpufreq stuff
in there. I had everything working perfectly with 2.4.21-ac2, and the old
/proc/cpufreq interface.
I have a P4 2ghz, but it's not running at over about 1.2ghz here now. If I
`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq` it tells me:
"1198976". It should go faster than that. Similarly,
scaling_available_frequencies says "149872 299744 449616 599488 749360 899232
1049104 1198976"
Enabling the old interface in the kernel and doing a `echo -n
0%0%100%performance > /proc/cpufreq` doesn't change things either.
Here is my /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz
stepping : 7
cpu MHz : 1198.976
cache size : 512 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 sep mtrr pge mca cmov pat
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 2359.29
Any ideas how to get hold of my extra mhz?
Cheers,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2G P4M won't go above 1.2 - cpuinfo_max_freq too low
2003-11-26 17:02 2G P4M won't go above 1.2 - cpuinfo_max_freq too low Simon
@ 2003-12-04 15:35 ` Thomas Renninger
2003-12-04 16:21 ` Simon Detheridge
2003-12-09 18:13 ` Anatoli Gorchetchnikov
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Renninger @ 2003-12-04 15:35 UTC (permalink / raw)
To: cpufreq
[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]
Simon wrote:
>Enabling the old interface in the kernel and doing a `echo -n
>0%0%100%performance > /proc/cpufreq` doesn't change things either.
>
>Here is my /proc/cpuinfo
>model name : Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz
>cpu MHz : 1198.976
>
>Any ideas how to get hold of my extra mhz?
>
>
I have the same problem, cpuinfo shows the wrong value!!!
I get 1200MHz even I set it up to 1800MHz.
(posted prog calculates the right value, (procspeed))
My values:
cat scaling_setspeed
1800000
procspeed
1795.069753 MHz processor.
cat /proc/cpuinfo
cpu MHz : 1196.427
# HERE I SET NEW SPEED!
echo 1200000 >scaling_setspeed
procspeed
1196.468220 MHz processor.
# THIS IS TOTALLY WRONG!
cat /proc/cpuinfo
cpu MHz : 797.618
cat scaling_setspeed
1200000
It seems as if cpuinfo shows the wrong value by the factor 1.5.
(min_freq: 1200, max_freq: 1800)
kernel: 2.6.0test-11-1
I post a small prog you can mesure your real speed.
It's called procspeed(think it was part of Carl Thomson's cpufreqd).
I searched for cpuinfo in the archive, but could not find anything.
I expect that problem related to freq scaling ...
Does anyone know about this?
Maybe this helps, complete cpuinfo:
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 Mobile CPU 1.80GHz
stepping : 4
cpu MHz : 1196.427
cache size : 512 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 sep mtrr pge mca cmov pat
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 2334.72
Thanks.
Thomas
[-- Attachment #2: procspeed.c --]
[-- Type: text/plain, Size: 821 bytes --]
#include <stdio.h>
#include <sys/time.h>
__inline__ unsigned long long int rdtsc()
{
unsigned long long int x;
__asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
return x;
}
main ()
{
struct timezone tz;
struct timeval tvstart, tvstop;
unsigned long long int cycles[2]; /* gotta be 64 bit */
unsigned int microseconds; /* total time taken */
bzero(&tz, sizeof(tz));
/* get this function in cached memory */
gettimeofday(&tvstart, &tz);
cycles[0] = rdtsc();
gettimeofday(&tvstart, &tz);
/* we don't trust that this is any specific length of time */
sleep(1);
cycles[1] = rdtsc();
gettimeofday(&tvstop, &tz);
microseconds = ((tvstop.tv_sec-tvstart.tv_sec)*1000000) +
(tvstop.tv_usec-tvstart.tv_usec);
printf("%f MHz processor.\n",
(float)(cycles[1]-cycles[0])/microseconds);
}
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Cpufreq mailing list
Cpufreq@www.linux.org.uk
http://www.linux.org.uk/mailman/listinfo/cpufreq
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: 2G P4M won't go above 1.2 - cpuinfo_max_freq too low
2003-12-04 15:35 ` Thomas Renninger
@ 2003-12-04 16:21 ` Simon Detheridge
2003-12-09 18:13 ` Anatoli Gorchetchnikov
1 sibling, 0 replies; 4+ messages in thread
From: Simon Detheridge @ 2003-12-04 16:21 UTC (permalink / raw)
To: Thomas Renninger; +Cc: cpufreq
I wrote:
> 2G P4M won't go above 1.2 - cpuinfo_max_freq too low
Thomas Renninger wrote:
> I have the same problem, cpuinfo shows the wrong value!!!
> I get 1200MHz even I set it up to 1800MHz.
> (posted prog calculates the right value, (procspeed))
Odd. My CPU was definitely running at the slower speed. It wasn't just being
misreported by /proc/cpuinfo
I fixed the problem by compiling all the cpufreq stuff as modules (I had
everything compiled into the kernel before) and loading them one-by-one. It
turns out that my kernel was choosing p4-clockmod by default, which was not
behaving correctly. Manually loading speedstep_ich fixed the problem.
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2G P4M won't go above 1.2 - cpuinfo_max_freq too low
2003-12-04 15:35 ` Thomas Renninger
2003-12-04 16:21 ` Simon Detheridge
@ 2003-12-09 18:13 ` Anatoli Gorchetchnikov
1 sibling, 0 replies; 4+ messages in thread
From: Anatoli Gorchetchnikov @ 2003-12-09 18:13 UTC (permalink / raw)
To: cpufreq
On Thursday 04 December 2003 10:35 am, Thomas Renninger wrote:
> I post a small prog you can mesure your real speed.
> It's called procspeed(think it was part of Carl Thomson's cpufreqd).
I'm not sure it measures a _real_ speed though... I changed sleep(1) statement
to
int i = 0;
for(; i < 1000000; ++i)
exp(-pow(i, -3.5));
and added some output lines,
here are the results:
with AC power on:
2806.402282 MHz processor.
Running time 0.475273 seconds
Runs 1333807266 cycles
with AC off
2806.406065 MHz processor.
Running time 1.297433 seconds
Runs 3641123744 cycles
I strongly suspect that the calculation above takes exactly the same number of
CPU cycles, therefore this program measures TSC cycles which are _not equal_
to CPU cycles. I noticed this problem when running bogomips, TSC version
reports the same value for AC and battery, while old version reports 3 fold
difference.
I wonder if this is specific to Sony Vaio with SiS chipset (which according to
the archives is not going to be hacked in near future) or more general. Just
in case my cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping : 9
cpu MHz : 2806.410
cache size : 512 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
bogomips : 5596.77
--
Regards,
Anatoli
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-12-09 18:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-26 17:02 2G P4M won't go above 1.2 - cpuinfo_max_freq too low Simon
2003-12-04 15:35 ` Thomas Renninger
2003-12-04 16:21 ` Simon Detheridge
2003-12-09 18:13 ` Anatoli Gorchetchnikov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.