Bug 176601 - Oprofile unsupported recent Pentium4
Oprofile unsupported recent Pentium4
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Burke
Brian Brock
:
Depends On:
Blocks: 181409
  Show dependency treegraph
 
Reported: 2005-12-27 05:57 EST by Tatsuo Kawasaki
Modified: 2007-11-30 17:07 EST (History)
5 users (show)

See Also:
Fixed In Version: RHSA-2006-0575
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-10 17:47:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tatsuo Kawasaki 2005-12-27 05:57:41 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7.12) Gecko/20050921 Red Hat/1.0.7-1.4.1 Firefox/1.0.7

Description of problem:
The cpuid has changed in recent Pentium4.  (cpu model changed from 3 to 4). As a result, OProfile works only in the timer mode in latest Pentium4. (The cpuid of Pentium4 660 is 0F43H)
This problem have been already solved in Fedora Core 5 test1.(kernel 2.6.11 or higher)


=====
linux-2.6.9/arch/i386/oprofile/nmi_int.c:nmi_int.c 
static int __init p4_init(void)
{
        __u8 cpu_model = current_cpu_data.x86_model;

        if (cpu_model > 3) 
                return 0;
 <snip>
}
======
linux-2.6.14/arch/i386/oprofile/nmi_int.c:nmi_int.c 
static int __init p4_init(char ** cpu_type)
{
        __u8 cpu_model = boot_cpu_data.x86_model;

        if (cpu_model > 4)
                return 0;

 <snip>
}


This is very simple patch. (But It is not so good.)
--- linux-2.6.9/arch/i386/oprofile/nmi_int.c.orig       2004-10-19
06:55:24.000000000 +0900
+++ linux-2.6.9/arch/i386/oprofile/nmi_int.c    2005-12-26
18:22:36.186412448 +0900
@@ -313,7 +313,7 @@
 {
       __u8 cpu_model = current_cpu_data.x86_model;

-       if (cpu_model > 3)
+       if (cpu_model > 4)
               return 0;

 #ifndef CONFIG_SMP

Version-Release number of selected component (if applicable):
kernel-2.6.9-22.0.1.EL

How reproducible:
Always

Steps to Reproduce:
1.opcontrol --init
2.op_help
  

Actual Results:  Using timer interrupt

Expected Results:  oprofile: available events for CPU type "P4 / Xeon with 2 hyper-threads"

See Intel Architecture Developer's Manual Volume 3, Appendix A and
Intel Architecture Optimization Reference Manual (730795-001)

GLOBAL_POWER_EVENTS: (counter: 0)
        time during which processor is not stopped (min count: 6000)
        Unit masks (default 0x1)
        ----------
        0x01: mandatory
BRANCH_RETIRED: (counter: 3)
        retired branches (min count: 6000)
        :
        :
    <snip>


Additional info:

#cat /proc/cpuinfo

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 1
cpu MHz         : 3002.493
cache size      : 1024 KB
physical id     : 0
siblings        : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni monitor ds_cpl cid xtpr
bogomips        : 5914.62

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 1
cpu MHz         : 3002.493
cache size      : 1024 KB
physical id     : 0
siblings        : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni monitor ds_cpl cid xtpr
bogomips        : 5996.54
Comment 7 Jason Baron 2006-04-06 14:47:58 EDT
committed in stream U4 build 34.13. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/
Comment 10 Florin Malita 2006-05-11 14:35:04 EDT
Any plans to backport this in RHEL3 kernels?
Comment 12 James Washer 2006-06-01 17:45:25 EDT
another request for backport to RHEL3.. see issue tracker 94972
Comment 14 Red Hat Bugzilla 2006-08-10 17:47:30 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2006-0575.html
Comment 15 Francois-Xavier 'FiX' KOWALSKI 2006-10-19 12:20:53 EDT
Another request to have it on rhel3.  Shall me/someone enter a separated bugid
for this request?
Comment 17 William Cohen 2007-01-23 08:55:03 EST
There should be a separate bug for RHEL3 to get it fixed in RHEL3.

Note You need to log in before you can comment on or make changes to this bug.