From: "Guillaume Chazarain" <guichaz@gmail.com>
To: "Ingo Molnar" <mingo@elte.hu>, "Andi Kleen" <ak@suse.de>,
linux-kernel@vger.kernel.org
Subject: [1/3] Bugfix: Don't use the TSC in sched_clock if unstable
Date: Sat, 3 Mar 2007 22:41:36 +0100 [thread overview]
Message-ID: <3d8471ca0703031341l1768fe7rccf40712e452ea09@mail.gmail.com> (raw)
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
next reply other threads:[~2007-03-03 21:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-03 21:41 Guillaume Chazarain [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d8471ca0703031341l1768fe7rccf40712e452ea09@mail.gmail.com \
--to=guichaz@gmail.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®