From: Philip Mucci <phil@sicortex.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg KH <gregkh@suse.de>, Stephane Eranian <eranian@hpl.hp.com>,
William Cohen <wcohen@redhat.com>,
Robert Richter <robert.richter@amd.com>,
linux-kernel@vger.kernel.org,
papi list <ptools-perfapi@cs.utk.edu>
Subject: Re: perfmon2 merge news
Date: Fri, 16 Nov 2007 12:16:50 -0800 [thread overview]
Message-ID: <BFC49780-73B0-47AB-BC95-516ABF557D95@sicortex.com> (raw)
In-Reply-To: <p737ikicjbn.fsf@bingen.suse.de>
> Yes it is for everybody. I've been rather questioning if the slow
> ways (complicated syscalls) to get the counter information are really
> needed.
I suppose by complicated here, your referring to the gather semantics
of the
pfm_read/write_pmds/pmcs calls. Many processors may have 100's of
registers
(IA64, BG/P, SiCortex), some of which have different access times. So a
naive syscall of 'give me all the registers you've got' isn't going
to cut it.
However, any additional simplicity (performance) we can squeeze out
of this
particular primitive is a huge win as it sits in the critical path of
the user
tools (unless one is sampling).
>> referring to the concept of eventsets. Having multiplexing is
>> important.
>
> Why is it important?
>
Performance and noise. See the earlier message about our user-land
implementation versus kernel mode implementations. Any any useful
granularity, you begin to seriously affect the counts with noise as
well as dilate the run-time. But let's punt on this one until after
we get the basics in. It's a non-essential feature at this point.
>> - Custom sample formats would be considered not often used in our
>> community, largely
>> because the tools run on all HPC/Linux architectures. PAPI uses the
>> default sample
>> format which has been sufficient for our needs. However, the lack of
>> custom sample
>> formats preclude the dev of the specialized tools that access the
>> sampling
>> hardware as found on the IA64, PPC64, the Barcelona and the SiCortex
>> node chip.
>> pfmon exports this functionality quite well, and it does get used.
>
> What do you mean with custom sample formats exactly? What information
> do you want in there? And why?
By custom here, I mean the ability to have the kernel take samples
containing
more than just the IP, the PID and a bitmask of which registers
overflowed at this
point. Myself and others have worked hard to get effective address
sampling into the
hardware (there are registers that contain EA's of misses as well as
branch mispredict
data on the PPC, IA64, Barcelona and SiCortex) that are handled
through the use
of a format that gathers up that information at interrupt time for
deposit into
the sample buffer. We are not wedded to Perfmon2's implementation of
these formats, we
are however, wedded to having this information collected at interrupt
time as the data
may change by the time you get back to user-mode. This hardware is
not obscure any more,
it's the norm, as we've learned at thus simple aggregate counters,
even those with precise
interrupt abilities, are not sufficient to satisfy all of our needs.
> e.g. PEBS and so on pretty much fix the in memory sample format in
> hardware,
> so they only way to get a custom format would be to use a separate
> buffer.
>
> I can think of one reason why the kernel should add more information
> in a separate buffer (log the instruction bytes so that it can
> be disassembled and a address histogram be generated using the PEBS
> register values), but it is a relatively obscure one and definitely
> not a essential feature. Unfortunately it is also hard to implement
> completely
> race-free.
>
>> This is kind of comment that makes the Linux/HPC folks 'somber'. What
>> isn't useful, is being dismissive of an entire community that moves a
>> heck of a lot of Linux DVD's.
>
> Sorry, but these kind of non technical BS arguments will just make
> you be ignored in mainline Linux lands. They might work if you pay
> a lot of money to specific Linux companies (do you?), but here
> on linux-kernel you have to convince with purely technical arguments.
I love it when kernel folks refer to their own revenue streams
(and yes, we do, ask your VP of sales) and the needs of a user
community as
"BS non-technical arguments".
But let's get back to basics here. We can sort that out over a beer
sometime.
At this point, let's try and agree on the minimum set of
functionality acceptable for a first round of patches.
- per-CPU (system-wide) and per-thread 64-bit virtualized counters
- dispatch of interrupt on overflow via a signal
- first (self) and third-party (attach) semantics
- extensible to new lines within an architecture without repatching
(By this I mean that through the use of modules that contain PMU
description tables, i.e. patches don't have to be issued for
every new rev
of HW that Intel releases)
To be considered later:
- Sample buffers and formats
- Multiplexing (by event threshold and time slicing)
- fast-read support if the hardware supports it (mmap + user rdpmc)
I think(?) we are all clear now why oprofile is not sufficient, i.e.
simultaneous usage by non-root users, each with different counter
configurations,
lack of read/write access etc. Oprofile is however, a very important
tool
and any initial set of functionality should allow for a very simple
port to
each version of the infrastructure along the way. I'd happily port
incremental versions of PAPI to the patches, so the performance tools
can be
accessible to the LKML community while testing/benchmarking the
patchset on a variety of architectures. If we can agree on the
starting point,
we can move the discussion of the API to the Perfmon2 mailing list
and with your
input, finally 'get it right' in terms of acceptance.
If there's anything we do have in common at the moment, it's momentum.
We (speaking for the HPC community/vendors again) are not in favor of
useless bloat, every
TLB slot, mispredict, miss, timer-tick or pipeline bubble, we care
about, kernel
space or not. It's precisely why this type of infrastructure has
become so
vital to us over the years.
-Phil
next prev parent reply other threads:[~2007-11-16 20:36 UTC|newest]
Thread overview: 118+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 0:34 [PATCH] fix up perfmon to build on -mm Greg KH
2007-11-07 10:34 ` Stephane Eranian
2007-11-07 17:07 ` Greg KH
2007-11-07 13:42 ` Stephane Eranian
2007-11-07 17:08 ` Greg KH
2007-11-07 17:33 ` Andrew Morton
2007-11-07 17:41 ` Greg KH
2007-11-07 17:50 ` Stephane Eranian
2007-11-07 17:47 ` Greg KH
2007-11-07 17:57 ` Stephane Eranian
2007-11-07 19:53 ` Greg KH
2007-11-07 20:39 ` Stephane Eranian
2007-11-08 15:27 ` Stephane Eranian
2007-11-09 20:06 ` Andrew Morton
2007-11-09 21:38 ` Greg KH
2007-11-10 20:32 ` Andi Kleen
2007-11-13 15:17 ` perfmon2 merge news Robert Richter
2007-11-13 15:35 ` [perfmon2] " William Cohen
2007-11-13 17:55 ` Stephane Eranian
2007-11-13 18:33 ` [perfmon] " William Cohen
2007-11-13 21:13 ` Stephane Eranian
2007-11-13 21:29 ` Andi Kleen
2007-11-13 21:46 ` Stephane Eranian
2007-11-13 21:50 ` Andi Kleen
2007-11-13 22:22 ` Stephane Eranian
2007-11-13 22:25 ` Andi Kleen
2007-11-13 22:58 ` Stephane Eranian
2007-11-14 2:07 ` Andi Kleen
2007-11-14 13:09 ` Stephane Eranian
2007-11-14 14:24 ` Andi Kleen
2007-11-14 15:44 ` William Cohen
2007-11-14 16:13 ` Stephane Eranian
2007-11-14 18:53 ` Philippe Elie
2007-11-14 19:15 ` Andi Kleen
2007-11-15 0:07 ` Stephane Eranian
2007-11-13 18:47 ` Philip Mucci
2007-11-13 18:59 ` Greg KH
2007-11-13 20:07 ` Andrew Morton
2007-11-13 20:14 ` Greg KH
2007-11-13 20:36 ` Andi Kleen
2007-11-14 0:28 ` Philip Mucci
2007-11-14 1:52 ` Andi Kleen
2007-11-16 9:18 ` Philip Mucci
2007-11-16 15:15 ` Andi Kleen
2007-11-16 16:00 ` Stephane Eranian
2007-11-16 16:28 ` Andi Kleen
2007-11-16 17:13 ` William Cohen
2007-11-16 21:56 ` Stephane Eranian
2007-11-16 17:36 ` Stephane Eranian
2007-11-16 17:51 ` dean gaudet
2007-11-17 0:29 ` David Miller
2007-11-17 1:07 ` Greg KH
2007-11-16 20:16 ` Philip Mucci [this message]
2007-11-17 0:15 ` David Miller
[not found] ` <1d7226b10711161713j675341b7wdb4f050c59a8be0a@mail.gmail.com>
2007-11-17 1:25 ` Greg KH
[not found] ` <1d7226b10711161748n39b7f195q796d85282ef66134@mail.gmail.com>
2007-11-17 2:13 ` Greg KH
2007-11-14 7:24 ` [perfmon] Re: [perfmon2] " Paul Mackerras
2007-11-14 7:40 ` Andrew Morton
2007-11-14 10:38 ` Christoph Hellwig
2007-11-14 10:43 ` Paul Mackerras
2007-11-14 11:00 ` Christoph Hellwig
2007-11-14 11:12 ` David Miller
2007-11-14 11:14 ` David Miller
2007-11-14 11:44 ` Paul Mackerras
2007-11-13 23:49 ` Nick Piggin
2007-11-14 11:58 ` David Miller
2007-11-14 0:25 ` Nick Piggin
2007-11-14 21:30 ` Paul Mackerras
2007-11-14 10:17 ` Nick Piggin
2007-11-14 22:56 ` Chuck Ebbert
2007-11-14 11:03 ` Nick Piggin
2007-11-14 11:52 ` David Miller
2007-11-14 12:03 ` Paul Mackerras
2007-11-14 12:07 ` David Miller
2007-11-14 0:28 ` Nick Piggin
2007-11-14 21:50 ` Paul Mackerras
2007-11-14 23:03 ` David Miller
2007-11-14 23:12 ` Paul Mackerras
2007-11-14 23:21 ` David Miller
2007-11-15 1:11 ` Paul Mackerras
2007-11-15 1:27 ` David Miller
2007-11-15 2:34 ` Paul Mackerras
2007-11-15 7:48 ` Herbert Xu
2007-11-15 8:19 ` Andi Kleen
2007-11-19 13:08 ` David Miller
2007-11-19 20:53 ` Stephane Eranian
2007-11-20 0:55 ` David Miller
2007-11-19 21:43 ` Paul Mackerras
2007-11-19 22:48 ` Stephane Eranian
2007-11-20 0:53 ` David Miller
2007-12-13 16:00 ` Stephane Eranian
2007-12-14 19:12 ` Frank Ch. Eigler
2007-12-14 21:07 ` Stephane Eranian
2007-12-15 15:54 ` Frank Ch. Eigler
2007-11-15 8:29 ` [perfmon] " Stephane Eranian
2007-11-14 13:51 ` Stephane Eranian
2007-11-14 11:39 ` Paul Mackerras
2007-11-14 11:52 ` David Miller
2007-11-14 13:47 ` Stephane Eranian
2007-11-14 12:38 ` Andi Kleen
2007-11-14 14:13 ` Stephane Eranian
2007-11-14 14:26 ` Andi Kleen
2007-11-15 0:23 ` Paul Mackerras
2007-11-14 19:48 ` David Miller
2007-11-15 4:20 ` dean gaudet
2007-11-15 4:47 ` Paul Mackerras
2007-11-15 5:14 ` dean gaudet
2007-11-15 8:53 ` Stephane Eranian
2007-11-15 17:01 ` [perfmon2] [perfmon] " Dan Terpstra
2007-11-13 21:33 ` [perfmon] Re: [perfmon2] " Stephane Eranian
2007-11-13 21:45 ` Greg KH
2007-11-13 22:27 ` Christoph Hellwig
2007-11-13 20:42 ` Andi Kleen
2007-11-13 18:32 ` Stephane Eranian
2007-11-13 22:29 ` Christoph Hellwig
2007-11-16 18:25 ` PMC core internal API design Mathieu Desnoyers
2007-11-17 17:19 perfmon2 merge news Patrick DEMICHEL
2007-11-18 0:35 ` David Miller
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=BFC49780-73B0-47AB-BC95-516ABF557D95@sicortex.com \
--to=phil@sicortex.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=eranian@hpl.hp.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ptools-perfapi@cs.utk.edu \
--cc=robert.richter@amd.com \
--cc=wcohen@redhat.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®