Bug 458824

Summary: Oprofile need to enable/disable all the counters for intel family 6
Product: Red Hat Enterprise Linux 5 Reporter: Markus Armbruster <armbru>
Component: kernelAssignee: Markus Armbruster <armbru>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: bburns, dzickus, kernel-mgr, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 20:21:28 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: 426096    
Bug Blocks: 449772    
Attachments:
Description Flags
Make oprofile enable all perf counters on intel family 6 none

Comment 1 Markus Armbruster 2008-08-12 14:43:41 UTC
From Linus's tree:

commit 6b77df08a36d989f7dd00ccb6a026a0e96170d16
Author: Arun Sharma <arun.sharma>
Date:   Fri Sep 29 02:00:01 2006 -0700

    [PATCH] oprofile: ppro: need to enable/disable all the counters
    
    Need to enable/disable all the counters instead of just counter 0.
    
    This affects all cpus with family=6, including i386/core.  Usual symptom:
    only counter 0 provides samples.  Other counters don't produce samples.
    
    Signed-off-by: Arun Sharma <arun.sharma>
    Cc: Philippe Elie <phil.el>
    Cc: John Levon <levon>
    Signed-off-by: Andrew Morton <akpm>
    Signed-off-by: Linus Torvalds <torvalds>

Comment 2 Markus Armbruster 2008-08-13 15:36:58 UTC
The upstream commit mentioned in comment#1 does not apply cleanly, because it depends on this one:

commit cb9c448c661d40ce2efbce8e9c19cc4d420d8ccc
Author: Don Zickus <dzickus>
Date:   Tue Sep 26 10:52:26 2006 +0200

    [PATCH] i386: Utilize performance counter reservation framework in oprofile
    
    Incorporates the new performance counter reservation system in oprofile.
    Also cleans up a lot of the initialization code.  The code original zero'd
    out every register associated with performance counters regardless if those
    registers were used or not.  This causes issues with the nmi watchdog.
    Now oprofile tries to reserve registers and gives up if it can't get them.
    
    Cc: levon
    Cc: oprofile-list.net
    
    Signed-off-by:  Don Zickus <dzickus>
    Signed-off-by: Andi Kleen <ak>

which is just one part of a fairly invasive rework of the NMI watchdog.  I figure we just need parts of the initialization cleanup here.

Comment 3 Markus Armbruster 2008-08-13 15:39:36 UTC
Created attachment 314216 [details]
Make oprofile enable all perf counters on intel family 6

Comment 5 RHEL Program Management 2008-08-13 15:42:58 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 Don Zickus 2008-09-16 17:44:54 UTC
A fix for the bugzilla is included in the latest RHEL-5 kernel package.  The binary packages can be found at

http://people.redhat.com/dzickus/el5

Comment 12 errata-xmlrpc 2009-01-20 20:21:28 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