Re: [RFC perf,x86] P4 PMU early draft

From: Ingo Molnar
Date: Mon Feb 08 2010 - 23:18:04 EST



* Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote:

> Hi all,
>
> first of all the patches are NOT for any kind of inclusion. It's not ready
> yet. More likely I'm asking for glance review, ideas, criticism.

A quick question: does the code produce something on a real P4? (possibly
only running with a single event - but even that would be enough.)

> The main problem in implementing P4 PMU is that it has much more
> restrictions for event to MSR mapping. [...]

One possibly simpler approach might be to represent the P4 PMU via a maximum
_two_ generic events only.

Last i looked at the many P4 events, i've noticed that generally you can
create any two events. (with a few exceptions) Once you start trying to take
advantage of the more than a dozen seemingly separate counters, additional
non-trivial constraints apply.

So if we only allowed a maximum of _two_ generic events (like say a simple
Core2 has, so it's not a big restriction at all), we wouldnt have to map all
the constraints, we'd only have to encode the specific event-to-MSR details.
(which alone is quite a bit of work as well.)

We could also use the new constraints code to map them all, of course - it
will certainly be more complex to implement.

Hm?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/