linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
	Paul Mackerras <paulus@samba.org>,
	Anton Blanchard <anton@samba.org>,
	Linux PPC dev <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH 1/2] powerpc/perf: Fix finding overflowed PMC in interrupt
Date: Tue, 06 Nov 2012 21:19:42 +1100	[thread overview]
Message-ID: <21513.1352197182@neuling.org> (raw)
In-Reply-To: <5098B28B.2070703@linux.vnet.ibm.com>

Anshuman Khandual <khandual@linux.vnet.ibm.com> wrote:

> On 11/06/2012 07:23 AM, Michael Neuling wrote:
> 
> > +	if (!found && pvr_version_is(PVR_POWER7)) {
> > +		/* check active counters for special buggy p7 overflow */
> > +		for (i = 0; i < cpuhw->n_events; ++i) {
> > +			event = cpuhw->event[i];
> > +			if (!event->hw.idx || is_limited_pmc(event->hw.idx))
> >  				continue;
> > -			val = read_pmc(i + 1);
> > -			if (pmc_overflow(val))
> > -				write_pmc(i + 1, 0);
> > +			if (pmc_overflow_power7(val[event->hw.idx - 1])) {
> 
> 
> I have couple of questions. 
> 
> Can the buggy overflow happen on any of the available counters PMC1-PMC4 ?

No.  It's limited to certain events and I believe it can only happen on
PMC2 and 4.  This code doesn't bother trying to make this distinction
though.

> Will this approach never reset an actual user defined event (with
> sample period < 256) ? Is this related to the counter or the event
> which it is counting ? Just wondering if we have to do something more
> than checking for the count < 256. Just a thought.


I don't understand what you mean by these questions.  Can you explain a
bit more?

Mikey

  reply	other threads:[~2012-11-06 10:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08  1:07 [PATCH] Use pmc_overflow() to detect rolled back events Sukadev Bhattiprolu
2012-09-21  0:38 ` Sukadev Bhattiprolu
2012-11-06  1:08   ` [PATCH 1/2] powerpc/perf: Fix finding overflowed PMC in interrupt Michael Neuling
2012-11-06  1:08     ` [PATCH 2/2] powerpc/perf: Fix for PMCs not making progress Michael Neuling
2012-11-06  1:25     ` [PATCH 1/2] powerpc/perf: Fix finding overflowed PMC in interrupt Anton Blanchard
2012-11-06  1:53       ` Michael Neuling
2012-11-06  1:53       ` Michael Neuling
2012-11-06  6:47         ` Anshuman Khandual
2012-11-06 10:19           ` Michael Neuling [this message]
2012-11-06 10:42             ` Anshuman Khandual
2012-12-22  1:07     ` Sukadev Bhattiprolu

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=21513.1352197182@neuling.org \
    --to=mikey@neuling.org \
    --cc=anton@samba.org \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sukadev@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).