Re: [PATCH] perf, x86: catch spurious interrupts after disablingcounters

From: Peter Zijlstra
Date: Thu Sep 30 2010 - 08:33:57 EST


On Fri, 2010-09-24 at 15:38 +0200, Stephane Eranian wrote:
> > I don't like the approach of disabling all counters in the nmi
> > handler. First, it stops counting and thus may falsify
> > measurement. Second, it introduces much overhead doing a rd-/wrmsrl()
> > for each counter.
> >
> But that's exactly what is going on the Intel side. PMU is stopped on interrupt.
> An argument for this is that you don't necessarily want to monitor across
> the PMU handler, i.e., the overhead you introduce.

Right, its really a question of what you want to measure. I prefer not
to measure the measuring itself, things are hard enough to interpret
already.

Then again, the Intel stuff has a real handy way to disable the whole
PMU, unlike the AMD bits where you need to iterate each counter
individually.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/