Re: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support

2014-10-08 Thread Peter Zijlstra
On Wed, Oct 08, 2014 at 04:47:04PM +0200, Peter Zijlstra wrote: > On Wed, Oct 08, 2014 at 01:15:35PM +0100, Matt Fleming wrote: > > I was having an interesting discussion with one of the teams using this > > stuff at Intel and they made the suggestion that when using, > > > > perf stat -p > >

Re: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support

2014-10-08 Thread Peter Zijlstra
On Wed, Oct 08, 2014 at 01:15:35PM +0100, Matt Fleming wrote: > I was having an interesting discussion with one of the teams using this > stuff at Intel and they made the suggestion that when using, > > perf stat -p > > we should by default opt for sharing an RMID between all tasks in that > t

Re: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support

2014-10-08 Thread Matt Fleming
On Wed, 08 Oct, at 11:36:58AM, Matt Fleming wrote: > On Tue, 07 Oct, at 09:43:10PM, Peter Zijlstra wrote: > > On Wed, Sep 24, 2014 at 03:04:12PM +0100, Matt Fleming wrote: > > > +/* > > > + * Determine if @a and @b measure the same set of tasks. > > > + */ > > > +static bool __match_event(struct pe

Re: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support

2014-10-08 Thread Matt Fleming
On Tue, 07 Oct, at 09:43:10PM, Peter Zijlstra wrote: > On Wed, Sep 24, 2014 at 03:04:12PM +0100, Matt Fleming wrote: > > +/* > > + * Determine if @a and @b measure the same set of tasks. > > + */ > > +static bool __match_event(struct perf_event *a, struct perf_event *b) > > +{ > > + if ((a->attac

Re: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support

2014-10-07 Thread Peter Zijlstra
On Wed, Sep 24, 2014 at 03:04:12PM +0100, Matt Fleming wrote: > +/* > + * Determine if @a and @b measure the same set of tasks. > + */ > +static bool __match_event(struct perf_event *a, struct perf_event *b) > +{ > + if ((a->attach_state & PERF_ATTACH_TASK) != > + (b->attach_state & PER

Re: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support

2014-09-29 Thread Matt Fleming
On Wed, 24 Sep, at 10:39:37PM, Andi Kleen wrote: > On Wed, Sep 24, 2014 at 09:27:39PM +0100, Matt Fleming wrote: > > > > +static int __init intel_cqm_init(void) > > > > +{ > > > > + int i, cpu, ret; > > > > + > > > > + if (!cpu_has(&boot_cpu_data, X86_FEATURE_CQM_OCCUP_LLC)) > > > > +

Re: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support

2014-09-24 Thread Andi Kleen
On Wed, Sep 24, 2014 at 09:27:39PM +0100, Matt Fleming wrote: > > > +static int __init intel_cqm_init(void) > > > +{ > > > + int i, cpu, ret; > > > + > > > + if (!cpu_has(&boot_cpu_data, X86_FEATURE_CQM_OCCUP_LLC)) > > > + return -ENODEV; > > > > This should use cpufeature.h > > What? Pl

Re: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support

2014-09-24 Thread Matt Fleming
On Wed, 24 Sep, at 09:40:10AM, Andi Kleen wrote: > Matt Fleming writes: > > > > diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile > > index 7e1fd4e08552..8abb18fbcd13 100644 > > --- a/arch/x86/kernel/cpu/Makefile > > +++ b/arch/x86/kernel/cpu/Makefile > > @@ -38,7 +38,7 @@ o

Re: [PATCH 08/11] perf/x86/intel: Add Intel Cache QoS Monitoring support

2014-09-24 Thread Andi Kleen
Matt Fleming writes: > > diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile > index 7e1fd4e08552..8abb18fbcd13 100644 > --- a/arch/x86/kernel/cpu/Makefile > +++ b/arch/x86/kernel/cpu/Makefile > @@ -38,7 +38,7 @@ obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_p6.o > perf_e