Skip to contentSkip to conversation

New: p4-clockmod reports false frequency

Bug 10968 [email protected] 1 participant 7 messages Jun 23, 2008 – Jul 23, 2008

lore
Share & tools
lore
#0 lore raw

http://bugzilla.kernel.org/show_bug.cgi?id=10968

Summary: p4-clockmod reports false frequency
Product: Power Management
Version: 2.5
KernelVersion: 2.6.25.7
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: cpufreq
AssignedTo: [email protected]
ReportedBy: [email protected]

# uname -a
Linux hyperix 2.6.25.7 #2 Sat Jun 21 14:12:02 CEST 2008 i686 Intel(R)
Pentium(R) 4 CPU 1.80GHz GenuineIntel GNU/Linux
# cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 1
model name      : Intel(R) Pentium(R) 4 CPU 1.80GHz
stepping        : 2
cpu MHz         : 3650.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        : 3603.33
clflush size    : 64
# cpufreq-info 
cpufrequtils 0.4: cpufreq-info (C) Dominik Brodowski 2004
Report errors and bugs to [email protected], please.
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 3.65 GHz - 14.60 GHz
  available frequency steps: 3.65 GHz, 5.48 GHz, 7.30 GHz, 9.13 GHz, 10.95 GHz,
12.78 GHz, 14.60 GHz
  available cpufreq governors: ondemand, userspace
  current policy: frequency should be within 3.65 GHz and 14.60 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 5.48 GHz (asserted by call to hardware).

Latest working kernel version: 2.6.23 (last version that I tried)

Any suggestions?

To me it seems that the bit shift width is incorrect. I had a similar problems years ago and fixed by adding a different bit shift width for Pentium 4 Model 0 and 1.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#1 lore raw

[Bug 10968] p4-clockmod reports false frequency

http://bugzilla.kernel.org/show_bug.cgi?id=10968

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
         Regression|0                           |1
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#2 lore raw

[Bug 10968] p4-clockmod reports false frequency

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=10968

------- Comment #1 from [email protected] 2008-07-05 04:40 ------- The bug was introduced in commit ed9cbcd40004904dbe61ccc16d6106a7de38c998. As proposed in bug #7186 the fix seems to be wrong, but worked for most people.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#3 lore raw

[Bug 10968] p4-clockmod reports false frequency

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=10968

------- Comment #2 from [email protected] 2008-07-07 06:02 ------- According to the Intel specification there is no such multiplier field in the msr, so the frequency has to be measured by the tsc on Pentium 4 Model 0 and 1. Does anyone disagree?

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#4 lore raw

[Bug 10968] p4-clockmod reports false frequency

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=10968

------- Comment #3 from [email protected] 2008-07-18 15:08 ------- Created an attachment (id=16881)
--> (http://bugzilla.kernel.org/attachment.cgi?id=16881&action=view)
calculates frequency based on tsc value

The attached patch should fix the issue forever more, because it conforms now entirely to the specification.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#5 lore raw

[Bug 10968] p4-clockmod reports false frequency

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=10968

------- Comment #4 from [email protected] 2008-07-23 11:46 ------- patch looks good. Matthias-Christian, can you submit it with proper signed-off-by-line to davej, and davej can you pick it up with my Acked-by-line, please? Thanks!

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#6 lore raw

[Bug 10968] p4-clockmod reports false frequency

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=10968

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |CODE_FIX

------- Comment #5 from [email protected] 2008-07-23 13:51 ------- Patch submitted.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.