lkml.org 
[lkml]   [2015]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] x86, perf: Add an aperfmperf driver
On Tue, Apr 28, 2015 at 03:43:38PM -0700, Andy Lutomirski wrote:
> On Tue, Apr 28, 2015 at 3:29 PM, Brown, Len <len.brown@intel.com> wrote:

> >> Thoughts? Would it make sense at all? Did I wire it up right? This is
> >> the only PMU driver I've ever written, and it could have any number of
> >> issues.
> >
> > APERF/MPERF, as with all per-thread MSRs, must be accessed
> > from the local processor. I didn't see where this driver
> > distinguishes the CPU. Also, I assume the intent is to return
> > a snapshot, rather than sampling, yes?
>
> I think that the perf core takes care of that for us, but I'm not entirely sure.

It does indeed. The events are always created/used in either task or cpu
context, and in the case of task context they're context switched along,
which again results in strict per cpu usage.

Since this driver has no state to track nothing else is required.


\
 
 \ /
  Last update: 2015-04-29 11:21    [W:0.073 / U:10.112 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site