From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Stephane Eranian <eranian@google.com>
Cc: Anton Blanchard <anton@samba.org>,
linux-kernel@vger.kernel.org, peterz@infradead.org,
mingo@elte.hu, gleb@redhat.com, wcohen@redhat.com,
vince@deater.net, asharma@fb.com, andi@firstfloor.org,
paulus@samba.org, emunson@mgebm.net, imunsie@au1.ibm.com,
benh@kernel.crashing.org
Subject: Re: [PATCH] perf_events: fix broken intr throttling (v3)
Date: Thu, 9 Feb 2012 19:19:30 -0800 [thread overview]
Message-ID: <20120210031930.GA28023@us.ibm.com> (raw)
In-Reply-To: <CABPqkBRbvs3rHoCw9najObgUvfSCziVrR-U-UARWN3+St2=v8A@mail.gmail.com>
Stephane Eranian [eranian@google.com] wrote:
| On Wed, Feb 8, 2012 at 12:32 PM, Anton Blanchard <anton@samba.org> wrote:
| >
| > Hi,
| >
| > On Thu, 26 Jan 2012 17:03:19 +0100
| > Stephane Eranian <eranian@google.com> wrote:
| >
| >> This patch fixes the throttling mechanism. It was broken
| >> in 3.2.0. Events were not being unthrottled. The unthrottling
| >> mechanism required that events be checked at each timer tick.
| >
| > This patch breaks perf on POWER. I haven't had a chance to work out why
| > yet, but will investigate tomorrow.
| >
| Did you apply the subsequent patch I posted yesterday:
|
| https://lkml.org/lkml/2012/2/7/185
I applied both patches to the powerpc.git tree - following hunk already
exists in the powerpc tree (and even Jan 27 mainline) so I skipped this
hunk.
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -988,6 +988,9 @@ static void x86_pmu_start(struct perf_event *event, int flags)
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
int idx = event->hw.idx;
+ if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED)))
+ return;
+
if (WARN_ON_ONCE(idx == -1))
return;
I tried this on Power7 system with a simple 'nooploop' program that loops
in while(1) for 10 seconds.
Results before the patches were applied:
# /tmp/perf record -e cycles,cycles /tmp/nooploop 10
[ perf record: Woken up 4 times to write data ]
[ perf record: Captured and wrote 0.886 MB perf.data (~38714 samples) ]
# /tmp/perf report -D | tail -15
Aggregated stats:
TOTAL events: 19307
MMAP events: 42
COMM events: 2
EXIT events: 2
SAMPLE events: 19261
cycles stats:
TOTAL events: 9993
MMAP events: 4
COMM events: 1
EXIT events: 2
SAMPLE events: 9986
cycles stats:
TOTAL events: 9275
SAMPLE events: 9275
After applying both patches:
# /tmp/perf record -e cycles,cycles /tmp/nooploop 10
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.006 MB perf.data (~260 samples) ]
# /tmp/perf report -D | tail -15
Aggregated stats:
TOTAL events: 80
MMAP events: 42
COMM events: 2
EXIT events: 2
SAMPLE events: 34
cycles stats:
TOTAL events: 24
MMAP events: 4
COMM events: 1
EXIT events: 2
SAMPLE events: 17
cycles stats:
TOTAL events: 17
SAMPLE events: 17
Sukadev
next prev parent reply other threads:[~2012-02-10 3:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 16:03 [PATCH] perf_events: fix broken intr throttling (v3) Stephane Eranian
2012-01-26 16:16 ` Peter Zijlstra
2012-01-26 18:22 ` Arun Sharma
2012-01-28 12:04 ` [tip:perf/urgent] perf: Fix broken interrupt rate throttling tip-bot for Stephane Eranian
2012-02-08 11:32 ` [PATCH] perf_events: fix broken intr throttling (v3) Anton Blanchard
2012-02-08 11:43 ` Stephane Eranian
2012-02-10 3:19 ` Sukadev Bhattiprolu [this message]
2012-02-10 6:15 ` Benjamin Herrenschmidt
2012-02-15 2:37 ` Sukadev Bhattiprolu
2012-02-19 11:26 ` Stephane Eranian
2012-02-20 19:01 ` Sukadev Bhattiprolu
2012-02-09 5:23 ` Anshuman Khandual
2012-02-09 22:45 ` Stephane Eranian
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=20120210031930.GA28023@us.ibm.com \
--to=sukadev@linux.vnet.ibm.com \
--cc=andi@firstfloor.org \
--cc=anton@samba.org \
--cc=asharma@fb.com \
--cc=benh@kernel.crashing.org \
--cc=emunson@mgebm.net \
--cc=eranian@google.com \
--cc=gleb@redhat.com \
--cc=imunsie@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=vince@deater.net \
--cc=wcohen@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.