Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 01:37:14PM -0700, Reinette Chatre wrote: > On 9/6/2018 1:29 PM, Peter Zijlstra wrote: > > On Thu, Sep 06, 2018 at 01:05:05PM -0700, Reinette Chatre wrote: > >> When I separate the above into the two functions it just becomes either: > >>

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 01:37:14PM -0700, Reinette Chatre wrote: > On 9/6/2018 1:29 PM, Peter Zijlstra wrote: > > On Thu, Sep 06, 2018 at 01:05:05PM -0700, Reinette Chatre wrote: > >> When I separate the above into the two functions it just becomes either: > >>

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Reinette Chatre
On 9/6/2018 1:29 PM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 01:05:05PM -0700, Reinette Chatre wrote: >> When I separate the above into the two functions it just becomes either: >>rdpmcl(l2_hit_pmcnum, l2_hits_after); >>rdpmcl(l2_miss_pmcnum,

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Reinette Chatre
On 9/6/2018 1:29 PM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 01:05:05PM -0700, Reinette Chatre wrote: >> When I separate the above into the two functions it just becomes either: >>rdpmcl(l2_hit_pmcnum, l2_hits_after); >>rdpmcl(l2_miss_pmcnum,

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 01:05:05PM -0700, Reinette Chatre wrote: > When I separate the above into the two functions it just becomes either: >rdpmcl(l2_hit_pmcnum, l2_hits_after); >rdpmcl(l2_miss_pmcnum, l2_miss_after); > or: >

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 01:05:05PM -0700, Reinette Chatre wrote: > When I separate the above into the two functions it just becomes either: >rdpmcl(l2_hit_pmcnum, l2_hits_after); >rdpmcl(l2_miss_pmcnum, l2_miss_after); > or: >

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Reinette Chatre
Hi Peter, On 9/6/2018 12:44 PM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 12:21:59PM -0700, Reinette Chatre wrote: >> If you do have suggestions on how I can improve the implementation while >> maintaining (or improving) the accuracy of the measurements I would >> greatly appreciate it. >

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Reinette Chatre
Hi Peter, On 9/6/2018 12:44 PM, Peter Zijlstra wrote: > On Thu, Sep 06, 2018 at 12:21:59PM -0700, Reinette Chatre wrote: >> If you do have suggestions on how I can improve the implementation while >> maintaining (or improving) the accuracy of the measurements I would >> greatly appreciate it. >

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 12:21:59PM -0700, Reinette Chatre wrote: > If you do have suggestions on how I can improve the implementation while > maintaining (or improving) the accuracy of the measurements I would > greatly appreciate it. You can reduce the code duplication by using __always_inline

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Sep 06, 2018 at 12:21:59PM -0700, Reinette Chatre wrote: > If you do have suggestions on how I can improve the implementation while > maintaining (or improving) the accuracy of the measurements I would > greatly appreciate it. You can reduce the code duplication by using __always_inline

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Reinette Chatre
Hi Peter, On 9/6/2018 7:15 AM, Peter Zijlstra wrote: > On Thu, Aug 16, 2018 at 01:16:08PM -0700, Reinette Chatre wrote: >> +l2_miss_event = perf_event_create_kernel_counter(_miss_attr, >> + plr->cpu, >> +

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Reinette Chatre
Hi Peter, On 9/6/2018 7:15 AM, Peter Zijlstra wrote: > On Thu, Aug 16, 2018 at 01:16:08PM -0700, Reinette Chatre wrote: >> +l2_miss_event = perf_event_create_kernel_counter(_miss_attr, >> + plr->cpu, >> +

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Aug 16, 2018 at 01:16:08PM -0700, Reinette Chatre wrote: > + l2_miss_event = perf_event_create_kernel_counter(_miss_attr, > + plr->cpu, > + NULL, NULL, NULL); > + if

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Aug 16, 2018 at 01:16:08PM -0700, Reinette Chatre wrote: > + l2_miss_event = perf_event_create_kernel_counter(_miss_attr, > + plr->cpu, > + NULL, NULL, NULL); > + if

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Aug 16, 2018 at 01:16:08PM -0700, Reinette Chatre wrote: > + l2_miss_event = perf_event_create_kernel_counter(_miss_attr, > + plr->cpu, > + NULL, NULL, NULL); > + if

Re: [PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-09-06 Thread Peter Zijlstra
On Thu, Aug 16, 2018 at 01:16:08PM -0700, Reinette Chatre wrote: > + l2_miss_event = perf_event_create_kernel_counter(_miss_attr, > + plr->cpu, > + NULL, NULL, NULL); > + if

[PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-08-16 Thread Reinette Chatre
The success of a cache pseudo-locked region is measured using performance monitoring events that are programmed directly at the time the user requests a measurement. Modifying the performance event registers directly is not appropriate since it circumvents the in-kernel perf infrastructure that

[PATCH V2 5/6] x86/intel_rdt: Use perf infrastructure for measurements

2018-08-16 Thread Reinette Chatre
The success of a cache pseudo-locked region is measured using performance monitoring events that are programmed directly at the time the user requests a measurement. Modifying the performance event registers directly is not appropriate since it circumvents the in-kernel perf infrastructure that