From: Thomas Schlicter

sched_clock() will try to use the TSC even if the system is not using the TSC
as a time source.  It causes bad scheduling decisions and poor interactivity.

The problem was exhibited by the patch which uses ACPI PM as a time source,
but could also happen if the system is using the PIT.


 25-akpm/arch/i386/kernel/timers/timer_tsc.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/i386/kernel/timers/timer_tsc.c~ia32-sched_clock-fix arch/i386/kernel/timers/timer_tsc.c
--- 25/arch/i386/kernel/timers/timer_tsc.c~ia32-sched_clock-fix	Tue Nov 18 13:00:59 2003
+++ 25-akpm/arch/i386/kernel/timers/timer_tsc.c	Tue Nov 18 13:01:09 2003
@@ -139,7 +139,7 @@ unsigned long long sched_clock(void)
 	 * synchronized across all CPUs.
 	 */
 #ifndef CONFIG_NUMA
-	if (unlikely(!cpu_has_tsc))
+	if (!use_tsc)
 #endif
 		return (unsigned long long)jiffies * (1000000000 / HZ);
 

_