Re: [PATCH 3/9] oprofile, perf, x86: introduce new functions to reserve perfctrs by index

From: Andi Kleen
Date: Thu Mar 25 2010 - 15:33:25 EST


On Thu, Mar 25, 2010 at 04:52:08PM +0100, Robert Richter wrote:
> Andi,
>
> so far it does not seem this reservation patches will go upstream. So
> we still do not have a solution of how to share the pmu with perf. The

There's the current reservation
code which has some issues and is butt ugly, but does its job mostly.

The only real problem I have with it is that it doesn't support fixed counters.

That's not very hard to fix (patches posted), but of course requires
some basic cooperation from impartial maintainers. I think extending
it to other registers shouldn't also be that hard.

> current approach is a global pmu lock. I don't think this is a good
> solution and we already see questions on the oprofile mailing list why
> counters are not available to use. This will become much worse if perf
> is using counters permanently in the kernel (e.g. the perf nmi
> watchdog). This will make oprofile unusable.

NMI watchdog is not on by default luckily.

Anyways I don't really understand what the problem with just
allocating counters properly in perf_events like everyone else.
They need to do that anyways to cooperate with firmware or VMs using these
counters.

-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
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/