[lkml]   [2015]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] x86, perf: Add an aperfmperf driver
On Tue, Apr 28, 2015 at 3:29 PM, Brown, Len <> wrote:
>> I think that turbostat could do some of its work without being
>> root if we had a driver like this.
> Note that turbostat can be run as non-root this way:
> # setcap cap_sys_rawio=ep ./turbostat
> # chmod +r /dev/cpu/*/msr
> For the debug case, there are a number of MSRs that turbostat must access,
> so would still need permission for that case (which is the only case I use:-)

True. This would only get the average turbo ratio. Of course, I
think that can be done using cpu-cycles as well.

>> 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.


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