mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Fleming <matt@console-pimps.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Robert Richter <robert.richter@amd.com>,
	Lin Ming <ming.m.lin@intel.com>,
	Paul Mackerras <paulus@samba.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Don Zickus <dzickus@redhat.com>,
	Cyrill Gorcunov <gorcunov@gmail.com>, Len Brown <lenb@kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: [RFC][PATCH 3/5] perf: Add hrtimer code for PMI-less hardware counters
Date: Mon, 30 Aug 2010 14:27:44 +0100	[thread overview]
Message-ID: <20100830132744.GB24828@console-pimps.org> (raw)
In-Reply-To: <1283172902.1820.897.camel@laptop>

On Mon, Aug 30, 2010 at 02:55:02PM +0200, Peter Zijlstra wrote:
> On Mon, 2010-08-30 at 13:13 +0100, Matt Fleming wrote:
> > Currently, it's impossible to periodically sample hardware counters that
> > lack performance monitoring interrupt (PMI) support. In order to sample
> > these counters we can create an event group which is backed by a
> > hrtimer, thereby simulating a PMI.
> > 
> > When the hrtimer goes off we sample the values in the hardware
> > counters. Because we obviously can't rely on the hrtimer going off at
> > exactly the sample period (say, every 1000 cache misses) the values need
> > to be weighted by the variable period since the last hrtimer went
> > off. This is so that we can compensate for the variability in hrtimer
> > period.
> > 
> > If perf record tries to create a sampling counter and the hardware
> > doesn't support it then we'll fall back to creating an event group with
> > a hrtimer.
> 
> 
> Why is this changing kernel code?
> 
> You can create those groups in userspace..

I'm lost. Is it possible to do this patch entirely in userspace? How do
we periodically sample the counters if it's not being done in the
kernel?

  reply	other threads:[~2010-08-30 13:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 12:13 [RFC][PATCH 0/5] hrtimer group events Matt Fleming
2010-08-30 12:13 ` [RFC][PATCH 1/5] perf: Check if we should exclude idle thread in perf_exclude_event() Matt Fleming
2010-08-31 14:54   ` Frederic Weisbecker
2010-08-31 15:20     ` Matt Fleming
2010-08-31 15:21       ` Frederic Weisbecker
2010-08-30 12:13 ` [RFC][PATCH 2/5] perf: Turn the group counter values into delta values Matt Fleming
2010-08-30 12:54   ` Peter Zijlstra
2010-08-30 13:21     ` Matt Fleming
2010-08-30 12:13 ` [RFC][PATCH 3/5] perf: Add hrtimer code for PMI-less hardware counters Matt Fleming
2010-08-30 12:55   ` Peter Zijlstra
2010-08-30 13:27     ` Matt Fleming [this message]
2010-08-30 14:12       ` Peter Zijlstra
2010-08-30 19:35         ` Matt Fleming
2010-08-30 12:13 ` [RFC][PATCH 4/5] sh: Add support for sampling counters Matt Fleming
2010-08-30 12:13 ` [RFC][PATCH 5/5] perf: Add support for PERF_SAMPLE_READ samples Matt Fleming

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=20100830132744.GB24828@console-pimps.org \
    --to=matt@console-pimps.org \
    --cc=acme@redhat.com \
    --cc=dzickus@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    --cc=mjg59@srcf.ucam.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.com \
    --cc=rui.zhang@intel.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

all inboxes | Powered by JetHome®