lkml.org 
[lkml]   [2015]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] perf, x86: Add INST_RETIRED.ALL workarounds

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

> From: Andi Kleen <ak@linux.intel.com>
>
> On Broadwell INST_RETIRED.ALL cannot be used with any period
> that doesn't have the lowest 6 bits cleared. And the period
> should not be smaller than 128.

Sloppy changelog: a most basic question is not answered by the
changelog: what happens in practice when the period is set to a
smaller value than 128?

> +/*
> + * Broadwell:
> + * The INST_RETIRED.ALL period always needs to have lowest
> + * 6bits cleared (BDM57). It shall not use a period smaller
> + * than 100 (BDM11). We combine the two to enforce
> + * a min-period of 128.
> + */

Sloppy comment: that's not what we do:

> +static unsigned bdw_limit_period(struct perf_event *event, unsigned left)
> +{
> + if ((event->hw.config & INTEL_ARCH_EVENT_MASK) ==
> + X86_CONFIG(.event=0xc0, .umask=0x01)) {
> + if (left < 128)
> + left = 128;
> + left &= ~0x3fu;
> + }
> + return left;

We enforce a minimum period of 128 and round the requested period to
64.

I think in this case it would be useful to tooling if we updated the
syscall attribute with the real period value that was used, to not
skew tooling output.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-03-23 11:01    [W:0.081 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site