Re: [PATCH V6 3/6] perf, x86: large PEBS interrupt threshold

2015-04-16 Thread Peter Zijlstra
On Thu, Apr 09, 2015 at 12:37:43PM -0400, Kan Liang wrote: > + /* > + * When the event is constrained enough we can use a larger > + * threshold and run the event with less frequent PMI. > + */ > + if (0 && /* disable this temporarily */ This is a good hint your patches are

Re: [PATCH V6 3/6] perf, x86: large PEBS interrupt threshold

2015-04-15 Thread Peter Zijlstra
On Wed, Apr 15, 2015 at 06:35:48PM +, Liang, Kan wrote: > > > > > On Thu, Apr 09, 2015 at 12:37:43PM -0400, Kan Liang wrote: > > > @@ -280,8 +280,9 @@ static int alloc_pebs_buffer(int cpu) > > > ds->pebs_absolute_maximum = ds->pebs_buffer_base + > > > max * x86_pmu.pebs_record_siz

RE: [PATCH V6 3/6] perf, x86: large PEBS interrupt threshold

2015-04-15 Thread Liang, Kan
> > On Thu, Apr 09, 2015 at 12:37:43PM -0400, Kan Liang wrote: > > @@ -280,8 +280,9 @@ static int alloc_pebs_buffer(int cpu) > > ds->pebs_absolute_maximum = ds->pebs_buffer_base + > > max * x86_pmu.pebs_record_size; > > > > - ds->pebs_interrupt_threshold = ds->pebs_buffer_base +

Re: [PATCH V6 3/6] perf, x86: large PEBS interrupt threshold

2015-04-15 Thread Peter Zijlstra
On Wed, Apr 15, 2015 at 05:48:39PM +, Liang, Kan wrote: > > > +++ b/arch/x86/kernel/cpu/perf_event_intel.c > > > @@ -2306,7 +2306,9 @@ static int intel_pmu_hw_config(struct perf_event > > > *event) > > > return ret; > > > > > > if (event->attr.precise_ip) { > > > - if (!eve

Re: [PATCH V6 3/6] perf, x86: large PEBS interrupt threshold

2015-04-15 Thread Peter Zijlstra
On Thu, Apr 09, 2015 at 12:37:43PM -0400, Kan Liang wrote: > @@ -280,8 +280,9 @@ static int alloc_pebs_buffer(int cpu) > ds->pebs_absolute_maximum = ds->pebs_buffer_base + > max * x86_pmu.pebs_record_size; > > - ds->pebs_interrupt_threshold = ds->pebs_buffer_base + > -

RE: [PATCH V6 3/6] perf, x86: large PEBS interrupt threshold

2015-04-15 Thread Liang, Kan
> -Original Message- > From: Peter Zijlstra [mailto:pet...@infradead.org] > Sent: Wednesday, April 15, 2015 1:15 PM > To: Liang, Kan > Cc: linux-kernel@vger.kernel.org; mi...@kernel.org; > a...@infradead.org; eran...@google.com; a...@firstfloor.org > Subject: Re: [PA

Re: [PATCH V6 3/6] perf, x86: large PEBS interrupt threshold

2015-04-15 Thread Peter Zijlstra
On Thu, Apr 09, 2015 at 12:37:43PM -0400, Kan Liang wrote: > This patch also make AUTO_RELOAD conditional on large PEBS. Auto reload > only be enabled when fix period and large PEBS. What's a large PEBS? > +++ b/arch/x86/kernel/cpu/perf_event.h > @@ -87,6 +87,17 @@ struct amd_nb { > #define MAX_