[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150511094821.GA7027@gmail.com>
Date: Mon, 11 May 2015 11:48:21 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Andy Lutomirski <luto@...nel.org>
Cc: Len Brown <len.brown@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: Re: [RFC] x86, perf: Add an aperfmperf driver
* Andy Lutomirski <luto@...nel.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists