Bug 458441

Summary: Make oprofile recognize Nehalem
Product: Red Hat Enterprise Linux 5 Reporter: Markus Armbruster <armbru>
Component: kernelAssignee: Markus Armbruster <armbru>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: andriusb, jane.lv, jvillalo, kernel-mgr, riek, rlerch, suresh.b.siddha, venkatesh.pallipadi, xen-maint, xiaowei.yang, youquan.song
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
<filename>oprofile</filename> did not correctly identify processors based on the Next-Generation Intel(R) Microarchitecture (codenamed "Nehalem".) Consequently, the performance monitoring unit could not be used and the processor fell back to the timer interrupt. The kernel has been updated to resolve this issue.
Story Points: ---
Clone Of:
: 550183 (view as bug list) Environment:
Last Closed: 2009-01-20 20:07:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 428015, 454962, 461133, 461134    
Attachments:
Description Flags
Proposed patch for bare metal oprofile
none
Proposed patch for Xenoprof none

Description Markus Armbruster 2008-08-08 13:46:20 UTC
Description of problem:
Oprofile needs to recognize the CPU model to make use of its PMU; it can only use timer interrupt otherwise.  It doesn't recognize Nehalem, yet.

Additional info:
Fixed in Linus's tree:

commit 4b9f12a3779c548b68bc9af7d94030868ad3aa1b
Author: Linus Torvalds <torvalds>
Date:   Thu Jul 24 17:29:00 2008 -0700

    x86/oprofile/nmi_int: add Nehalem to list of ppro cores
    
    ..otherwise oprofile will fall back on that poor timer interrupt.
    
    Also replace the unreadable chain of if-statements with a "switch()"
    statement instead. It generates better code, and is a lot clearer.
    
    Signed-off-by: Linus Torvalds <torvalds>

Needs to be fixed separately in the Xen Hypervisor for Xenoprof.

Comment 1 Markus Armbruster 2008-08-08 17:02:11 UTC
Created attachment 313820 [details]
Proposed patch for bare metal oprofile

Comment 2 Markus Armbruster 2008-08-08 17:03:06 UTC
Created attachment 313821 [details]
Proposed patch for Xenoprof

Comment 4 Markus Armbruster 2008-08-11 15:36:11 UTC
The patch for Xenoprof got accepted into xen-unstable.hg as cset 18304:3d5515f40b9b.

Comment 7 Don Zickus 2008-09-09 21:16:42 UTC
in kernel-2.6.18-109.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 10 Ryan Lerch 2008-11-06 04:18:58 UTC
This bug (feature request) has been marked for inclusion in the Red Hat
Enterprise Linux 5.3 Release Notes.

To aid in the development of relevant and accurate release notes, please fill
out the "Release Notes" field above with the following 4 pieces of information:


Cause:   What actions or circumstances induced the feature request.

Consequence:  What action was inhibited by the feature's absence.

Fix:   What was done to implement the feature.

Result:  now happens when the actions or circumstances above occur. (NB: this
is not the same as 'the feature request was fulfilled')

Comment 12 Markus Armbruster 2008-11-06 19:07:52 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
Cause: oprofile didn't recognize the new Nehalem CPUs.

Consequence: it could not use its performance monitoring unit, and
fell back to the timer interrupt.  Severe loss of functionality.

Fix: backport fix from upstream.

Result: oprofile fully functional.

Comment 13 Song, Youquan 2008-11-07 04:18:47 UTC
I verify on Tylersburg EP, the bug was fixed on RHEL5.3 Beta.

Comment 15 Ryan Lerch 2008-11-25 01:58:27 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1,8 +1 @@
-Cause: oprofile didn't recognize the new Nehalem CPUs.
+<filename>oprofile</filename> did not correctly identify processors based on the Next-Generation Intel(R) Microarchitecture (codenamed "Nehalem".) Consequently, the performance monitoring unit could not be used and the processor fell back to the timer interrupt. The kernel has been updated to resolve this issue.-
-Consequence: it could not use its performance monitoring unit, and
-fell back to the timer interrupt.  Severe loss of functionality.
-
-Fix: backport fix from upstream.
-
-Result: oprofile fully functional.

Comment 17 errata-xmlrpc 2009-01-20 20:07:21 UTC
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 therefore 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-2009-0225.html