The following patches implement a minimal perfmon2 subsystem which provides
access to the hardware performance counters of modern processors.
This series supports ONLY per-thread counting of PMU events (no sampling) for
AMD64 and Intel Core processors in both 32 and 64 bit modes.
This is version 2 of the series following the feedback from LKML. The series
is against 2.6.26-rc6. Compared to previous version, this new series
addresses the comments I received from Aran, Greg KH and others:
- some small patches were integrated with other bigger patches which
they closely related to.
- sysfs code has been largely simplified
Please review.
Signed-off-by: Stephane Eranian <[email protected]>
--
On Tue, 17 Jun 2008 15:02:01 PDT, [email protected] said:
> The following patches implement a minimal perfmon2 subsystem which provides
> access to the hardware performance counters of modern processors.
>
> This series supports ONLY per-thread counting of PMU events (no sampling) for
> AMD64 and Intel Core processors in both 32 and 64 bit modes.
>
> This is version 2 of the series following the feedback from LKML. The series
> is against 2.6.26-rc6. Compared to previous version, this new series
> addresses the comments I received from Aran, Greg KH and others:
First, a meta-complaint - Stephane, you're not the only person who does
the following, and in fact, you're not the worst offender. I've seen a *lot*
of even less clear patchsets on lkml - I actually only bothered to chase *this*
one down because I happened to know that a co-worker might be interested.
Would it be asking too much to have a paragraph or so on *why* we
want this patchset? Does it add functionality, or fix a bug, or reduce
memory footprint for machines that don't need sampling, or? Give us a few
sentences of why we should be excited this code is landing - otherwise it's
likely to be just another new option that people will hit 'N' when they come
across it in 'make oldconfig'. Tell us why we as testers/bleeding edgers
want to hit 'Y'.
I finally grovelled around in patch 2, and found this in a comment in
perfmon_attach.c:
+ * More information about perfmon available at:
+ * http://www.hpl.hp.com/research/linux/perfmon
However, said page merely says "The project is now completely hosted
<here> http://perfmon2.sf.net/"
Eventually, after chasing a few links, I find myself at:
http://sourceforge.net/projects/perfmon2
"The goal of the project is to design and implement, on all major
architectures, a standard Linux kernel interface, to access the hardware
performance counters of modern processors. The project also developed a user
library,libpfm, and a tool, pfmon."
Several *more* links and I find http://perfmon2.sourceforge.net/perfmon2-20080124.pdf
which finally tells me *something* about what this does and why I would want
to be interested in it...
"Oh. So this *could* be used to tell Professor J Random that his code runs
like a sedated sloth because things that should be cache-hot are actually
cache-cold and we're spending 75% of our time waiting for cache line loads..."
*NOW* I'm interested. :)
Second comment - I haven't done a thorough check, but the Kconfig entry shows
up near patch 7 or 8 of 19. Traditionally, that's done in the *last* patch
so everything added is intentionally dead code, to make it easier to bisect
through. It looks like possible trouble if bisecting between 2 other points
(say 2.6.27-rc1 and 2.6.27-rc2 or whenever this merges) happens to land near
patch 13 of 19.