All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf, x86: Allow setting period 1
@ 2013-03-08 23:24 Andi Kleen
  2013-03-28 15:44 ` Andi Kleen
  2013-04-10 12:58 ` Ingo Molnar
  0 siblings, 2 replies; 5+ messages in thread
From: Andi Kleen @ 2013-03-08 23:24 UTC (permalink / raw)
  To: a.p.zijlstra; +Cc: mingo, linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

I had some requests for setting period 1, so that every event of something
is caught.  To my knowledge there is no limit to 1 on Intel hardware.
Just remove the check for minimum 2

If specific CPUs have problems we can black list them.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/kernel/cpu/perf_event.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index bf0f01a..2b394ae 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -946,11 +946,6 @@ int x86_perf_event_set_period(struct perf_event *event)
 		hwc->last_period = period;
 		ret = 1;
 	}
-	/*
-	 * Quirk: certain CPUs dont like it if just 1 hw_event is left:
-	 */
-	if (unlikely(left < 2))
-		left = 2;
 
 	if (left > x86_pmu.max_period)
 		left = x86_pmu.max_period;
-- 
1.7.7.6


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf, x86: Allow setting period 1
  2013-03-08 23:24 [PATCH] perf, x86: Allow setting period 1 Andi Kleen
@ 2013-03-28 15:44 ` Andi Kleen
  2013-04-10 12:58 ` Ingo Molnar
  1 sibling, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2013-03-28 15:44 UTC (permalink / raw)
  To: a.p.zijlstra; +Cc: mingo, linux-kernel, akpm

Andi Kleen <andi@firstfloor.org> writes:

> From: Andi Kleen <ak@linux.intel.com>
>
> I had some requests for setting period 1, so that every event of something
> is caught.  To my knowledge there is no limit to 1 on Intel hardware.
> Just remove the check for minimum 2

Ping! patch is missing review.

>
> If specific CPUs have problems we can black list them.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  arch/x86/kernel/cpu/perf_event.c |    5 -----
>  1 files changed, 0 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
> index bf0f01a..2b394ae 100644
> --- a/arch/x86/kernel/cpu/perf_event.c
> +++ b/arch/x86/kernel/cpu/perf_event.c
> @@ -946,11 +946,6 @@ int x86_perf_event_set_period(struct perf_event *event)
>  		hwc->last_period = period;
>  		ret = 1;
>  	}
> -	/*
> -	 * Quirk: certain CPUs dont like it if just 1 hw_event is left:
> -	 */
> -	if (unlikely(left < 2))
> -		left = 2;
>  
>  	if (left > x86_pmu.max_period)
>  		left = x86_pmu.max_period;

-- 
ak@linux.intel.com -- Speaking for myself only

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf, x86: Allow setting period 1
  2013-03-08 23:24 [PATCH] perf, x86: Allow setting period 1 Andi Kleen
  2013-03-28 15:44 ` Andi Kleen
@ 2013-04-10 12:58 ` Ingo Molnar
  2013-04-10 13:31   ` Andi Kleen
  1 sibling, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2013-04-10 12:58 UTC (permalink / raw)
  To: Andi Kleen; +Cc: a.p.zijlstra, linux-kernel, Andi Kleen


* Andi Kleen <andi@firstfloor.org> wrote:

> From: Andi Kleen <ak@linux.intel.com>
> 
> I had some requests for setting period 1, so that every event of something
> is caught.  To my knowledge there is no limit to 1 on Intel hardware.
> Just remove the check for minimum 2
> 
> If specific CPUs have problems we can black list them.

How have you tested this? The commit that added this quirk mentions very high perf 
load triggering badness unless this quirk is added.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf, x86: Allow setting period 1
  2013-04-10 12:58 ` Ingo Molnar
@ 2013-04-10 13:31   ` Andi Kleen
  2013-04-15 11:26     ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2013-04-10 13:31 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Andi Kleen, a.p.zijlstra, linux-kernel

On Wed, Apr 10, 2013 at 02:58:08PM +0200, Ingo Molnar wrote:
> 
> * Andi Kleen <andi@firstfloor.org> wrote:
> 
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > I had some requests for setting period 1, so that every event of something
> > is caught.  To my knowledge there is no limit to 1 on Intel hardware.
> > Just remove the check for minimum 2
> > 
> > If specific CPUs have problems we can black list them.
> 
> How have you tested this? The commit that added this quirk mentions very high perf 
> load triggering badness unless this quirk is added.

Profiling a couple of simple loads on Westmere and IvyBridge: mostly AIM7 and
kernel builds. You can get throttling of course, but no excessive load.

The original quirk was done long ago before the modern event throttling
infrastructure may have been completely in place, right?

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf, x86: Allow setting period 1
  2013-04-10 13:31   ` Andi Kleen
@ 2013-04-15 11:26     ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2013-04-15 11:26 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Andi Kleen, a.p.zijlstra, linux-kernel


* Andi Kleen <ak@linux.intel.com> wrote:

> On Wed, Apr 10, 2013 at 02:58:08PM +0200, Ingo Molnar wrote:
> > 
> > * Andi Kleen <andi@firstfloor.org> wrote:
> > 
> > > From: Andi Kleen <ak@linux.intel.com>
> > > 
> > > I had some requests for setting period 1, so that every event of something
> > > is caught.  To my knowledge there is no limit to 1 on Intel hardware.
> > > Just remove the check for minimum 2
> > > 
> > > If specific CPUs have problems we can black list them.
> > 
> > How have you tested this? The commit that added this quirk mentions very high perf 
> > load triggering badness unless this quirk is added.
> 
> Profiling a couple of simple loads on Westmere and IvyBridge: mostly AIM7 and 
> kernel builds. You can get throttling of course, but no excessive load.
> 
> The original quirk was done long ago before the modern event throttling 
> infrastructure may have been completely in place, right?

The failure IIRC wasn't about throttling or not, it was about extreme profiling 
(lots of copies of perf record, perf top, perf stat running in parallel, mixed -a 
and workload-local options), eventually resulting in a messed up PMU.

So before we can remove that a similar test should be repeated and made sure that 
no badness happens, on a wide enough range of systems.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-15 11:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-08 23:24 [PATCH] perf, x86: Allow setting period 1 Andi Kleen
2013-03-28 15:44 ` Andi Kleen
2013-04-10 12:58 ` Ingo Molnar
2013-04-10 13:31   ` Andi Kleen
2013-04-15 11:26     ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.