* Andy Lutomirski 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 generi
On Thu, Apr 30, 2015 at 1:51 AM, Peter Zijlstra wrote:
> On Wed, Apr 29, 2015 at 06:17:05PM -0700, Andy Lutomirski wrote:
>> >> > + /* no sampling */
>> >> > + if (event->hw.sample_period)
>> >> > + return -EINVAL;
>> >>
>> >> You could have set pmu::capabilities =
>> >> PERF_P
On Wed, Apr 29, 2015 at 06:17:05PM -0700, Andy Lutomirski wrote:
> >> > + /* no sampling */
> >> > + if (event->hw.sample_period)
> >> > + return -EINVAL;
> >>
> >> You could have set pmu::capabilities =
> >> PERF_PMU_CAP_NO_INTERRUPT which would also have killed that dead.
> >
On Wed, Apr 29, 2015 at 11:50 AM, Andy Lutomirski wrote:
> On Apr 29, 2015 2:09 AM, "Peter Zijlstra" wrote:
>>
>> On Tue, Apr 28, 2015 at 02:25:37PM -0700, Andy Lutomirski wrote:
>> > diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
>> > index 80091ae54c2b..fadc822efc90 10
On Apr 29, 2015 2:09 AM, "Peter Zijlstra" wrote:
>
> On Tue, Apr 28, 2015 at 02:25:37PM -0700, Andy Lutomirski wrote:
> > diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
> > index 80091ae54c2b..fadc822efc90 100644
> > --- a/arch/x86/kernel/cpu/Makefile
> > +++ b/arch/x86/k
On Tue, Apr 28, 2015 at 02:25:37PM -0700, Andy Lutomirski wrote:
> +static struct pmu pmu_aperfmperf = {
> +.task_ctx_nr= perf_invalid_context,
You could actually have made that perf_sw_context, because its
impossible to fail to add() this event. That will make it possible to
attach i
On Tue, Apr 28, 2015 at 03:43:38PM -0700, Andy Lutomirski wrote:
> On Tue, Apr 28, 2015 at 3:29 PM, Brown, Len 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.
> >
> > APER
On Tue, Apr 28, 2015 at 02:25:37PM -0700, Andy Lutomirski wrote:
> diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
> index 80091ae54c2b..fadc822efc90 100644
> --- a/arch/x86/kernel/cpu/Makefile
> +++ b/arch/x86/kernel/cpu/Makefile
> @@ -45,6 +45,8 @@ obj-$(CONFIG_PERF_EVENT
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 debu
> 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
Signed-off-by: Andy Lutomirski
---
This driver seems a little bit silly, but I can imagine it being useful. For
example, I think that turbostat could do some of its work without being
root if we had a driver like this.
Thoughts? Would it make sense at all? Did I wire it up right? This is
the
11 matches
Mail list logo