Messages in this thread | | | Date | Mon, 11 May 2015 11:48:21 +0200 | From | Ingo Molnar <> | Subject | Re: [RFC] x86, perf: Add an aperfmperf driver |
| |
* Andy Lutomirski <luto@kernel.org> wrote:
> + event->hw.idx = -1; > + event->hw.event_base = (event->attr.config == APERFMPERF_EVENT_APERF ? > + MSR_IA32_APERF : MSR_IA32_MPERF);
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 (!).
Thanks,
Ingo
| |