From: Eric B Munson <emunson@mgebm.net>
To: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <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: Tue, 11 Oct 2011 09:34:09 -0400 [thread overview]
Message-ID: <20111011133409.GC8151@mgebm.net> (raw)
In-Reply-To: <CABPqkBRs7iZr8pQB19Q2Gw45ntKUumE76v4K=nmXf_+wbBDY6Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]
On Tue, 11 Oct 2011, Stephane Eranian wrote:
> On Tue, Oct 11, 2011 at 9:44 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > On Mon, 2011-10-10 at 19:38 -0400, Eric B Munson wrote:
> >> 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.
> >
> > What kernel are you testing?
> >
> Looking at 3.1-rc9, I doubt it's coming from perf_cgroup_switch(). The function
> is checking for perf context with at least of cgroup event before
> calling perf_pmu_disable().
> If there is no active perf context, there is no cgroup event, thus the
> function is a nop.
> Even if you have a competing perf session, it would have to have at
> least one cgroup
> event for this code to touch HW. The problem must come from somewhere else.
>
> >
>
Does activating any cgroup setup a cgroup event?
Eric
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2011-10-11 13:34 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
2011-10-11 7:44 ` Peter Zijlstra
2011-10-11 7:47 ` Stephane Eranian
2011-10-11 13:34 ` Eric B Munson [this message]
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=20111011133409.GC8151@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