public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: Len Brown <len.brown@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [RFC] x86, perf: Add an aperfmperf driver
Date: Mon, 11 May 2015 11:48:21 +0200	[thread overview]
Message-ID: <20150511094821.GA7027@gmail.com> (raw)
In-Reply-To: <2c37309d20afadf88ad4a82cf0ce02b9152801e2.1430256154.git.luto@kernel.org>


* 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

      parent reply	other threads:[~2015-05-11  9:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 21:25 [RFC] x86, perf: Add an aperfmperf driver Andy Lutomirski
2015-04-28 22:29 ` Brown, Len
2015-04-28 22:43   ` Andy Lutomirski
2015-04-29  9:13     ` Peter Zijlstra
2015-04-29  9:09 ` Peter Zijlstra
2015-04-29 18:50   ` Andy Lutomirski
2015-04-30  1:17     ` Andy Lutomirski
2015-04-30  8:51       ` Peter Zijlstra
2015-04-30 22:09         ` Andy Lutomirski
2015-04-29  9:14 ` Peter Zijlstra
2015-05-11  9:48 ` Ingo Molnar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150511094821.GA7027@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox