Re: [RFC] x86, perf: Add an aperfmperf driver

From: Ingo Molnar
Date: Mon May 11 2015 - 05:48:33 EST

* Andy Lutomirski <luto@xxxxxxxxxx> wrote:

> + event->hw.idx = -1;
> + event->hw.event_base = (event->attr.config == APERFMPERF_EVENT_APERF ?

So instead of having a separate driver per MSR, I think it might be
more useful to have a generic 'MSR as counters' PMU driver, for such
really simple cases where MSR contents represent an interesting
hardware metric, and have a table that enumerates the MSRs we allow to
be measured, and a sysfs list of them, to allow easy discovery.

APERF/MPERF would be one such MSR, MSR_SMI_COUNT another one - but
there are also other interesting ones.

Some of these are per CPU, some are system wide. Such an approach
would be far more robust than tooling poking around in /dev/msr (!).


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at