From: john stultz <johnstul@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: malattia@linux.it, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] Time: Delay clocksource selection until later in boot
Date: Tue, 17 Jan 2006 11:16:05 -0800 [thread overview]
Message-ID: <1137525365.27699.97.camel@cog.beaverton.ibm.com> (raw)
Delay installing new clocksources until later in boot. This avoids some
of the clocksource churn that can occur at boot, possibly allowing the
system to run for a brief time with a bad clocksource.
This patch resolves the boot time stalls seen by Mattia Dongili.
thanks
-john
Signed-off-by: John Stultz <johnstul@us.ibm.com>
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -51,13 +51,27 @@ static LIST_HEAD(clocksource_list);
static DEFINE_SPINLOCK(clocksource_lock);
static char override_name[32];
+static int finished_booting;
+
+/* clocksource_done_booting - Called near the end of bootup
+ *
+ * Hack to avoid lots of clocksource churn at boot time
+ */
+static int clocksource_done_booting(void)
+{
+ finished_booting = 1;
+ return 0;
+}
+
+late_initcall(clocksource_done_booting);
+
/**
* get_next_clocksource - Returns the selected clocksource
*/
struct clocksource *get_next_clocksource(void)
{
spin_lock(&clocksource_lock);
- if (next_clocksource) {
+ if (next_clocksource && finished_booting) {
curr_clocksource = next_clocksource;
next_clocksource = NULL;
}
next reply other threads:[~2006-01-17 19:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-17 19:16 john stultz [this message]
2006-01-17 23:43 ` Andrew Morton
2006-01-17 23:47 ` john stultz
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=1137525365.27699.97.camel@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=malattia@linux.it \
/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®