Re: [PATCH 10/17] 2.6.17.1 perfmon2 patch for review: PMU context switch

From: Andi Kleen
Date: Fri Jun 30 2006 - 14:40:56 EST


On Friday 30 June 2006 20:33, Chuck Ebbert wrote:
> In-Reply-To: <200606301541.22928.ak@xxxxxxx>
>
> On Fri, 30 Jun 2006 15:41:22 +0200, Andi Kleen wrote:
>
> > > So why do we need care about context switch in cpu-wide mode?
> > > It is because we support a mode where the idle thread is excluded
> > > from cpu-wide monitoring. This is very useful to distinguish
> > > 'useful kernel work' from 'idle'.
> >
> > I don't quite see the point because on x86 the PMU doesn't run
> > during C states anyways. So you get idle excluded automatically.
>
> Looks like it does run:

I'm pretty sure it doesn't. You can see it by watching
the frequency of the perfctr mode NMI watchdog in /proc/interrupts
under different loads.

When the system is idle the frequency goes down and increases
when the system is busy. I also got confirmation of this behaviour
from both Intel and AMD. C states > 0 are not supposed to run
the performance counters.

Are you sure you didn't boot with poll=idle? Otherwise something must
be wrong with your measurements.

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