public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric B Munson <emunson@mgebm.net>
To: eranian@google.com
Cc: a.p.zijlstra@chello.nl, mingo@elte.hu, anton@samba.org,
	linux-kernel@vger.kernel.org, paulus@samba.org, hbabu@us.ibm.com
Subject: Re: Oprofile Regression Caused by commit e5d1367f17ba6a6fed5fd8b74e4d5720923e0c25 on PPC
Date: Mon, 10 Oct 2011 19:38:42 -0400	[thread overview]
Message-ID: <20111010233842.GC24583@mgebm.net> (raw)
In-Reply-To: <20111007204247.GA5444@mgebm.net>

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

On Fri, 07 Oct 2011, Eric B Munson wrote:

> This commit seems to have caused a regression with oprofile.  It is fairly easy
> to trigger, simply run oprofile monitoring an event that will fire (something
> frequent like CPU cycles) causes oprofile to fail saying that the PMU is in use.
> If I disable CONFIG_CGROUP_PERF, everything goes back to working.  I suspect the
> problem is that the PMU is being initialized without being reserved for perf.  I
> am not yet sure of the right fix yet so if you have any suggestions I would
> appreciate them.
> 
> Eric

This isn't the best description of the behavior we see, what happens is at some
point in the profiling session the MMCR register is clobbered by
perf_cgroup_switch() which calls perf_pmu_enable() without reserving the PMC
hardware.  When this happens oprofile stops counting.  It doesn't happen each
time so some runs show event counts that are reasonable, but it can also lead to
event counts that are smaller than expected, or completely missing.

Eric

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2011-10-10 23:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 20:42 Oprofile Regression Caused by commit e5d1367f17ba6a6fed5fd8b74e4d5720923e0c25 on PPC Eric B Munson
2011-10-10 23:38 ` Eric B Munson [this message]
2011-10-11  7:44   ` Peter Zijlstra
2011-10-11  7:47     ` Stephane Eranian
2011-10-11 13:34       ` Eric B Munson
2011-10-11 13:35         ` Stephane Eranian
2011-10-11 13:32     ` Eric B Munson
2011-10-12 16:51     ` Eric B Munson
2011-10-12 20:37       ` Stephane Eranian
2011-10-12 22:20         ` Eric B Munson
2011-10-18 13:53         ` Eric B Munson
2011-10-18 14:43           ` Peter Zijlstra
2011-10-18 14:50             ` Stephane Eranian
2011-10-18 15:20               ` Eric B Munson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111010233842.GC24583@mgebm.net \
    --to=emunson@mgebm.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=anton@samba.org \
    --cc=eranian@google.com \
    --cc=hbabu@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox