From: Ingo Molnar <mingo@elte.hu>
To: Carl Love <cel@us.ibm.com>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Philip Mucci <mucci@eecs.utk.edu>,
LKML <linux-kernel@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>,
Paul Mackerras <paulus@samba.org>,
Maynard Johnson <mpjohn@us.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
eranian@gmail.com,
perfmon2-devel <perfmon2-devel@lists.sourceforge.net>
Subject: Re: [perfmon2] comments on Performance Counters for Linux (PCL)
Date: Sat, 30 May 2009 21:16:29 +0200 [thread overview]
Message-ID: <20090530191629.GA3105@elte.hu> (raw)
In-Reply-To: <1243608160.6534.46.camel@carll-linux-desktop>
* Carl Love <cel@us.ibm.com> wrote:
>
> On Fri, 2009-05-29 at 10:21 +0200, Geert Uytterhoeven wrote:
> > On Fri, 29 May 2009, Ingo Molnar wrote:
> > > * Paul Mackerras <paulus@samba.org> wrote:
> > > > Ingo Molnar writes:
> > > > > * Corey Ashford <cjashfor@linux.vnet.ibm.com> wrote:
> > > > > >> So you're suggesting to artificually strech periods by say
> > > > > >> composing a single overflow from smaller ones, ignoring the
> > > > > >> intermediate overflow events?
> > > > > >>
> > > > > >> That sounds doable, again, patch welcome.
> > > > > >
> > > > > > I definitely agree with Stephane's point on this one. I had
> > > > > > assumed that long irq_periods (longer than the width of the
> > > > > > counter) would be synthesized as you suggest. If this is not the
> > > > > > case, PCL should be changed so that it does, -or- at a minimum,
> > > > > > the user should get an error back stating that the period is too
> > > > > > long for the hardware counter.
> > > > >
> > > > > this looks somewhat academic - at least on x86, even the fastest
> > > > > events (say cycles) with a 32 bit overflow means one event per
> > > > > second on 4GB. That's not a significant event count in practice.
> > > > > What's the minimum width we are talking about on Power?
> > > >
> > > > 32 bits, but since the top bit is effectively a level-sensitive
> > > > interrupt request, the maximum period in hardware is 2^31 counts.
> > > >
> > > > However, I already support 64-bit interrupt periods (well, 63-bit
> > > > actually) on powerpc by only calling perf_counter_overflow() when
> > > > counter->hw.period_left becomes <= 0, and arranging to set the
> > > > hardware counter to 0 if counter->hw.period_left is >= 0x80000000.
> > > > It's a tiny amount of code to handle it, really.
> > >
> > > No argument about that - just wanted to know whether there's any
> > > real practical effect beyond the nitpicking factor ;-)
> >
> > I never really dived into this stuff, but ISTR there are some 16-bit counters
> > on CELL? Is that correct?
>
> FYI, the counters on CELL are configurable. You can have up to
> eight 16 bit count counters or you can combine counters i and i=1
> (where i=0,2,4,6) into 32 bit counters. This allows you to have
> some 16 and some 32 bit counters at the same time.
If 16-bit counters are exposed then this can be solved like the
PowerPC perfcounters code does it: by not propagating 'early' IRQs
back to the generic layer but continuing it until the real threshold
has been reached.
Ingo
next prev parent reply other threads:[~2009-05-30 19:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 14:58 comments on Performance Counters for Linux (PCL) stephane eranian
2009-05-28 16:25 ` Peter Zijlstra
2009-05-28 16:47 ` Peter Zijlstra
2009-05-28 21:06 ` [perfmon2] " Corey Ashford
2009-05-28 21:35 ` Ingo Molnar
2009-05-28 23:24 ` Paul Mackerras
2009-05-29 7:19 ` Ingo Molnar
2009-05-29 8:21 ` Geert Uytterhoeven
2009-05-29 14:42 ` Carl Love
2009-05-30 19:16 ` Ingo Molnar [this message]
2009-05-29 10:50 ` stephane eranian
2009-05-29 10:53 ` stephane eranian
2009-05-29 6:51 ` Andi Kleen
2009-05-29 8:19 ` Peter Zijlstra
2009-05-29 8:53 ` Andi Kleen
2009-05-29 16:13 ` [perfmon2] " Luck, Tony
2009-05-29 10:43 ` stephane eranian
2009-05-29 15:02 ` Peter Zijlstra
2009-05-29 15:59 ` stephane eranian
2009-05-29 20:32 ` Peter Zijlstra
2009-05-29 20:49 ` 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=20090530191629.GA3105@elte.hu \
--to=mingo@elte.hu \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=cel@us.ibm.com \
--cc=eranian@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpjohn@us.ibm.com \
--cc=mucci@eecs.utk.edu \
--cc=paulus@samba.org \
--cc=perfmon2-devel@lists.sourceforge.net \
--cc=tglx@linutronix.de \
/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