Re: [PATCH] Trace idle entry and exit times

From: Andi Kleen
Date: Sat Dec 07 2013 - 00:20:58 EST


On Sat, Dec 07, 2013 at 05:57:32AM +0100, Mike Galbraith wrote:
> On Fri, 2013-12-06 at 16:46 -0800, Andi Kleen wrote:
> > From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> >
> > This patch creates 4 new trace points: one at the beginning of idle,
> > one before entering mwait, one after exiting mwait, and one after
> > finishing the idle code. This is useful to trace down any
> > additional latencies caused by the ever-growing idle code.
> >
> > Idle latencies are a common source of performance problems, so it's
> > important to be able to measure them.
>
> You mean stuff like.. oh, say 60 cores doing zero work every 12ms
> munching ~20% cpu?

Well that one is obvious. I mean more the subtle problems.

BTW the timer problem is fixed on Westmere and later (always running APIC
timer), but yes it's a problem before that. I looked at it some time ago,
but eventually gave up after only fixing low hanging fruit. There are likely
some more tricks that could be done here (see the old patches from back then)

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