From: Paul Mackerras <paulus@samba.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 3/3] perf_counter: new output ABI - part 1
Date: Sat, 21 Mar 2009 20:45:58 +1100 [thread overview]
Message-ID: <18884.46934.898678.53966@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20090320190912.GF6224@elte.hu>
Ingo Molnar writes:
> i think it would still be nice to allow plain old-fashioned
> poll()+read() loops ... but the logistics of that seem difficult.
> mmap() seems to fit this better - and it's probably faster as well.
> (as we have to construct the kernel-space pages anyway, so mapping
> them isnt that big of an issue)
>
> per-CPU-ness will be handled naturally via per-cpu counters.
>
> Paul, can you see any hole/quirkiness in this scheme?
The one thing I can see that we would lose is the ability to have a
signal delivered on every event. The PAPI developers want to be able
to get a signal generated every time the counter overflows, and
previously we could do that using the O_ASYNC flag, but now we'll only
get a signal every page's worth of events.
So I think we want userspace to be able to say how often we should
generate a poll event, i.e. provide a way for userspace to say "please
generate a poll event every N counter events". That would also solve
the problem of 1 page not being a valid configuration - you could set
the poll interval to the number of events that fit in half a page, for
instance.
Paul.
next prev parent reply other threads:[~2009-03-21 9:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 15:15 [RFC][PATCH 0/3] perf_counter: mmap output of overflow data Peter Zijlstra
2009-03-20 15:15 ` [RFC][PATCH 1/3] perf_counter: add an mmap method to allow userspace to read hardware counters Peter Zijlstra
2009-03-20 15:15 ` [RFC][PATCH 2/3] mutex: add atomic_dec_and_mutex_lock] Peter Zijlstra
2009-03-20 15:15 ` [RFC][PATCH 3/3] perf_counter: new output ABI - part 1 Peter Zijlstra
2009-03-20 19:09 ` Ingo Molnar
2009-03-21 9:45 ` Paul Mackerras [this message]
2009-03-21 10:29 ` Peter Zijlstra
2009-03-21 16:21 ` Ingo Molnar
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=18884.46934.898678.53966@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®