2.6.0-test1 CpuFreq Speedstep Quirks
Hello,
After testing the 2.6.0-test1 kernel with CPUfreq scaling compiled in (+userspace govenor) I have noticed some changes in the way the kernel detects and prints my CPU information. Along these lines some programs (in peticular, mplayer and xmms) have some issues syncing (apparently time critical / cpu speed critical code.) As of right now these issues only seem to disappear if I run in powersave mode. Im not quite sure if this is a bug or not as I am quite new to cpu frequency scaling issues. If this is not a bug / problem maybe someone can help enlighten me as to what is actually occuring. I would be willing to test anything speedstep / cpufreq related as I have quite a bit of freetime until August 25th. Attached are few screenshots of the interesting quirks with Cpufreq installed. Thanks for you time..
- Mike
Michael Vallaly
[email protected]
CPU INFO 2.6.0-test1 no CPUfreq
=================================
root@vaio:~$ uname -a Linux vaio 2.6.0-test1 #2 Thu Jul 17 14:15:59 UTC 2003 i686 unknown root@vaio:~$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 11 model name : Mobile Intel(R) Pentium(R) III CPU - M 900MHz stepping : 4 cpu MHz : 894.445 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 mmx fxsr sse bogomips : 1765.37
root@vaio:~$ /bogomips Calibrating delay loop.. ok - 864.00 BogoMips
CPU INFO 2.6.0-test1 with CPUfreq
===================================
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ uname -a Linux vaio 2.6.0-test1 #1 Mon Jul 14 18:07:26 UTC 2003 i686 unknown root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 11 model name : Mobile Intel(R) Pentium(R) III CPU - M 900MHz stepping : 4 cpu MHz : 496.891 <--- Reports a 500mhz machine yet the Scaling_governor is set / defaults to performance 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 mmx fxsr sse bogomips : 980.76 <--- This number has never changed throughout my testing.. as such I decided to use the bogomips program to show the change in CPU frequency.
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ ls -l total 0 -r--r--r-- 1 root root 4096 Jul 14 18:29 cpuinfo_max_freq -r--r--r-- 1 root root 4096 Jul 14 18:29 cpuinfo_min_freq -r--r--r-- 1 root root 4096 Jul 14 18:29 scaling_available_governors -r--r--r-- 1 root root 4096 Jul 14 18:29 scaling_driver -rw-r--r-- 1 root root 0 Jul 17 13:31 scaling_governor -rw-r--r-- 1 root root 4096 Jul 14 18:29 scaling_max_freq -rw-r--r-- 1 root root 4096 Jul 14 18:29 scaling_min_freq
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ cat * 900000 500000 performance powersave userspace speedstep performance 900000 500000
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ /bogomips Calibrating delay loop.. ok - 858.00 BogoMips
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ echo powersave > scaling_governor root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ cat * 900000 500000 performance powersave userspace speedstep powersave <--- Looks good 900000 500000
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ /bogomips Calibrating delay loop.. ok - 474.00 BogoMips <--- CPU Speed changed
====================================================================Scaling_Governor seems to scale the processor.. ;)
====================================================================
Example #2 using userspace driver
==================================
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ echo userspace > scaling_governor root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ ls -l total 0 -r--r--r-- 1 root root 4096 Jul 14 18:29 cpuinfo_max_freq -r--r--r-- 1 root root 4096 Jul 14 18:29 cpuinfo_min_freq -r--r--r-- 1 root root 4096 Jul 14 18:29 scaling_available_governors -r--r--r-- 1 root root 4096 Jul 14 18:29 scaling_driver -rw-r--r-- 1 root root 0 Jul 17 13:40 scaling_governor -rw-r--r-- 1 root root 4096 Jul 14 18:29 scaling_max_freq -rw-r--r-- 1 root root 4096 Jul 14 18:29 scaling_min_freq -rw-r--r-- 1 root root 4096 Jul 17 13:40 scaling_setspeed root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ cat * 900000 500000 performance powersave userspace speedstep userspace 900000 500000 500000
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ /bogomips Calibrating delay loop.. ok - 470.00 BogoMips
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ echo 900000 > scaling_setspeed root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ cat * 900000 500000 performance powersave userspace speedstep userspace 900000 500000 500000 <---- Note the scaling_setspeed did NOT change
root@vaio:/sys/devices/system/cpu/cpu0/cpufreq$ /bogomips Calibrating delay loop.. ok - 864.00 BogoMips <---- Yet apparently the processor speed did.
========================================================================
Thanks for your help..
-Mike
Hi Mike,
Many thanks for your extensive bug report. Could you please try out the following:
a) test the attached patch
b) if this didn't help, boot with "clock=pit"
Dominik
Quoted 4 lines · Michael Vallaly
Hello,
Quoted 11 lines
After testing the 2.6.0-test1 kernel with CPUfreq scaling compiled in (+userspace govenor) I have noticed some changes in the way the kernel detects and prints my CPU information. Along these lines some programs (in peticular, mplayer and xmms) have some issues syncing (apparently time critical / cpu speed critical code.) As of right now these issues only seem to disappear if I run in powersave mode. Im not quite sure if this is a bug or not as I am quite new to cpu frequency scaling issues. If this is no t a bug / problem maybe someone can help enlighten me as to what is actually occuring. I would be willing to test anything speedstep / cpufreq related as I have quite a bit of freetime until August 25th. Attached are few screenshots of the interesting quirks with Cpufreq installed. Thanks for you time..
- Mike
Michael Vallaly
[email protected]
Correct the notification of the cpufreq core of the new frequency being set in ich's speedstep_set, and print accurate debug info in this function. (both bugs noted by Valdis Kletnieks, thanks!)
arch/i386/kernel/cpu/cpufreq/speedstep-ich.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/i386/kernel/cpu/cpufreq/speedstep-ich.c renamed from arch/i386/kernel/cpu/cpufreq/speedstep-ich.c.original +2 -2
@@ -82,7 +82,7 @@return ; freqs.old =speedstep_get_processor_frequency (speedstep_processor); - freqs.new = speedstep_freqs[SPEEDSTEP_LOW ].frequency; + freqs.new = speedstep_freqs[state].frequency; freqs.cpu =0 ;/* speedstep.c is UP only driver */ if (notify)
@@ -137,7 +137,7 @@dprintk (KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n" , pmbase, value);if (state == (value &0x1 )) { -dprintk (KERN_INFO "cpufreq: change to %u MHz succeeded\n" , (freqs.new /1000 )); +dprintk (KERN_INFO "cpufreq: change to %u MHz succeeded\n" , (speedstep_get_processor_frequency (speedstep_processor) /1000 )); }else {printk (KERN_ERR "cpufreq: change failed - I/O error\n" ); }