Re: x86: improve default idle

From: Andi Kleen
Date: Mon Apr 21 2008 - 11:03:37 EST


Ingo Molnar <mingo@xxxxxxx> writes:
>
> sorry, the changelog should be: if a system uses acpi_pm clocksource but
> default idle method then the overhead of entry/exit measurement is quite
> noticeable in profiles. The measurement is redundant anyway, as in HLT
> sched_clock() is still supposed to work fine. (the worst i know of is a
> slight skew on certain CPUs in HLT)

sched_clock checks for unstable tsc so on all systems which mark
the TSC unstable at boot that will mean fall back to jiffies.

I'm not sure that will really work for them? It will be very imprecise.
Basically most of the time you'll have 0 delta and occasionally
every tick a huge jump.

For 64bit the idea of relying on TSC here is reasonable, but to make the code
behaviour really match your description you would first need another
sched_clock which ignores the normal tsc unstable state (the rewritten
sched_clock for which I posted links a few times recently did that)

On 32bit it would also need to take care of the few older CPUs
(like VIA C6) where TSC doesn't tick in C1.

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