[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130129010029.GY30577@one.firstfloor.org>
Date: Tue, 29 Jan 2013 02:00:29 +0100
From: Andi Kleen <andi@...stfloor.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: Andi Kleen <andi@...stfloor.org>, Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [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@...ux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists