From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC] perfcounters: record time running and time enabled for each counter
Date: Fri, 20 Mar 2009 15:50:31 +0100 [thread overview]
Message-ID: <1237560631.24626.103.camel@twins> (raw)
In-Reply-To: <18883.34555.748843.35920@cargo.ozlabs.ibm.com>
On Fri, 2009-03-20 at 23:07 +1100, Paul Mackerras wrote:
> Impact: new functionality
>
> Currently, if there are more counters enabled than can fit on the CPU,
> the kernel will multiplex the counters on to the hardware using
> round-robin scheduling. That isn't too bad for sampling counters, but
> for counting counters it means that the value read from a counter
> represents some unknown fraction of the true count of events that
> occurred while the counter was enabled.
>
> This remedies the situation by keeping track of how long each counter
> is enabled for, and how long it is actually on the cpu and counting
> events. These times are recorded in nanoseconds using the task clock
> for per-task counters and the cpu clock for per-cpu counters.
Can't we do this by simply adding some software counters? A task local
to each group and a task local on its own.
Since the solo task local will always be scheduled, you can get the
sampling fraction by comparing the group task local one to the solo one.
next prev parent reply other threads:[~2009-03-20 14:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 12:07 [PATCH/RFC] perfcounters: record time running and time enabled for each counter Paul Mackerras
2009-03-20 14:50 ` Peter Zijlstra [this message]
2009-03-20 22:30 ` Paul Mackerras
2009-03-20 20:13 ` Corey Ashford
2009-03-20 22:31 ` 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=1237560631.24626.103.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.