From: Paul Mackerras <paulus@samba.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
linux-kernel@vger.kernel.org,
Alexey Kardashevskiy <aik@au1.ibm.com>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] perf, powerpc: Fix power_pmu_event_init to not use event->ctx
Date: Wed, 20 Oct 2010 08:56:42 +1100 [thread overview]
Message-ID: <20101019215642.GB28973@brick.ozlabs.ibm.com> (raw)
In-Reply-To: <1287489030.1994.8.camel@twins>
On Tue, Oct 19, 2010 at 01:50:30PM +0200, Peter Zijlstra wrote:
> On Tue, 2010-10-19 at 10:28 +0200, Peter Zijlstra wrote:
>
> > > (The reason it needs to know whether it is a per-task event is because
> > > there are some hardware events on Power systems which only count when
> > > the processor is not idle, and there are some fixed-function counters
> > > which count such events. For example, the "run cycles" event counts
> > > cycles when the processor is not idle. If the user asks to count
> > > cycles, we can use "run cycles" if this is a per-task event, since the
> > > processor is running when the task is running, by definition. We
> > > can't use "run cycles" if the user asks for "cycles" on a system-wide
> > > counter.)
>
> Right, so the problem comes from you using run-cycles as cycles? How
> does that interact with things like cpu_relax() will that generate a
> difference in run-cycles vs cycles?
Cycles in cpu_relax() are still counted as run cycles. Whether cycles
are considered "run" cycles or "idle" cycles is controlled by a bit in
an SPR that we set and clear in the idle loop and in the interrupt
entry code. Only cycles when we're actually in the idle loop count as
"idle" cycles.
Paul.
next prev parent reply other threads:[~2010-10-19 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 5:55 Paul Mackerras
2010-10-19 8:28 ` Peter Zijlstra
2010-10-19 11:50 ` Peter Zijlstra
2010-10-19 21:56 ` Paul Mackerras [this message]
2010-10-19 10:48 ` [tip:perf/core] " tip-bot for Paul Mackerras
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=20101019215642.GB28973@brick.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=aik@au1.ibm.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®