From: Paul Mackerras <paulus@samba.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH/RFC 2/2] perfcounters: add an mmap method to allow userspace to read hardware counters
Date: Tue, 17 Mar 2009 20:24:38 +1100 [thread overview]
Message-ID: <18879.27734.627571.687251@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <1237279317.5189.150.camel@laptop>
Peter Zijlstra writes:
> Ah, right. I think some of the intel chips can do similar things with
> rdpmc instructions.
Ah OK, I didn't know that. Cool.
> > Ingo has talked about reusing some of the tracing infrastructure for
> > reporting perf_counter events to userspace. That sounds like an
> > excellent idea to me, and that is why I didn't bother with putting the
> > event queue into the mmapped page at this stage. If it makes sense to
> > add it, it can be added later.
>
> Yeah, I've been looking into that, but so far I'm a bit at a loss, all
> that tracing stuff is per-cpu, and that's massive overkill for us, since
> we're dealing with single cpu streams.
I almost certainly know less about the tracing infrastructure than
you. :) Per-cpu buffers does indeed sound like overkill for what we
want - though we might actually want per-cpu buffers if we have
inherited sampling counters and a deep process hierarchy.
> One worry though, supposedly we want to mmap() such buffers too at some
> point, how would that interact with that you proposed?
I think we just have separate pages for the event ring buffer and the
info for reading the counter in userspace, and then there isn't any
interaction. We can do that either by having two fds and mmapping on
each, or by using the file offset argument to mmap.
Paul.
prev parent reply other threads:[~2009-03-17 9:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-17 5:42 Paul Mackerras
2009-03-17 7:38 ` Peter Zijlstra
2009-03-17 8:27 ` Paul Mackerras
2009-03-17 8:41 ` Peter Zijlstra
2009-03-17 9:24 ` Paul Mackerras [this message]
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=18879.27734.627571.687251@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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®