[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Mar 2016 13:43:12 -0800
From: Andi Kleen <ak@...ux.intel.com>
To: Stephane Eranian <eranian@...gle.com>
Cc: linux-kernel@...r.kernel.org, acme@...hat.com,
peterz@...radead.org, mingo@...e.hu, kan.liang@...el.com,
jolsa@...hat.com, namhyung@...nel.org, adrian.hunter@...el.com
Subject: Re: [PATCH 2/3] perf/x86/pebs: add workaround for broken OVFL status
on HSW
> + /*
> + * There are cases where, even though, the PEBS ovfl bit is set in
> + * GLOBAL_OVF_STATUS, the PEBS events may also have their overflow bits
> + * set for their counters. We must clear them here because they have
> + * been processed as exact samples in the drain_pebs() routine. They
> + * must not be processed again in the for_each_bit_set() loop for
> + * regular samples below.
> + */
> + status &= ~cpuc->pebs_enabled;
> + status &= x86_pmu.intel_ctrl | GLOBAL_STATUS_TRACE_TOPAPMI;
If you just clear the bits here they will not be acked and stay around
forever in GLOBAL_STATUS, which causes other problems.
You need a separate ack_status variable that contains all bits and is always
acked.
-Andi
--
ak@...ux.intel.com -- Speaking for myself only
Powered by blists - more mailing lists