[patch] prefer TSC over PM Timer

From: dean gaudet
Date: Mon Nov 15 2004 - 19:24:34 EST

i've heard other folks have independently run into this problem -- in fact
i see the most recent fc2 kernels already do this. i'd like this to be
accepted into the main kernel though.

the x86 PM Timer is an order of magnitude slower than the TSC for
gettimeofday calls. i'm seeing 8%+ of the time spent doing gettimeofday
in someworkloads... and apparently kernel.org was seeing 80% of its time
go to gettimeofday during the fc3-release overload. PM timer is also less
accurate than TSC.

i can see a vague argument around cpufreq / tsc troubles, but i'm having a
hell of a time getting a centrino box to show any TSC troubles even while
i induce workloads that cause cpufreq to bounce the frequency around.
maybe someone could give an example of it failing...

note: when timer_tsc discovers inaccuracy after boot it falls back to
timer_pit ... timer_pit is twice as expensive as timer_pm, and it'd be
cool if timer_tsc could fall back to timer_pm... but by that point in time
all the __init stuff is gone, so i can't see how to init timer_pm. this
would be a more ideal solution.


Signed-off-by: dean gaudet <dean@xxxxxxxxxx>

--- linux-2.6.10-rc2/arch/i386/kernel/timers/timer.c.orig 2004-11-15 23:28:30.000000000 -0800
+++ linux-2.6.10-rc2/arch/i386/kernel/timers/timer.c 2004-11-15 23:29:07.000000000 -0800
@@ -19,10 +19,10 @@
+ &timer_tsc_init,
- &timer_tsc_init,
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/