From d0821d8bd38158e5c93026ff25473e0b47511864 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 18 Nov 2003 08:14:51 -0800 Subject: [PATCH] [PATCH] sched_clock() fix 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. --- arch/i386/kernel/timers/timer_tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index e87ec7a48edf2..be9a2a533dd1e 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c @@ -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); -- 2.53.0