Re: [tip:perf/urgent] perf, x86: Catch spurious interrupts afterdisabling counters

From: Robert Richter
Date: Wed Sep 29 2010 - 12:31:33 EST


On 29.09.10 11:33:07, Stephane Eranian wrote:
> There is something else bothering me with cpuc->running.
>
> It is not reset outside of the interrupt handler. So what if
> event scheduling shuffles things around and an event is
> moved somewhere else. Don't you need to clear the
> cpuc->running[idx] for the old counter index?

We can clear it only in the NMI handler, because the next NMI after
stopping a counter must mark the counter as handled. This may cause
some false positives, but it is the best we can get.

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center

--
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/