[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110407161611.GC3119@mgebm.net>
Date: Thu, 7 Apr 2011 12:16:11 -0400
From: Eric B Munson <emunson@...bm.net>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...e.hu,
acme@...stprotocols.net, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, anton@...ba.org
Subject: Re: [PATCH] POWER: perf_event: Skip updating kernel counters if
register value shrinks
On Thu, 07 Apr 2011, Benjamin Herrenschmidt wrote:
>
> > > Doesn't that mean that power_pmu_read() can only ever increase the value of
> > > the perf_event and so will essentially -stop- once the counter rolls over ?
> > >
> > > Similar comments every where you do this type of comparison.
> > >
> > > Cheers,
> > > Ben.
> >
> > Sorry for the nag, but am I missing something about the way the register and
> > the previous values are reset in the overflow interrupt handler?
>
> Well, not all counters get interrupts right ? Some counters are just
> free running... I'm not sure when that power_pmu_read() function is
> actually used by the core, I'm not that familiar with perf, but I'd say
> better safe than sorry. When comparing counter values, doing in a way
> that is generally safe vs. wraparounds. Eventually do a helper for that.
>
> Cheers,
> Ben.
I am honestly not sure, I was under the assumption that all counters would
generate an interrupt if they overflowed. I do not have the hardware docs to
prove this, so I will have a V3 that (I think/hope) addresses your concerns out
momentarily.
Eric
Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)
Powered by blists - more mailing lists