Skip to content

Commit

Permalink
[PATCH] i386: Don't use the TSC in sched_clock if unstable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guillaume Chazarain authored and Andi Kleen committed Mar 16, 2007
1 parent 43999d9 commit 28f36f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/i386/kernel/tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ unsigned long long sched_clock(void)
/*
* Fall back to jiffies if there's no TSC available:
*/
if (unlikely(tsc_disable))
if (tsc_unstable || unlikely(tsc_disable))
/* No locking but a rare wrong value is not a big deal: */
return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);

Expand Down

0 comments on commit 28f36f8

Please sign in to comment.