Re: [PATCH] perf, x86: Allow setting period 1

From: Andi Kleen
Date: Thu Mar 28 2013 - 11:44:46 EST


Andi Kleen <andi@xxxxxxxxxxxxxx> writes:

> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxxxxx -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/