linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Time: Delay clocksource selection until later in boot
@ 2006-01-17 19:16 john stultz
  2006-01-17 23:43 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: john stultz @ 2006-01-17 19:16 UTC (permalink / raw)
  To: Andrew Morton; +Cc: malattia, lkml

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



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

* Re: [PATCH] Time: Delay clocksource selection until later in boot
  2006-01-17 19:16 [PATCH] Time: Delay clocksource selection until later in boot john stultz
@ 2006-01-17 23:43 ` Andrew Morton
  2006-01-17 23:47   ` john stultz
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2006-01-17 23:43 UTC (permalink / raw)
  To: john stultz; +Cc: malattia, linux-kernel

john stultz <johnstul@us.ibm.com> wrote:
>
> 	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.
> 

Except he now thinks that it doesn't.  Do you think the patch is good anyway?

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

* Re: [PATCH] Time: Delay clocksource selection until later in boot
  2006-01-17 23:43 ` Andrew Morton
@ 2006-01-17 23:47   ` john stultz
  0 siblings, 0 replies; 3+ messages in thread
From: john stultz @ 2006-01-17 23:47 UTC (permalink / raw)
  To: Andrew Morton; +Cc: malattia, linux-kernel

On Tue, 2006-01-17 at 15:43 -0800, Andrew Morton wrote:
> john stultz <johnstul@us.ibm.com> wrote:
> >
> > 	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.
> > 
> 
> Except he now thinks that it doesn't.  Do you think the patch is good anyway?

I actually do still think its a good idea to avoid the bootup
clocksource churn. I've still got a few ideas for further improving the
TSC registration so I'll probably have another patch or two to try later
this week.

thanks
-john





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

end of thread, other threads:[~2006-01-17 23:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-17 19:16 [PATCH] Time: Delay clocksource selection until later in boot john stultz
2006-01-17 23:43 ` Andrew Morton
2006-01-17 23:47   ` john stultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).