All of lore.kernel.org
 help / color / mirror / Atom feed
* [1/3] Bugfix: Don't use the TSC in sched_clock if unstable
@ 2007-03-03 21:41 Guillaume Chazarain
  2007-03-04 14:37 ` Andi Kleen
  0 siblings, 1 reply; 6+ messages in thread
From: Guillaume Chazarain @ 2007-03-03 21:41 UTC (permalink / raw)
  To: Ingo Molnar, Andi Kleen, linux-kernel

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>
---

diff -r 529142505a77 arch/i386/kernel/tsc.c
--- a/arch/i386/kernel/tsc.c	Fri Mar 02 17:58:52 2007 -0800
+++ b/arch/i386/kernel/tsc.c	Sat Mar 03 21:39:08 2007 +0100
@@ -108,7 +108,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);



-- 
Guillaume

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-05  0:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-03 21:41 [1/3] Bugfix: Don't use the TSC in sched_clock if unstable Guillaume Chazarain
2007-03-04 14:37 ` Andi Kleen
     [not found]   ` <3d8471ca0703040741h4eff73a3wd67d648d52497e34@mail.gmail.com>
2007-03-04 17:25     ` Andi Kleen
2007-03-04 18:33       ` Guillaume Chazarain
2007-03-04 23:28         ` Andi Kleen
2007-03-05  0:15           ` Guillaume Chazarain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.