lkml.org 
[lkml]   [2013]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/12] perf, x86: Avoid checkpointed counters causing excessive TSX aborts v3
On Tue, Jan 29, 2013 at 01:30:19AM +0100, Stephane Eranian wrote:
> >> The counter is reinstated to its state before the critical section but
> >> the PMI cannot be
> >> cancelled and there is no state left behind to tell what to do with it.
> >
> > The PMI is effectively spurious, but we use it to set back. Don't know
> > what you mean with "cancel". It already happened of course.
> >
> But when you do this, it seems you making INT_CP events unusable
> for sampling, because you're resetting their value under the cover.
> So what happens when you sample, especially with a fixed period?

Sampling is forbidden for checkpointed events, the setup code
enforces that. It's unlikely to be useful anyways.

The main use case for checkpointing is perf stat -T and related
counting usages.

> >>
> >> > + if (event->attr.sample_period > 0 &&
> >> > + event->attr.sample_period < 0x7fffffff)
> >> > + return -EIO;
> >> > + }
> Explain the 0x7fffffff to me? Is that the max period set by default when you
> just count?

Originally I had just > 0, but then I found that perf stat from the
guest doesn't work anymore because it sets an very high overflow
to accumulate counters.

The 0x7fffffff is a somewhat arbitary threshold to detect this case.


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


\
 
 \ /
  Last update: 2013-01-29 02:41    [W:1.032 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site