lkml.org 
[lkml]   [2012]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/34] perf, x86: Avoid checkpointed counters causing excessive TSX aborts
On Tue, Oct 23, 2012 at 03:03:43PM +0200, Peter Zijlstra wrote:
> On Thu, 2012-10-18 at 16:19 -0700, Andi Kleen wrote:
> > @@ -1079,6 +1079,17 @@ static void intel_pmu_enable_event(struct perf_event *event)
> > int intel_pmu_save_and_restart(struct perf_event *event)
> > {
> > x86_perf_event_update(event);
> > + /*
> > + * For a checkpointed counter always reset back to 0. This
> > + * avoids a situation where the counter overflows, aborts the
> > + * transaction and is then set back to shortly before the
> > + * overflow, and overflows and aborts again.
> > + */
> > + if (event->hw.config & HSW_INTX_CHECKPOINTED) {
>
> Would an unlikely() make sense there? Most events won't have this set.

Ok.

-Andi


\
 
 \ /
  Last update: 2012-10-23 16:01    [W:0.214 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site