linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "David Laight" <David.Laight@ACULAB.COM>
To: "Eric B Munson" <emunson@mgebm.net>
Cc: a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org,
	paulus@samba.org, anton@samba.org, acme@ghostprotocols.net,
	mingo@elte.hu, linuxppc-dev@lists.ozlabs.org, stable@kernel.org
Subject: RE: [PATCH V4] POWER: perf_event: Skip updating kernel counters if register value shrinks
Date: Wed, 27 Apr 2011 14:13:25 +0100	[thread overview]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6D8AD06@saturn3.aculab.com> (raw)
In-Reply-To: <20110427130822.GC2936@mgebm.net>

=20
> prev and val are both 64 bit variables holding 32 bit numbers, we do
not
> accumulate in either, they are both replaced by values directly from
the
> registers.
> So prev > val will not always be true.

The code seems to be:
    prev =3D local64_read(&event->hw.prev_count);
    val =3D read_pmc(event->hw.idx);
    delta =3D check_and_compute_delta(prev, val);
    local64_add(delta, &event->count);
Which looks very much like 'prev' being a 64bit counter generated
from the 32bit pmc register.

	David

  reply	other threads:[~2011-04-27 13:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 18:12 [PATCH V4] POWER: perf_event: Skip updating kernel counters if register value shrinks Eric B Munson
2011-04-27  7:40 ` David Laight
2011-04-27 12:19   ` Eric B Munson
2011-04-27 12:34     ` David Laight
2011-04-27 12:59       ` Eric B Munson
2011-04-27 13:04         ` David Laight
2011-04-27 12:42     ` David Laight
2011-04-27 13:08       ` Eric B Munson
2011-04-27 13:13         ` David Laight [this message]
2011-04-27 13:20           ` Eric B Munson
2011-04-27 13:26   ` Benjamin Herrenschmidt

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=AE90C24D6B3A694183C094C60CF0A2F6D8AD06@saturn3.aculab.com \
    --to=david.laight@aculab.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=anton@samba.org \
    --cc=emunson@mgebm.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=stable@kernel.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;
as well as URLs for NNTP newsgroup(s).