diff options
author | Guillaume Chazarain <guichaz@gmail.com> | 2007-03-16 16:07:36 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-03-16 16:07:36 -0400 |
commit | 28f36f8fbf5f3718f7095055c1911a67d200dda1 (patch) | |
tree | 347c291d0fc9b9b6bb6ce972563a98b39af2fc51 | |
parent | 43999d9e4e3133bfe0a55589037796386b012a68 (diff) |
[PATCH] i386: Don't use the TSC in sched_clock if unstable
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f9690982b8c2f9a2c65acdc113e758ec356676a3
caused a regression by letting sched_clock use the TSC even when cpufreq
disabled it. This caused scheduling weirdnesses.
Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r-- | arch/i386/kernel/tsc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c index 602660df455c..0e65f7ab63a2 100644 --- a/arch/i386/kernel/tsc.c +++ b/arch/i386/kernel/tsc.c | |||
@@ -105,7 +105,7 @@ unsigned long long sched_clock(void) | |||
105 | /* | 105 | /* |
106 | * Fall back to jiffies if there's no TSC available: | 106 | * Fall back to jiffies if there's no TSC available: |
107 | */ | 107 | */ |
108 | if (unlikely(tsc_disable)) | 108 | if (tsc_unstable || unlikely(tsc_disable)) |
109 | /* No locking but a rare wrong value is not a big deal: */ | 109 | /* No locking but a rare wrong value is not a big deal: */ |
110 | return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); | 110 | return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); |
111 | 111 | ||