public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] fix jiffies clocksource inittime
@ 2007-04-04 19:50 john stultz
  2007-04-04 20:43 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: john stultz @ 2007-04-04 19:50 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml, Thomas Gleixner, Ingo Molnar, Andi Kleen

Andrew,
	In debugging a problem w/ the -rt tree, I noticed that on systems that
mark the tsc as unstable before it is registered, the TSC would still be
selected and used for a short period of time. Digging in it looks to be
a result of the mix of the clocksource list changes and my clocksource
initialization changes.

With the -rt tree, using a bad TSC, even for a short period of time can
results in a hang at boot. I was not able to reproduce this hang w/
mainline, but I'm not completely certain that someone won't trip on it.

This patch resolves the issue by initializing the jiffies clocksource
earlier so a bad TSC won't get selected just because nothing else is yet
registered.

thanks
-john

Signed-off-by: John Stultz <johnstul@us.ibm.com>

diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index 3be8da8..4c256fd 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -69,4 +69,4 @@ static int __init init_jiffies_clocksour
 	return clocksource_register(&clocksource_jiffies);
 }
 
-module_init(init_jiffies_clocksource);
+core_initcall(init_jiffies_clocksource);



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

* Re: [PATCH -mm] fix jiffies clocksource inittime
  2007-04-04 19:50 [PATCH -mm] fix jiffies clocksource inittime john stultz
@ 2007-04-04 20:43 ` Andrew Morton
  2007-04-04 20:46   ` Thomas Gleixner
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrew Morton @ 2007-04-04 20:43 UTC (permalink / raw)
  To: john stultz; +Cc: lkml, Thomas Gleixner, Ingo Molnar, Andi Kleen

On Wed, 04 Apr 2007 12:50:15 -0700
john stultz <johnstul@us.ibm.com> wrote:

> 	In debugging a problem w/ the -rt tree, I noticed that on systems that
> mark the tsc as unstable before it is registered, the TSC would still be
> selected and used for a short period of time. Digging in it looks to be
> a result of the mix of the clocksource list changes and my clocksource
> initialization changes.
> 
> With the -rt tree, using a bad TSC, even for a short period of time can
> results in a hang at boot. I was not able to reproduce this hang w/
> mainline, but I'm not completely certain that someone won't trip on it.
> 
> This patch resolves the issue by initializing the jiffies clocksource
> earlier so a bad TSC won't get selected just because nothing else is yet
> registered.
> 
> thanks
> -john
> 
> Signed-off-by: John Stultz <johnstul@us.ibm.com>
> 
> diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
> index 3be8da8..4c256fd 100644
> --- a/kernel/time/jiffies.c
> +++ b/kernel/time/jiffies.c
> @@ -69,4 +69,4 @@ static int __init init_jiffies_clocksour
>  	return clocksource_register(&clocksource_jiffies);
>  }
>  
> -module_init(init_jiffies_clocksource);
> +core_initcall(init_jiffies_clocksource);

Do you think this is needed in 2.6.21?

If so: worrisome.  Startup ordering issues are fragile and tricky.  Time
management is fragile and tricky.  The combination of the two doesn't get
any better ;)

An option would be to test it in 2.6.22-rcX for a while, then backport to
2.6.21.x.



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

* Re: [PATCH -mm] fix jiffies clocksource inittime
  2007-04-04 20:43 ` Andrew Morton
@ 2007-04-04 20:46   ` Thomas Gleixner
  2007-04-04 20:53   ` john stultz
  2007-04-04 21:23   ` Ingo Molnar
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Gleixner @ 2007-04-04 20:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: john stultz, lkml, Ingo Molnar, Andi Kleen

On Wed, 2007-04-04 at 13:43 -0700, Andrew Morton wrote:
> >  
> > -module_init(init_jiffies_clocksource);
> > +core_initcall(init_jiffies_clocksource);
> 
> Do you think this is needed in 2.6.21?

Yes, please.

> If so: worrisome.  Startup ordering issues are fragile and tricky.  Time
> management is fragile and tricky.  The combination of the two doesn't get
> any better ;)
> 
> An option would be to test it in 2.6.22-rcX for a while, then backport to
> 2.6.21.x.

The jiffies clocksource is completely uncritical and it's less worrisome
than having the TSC early as the time reference.

	tglx



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

* Re: [PATCH -mm] fix jiffies clocksource inittime
  2007-04-04 20:43 ` Andrew Morton
  2007-04-04 20:46   ` Thomas Gleixner
@ 2007-04-04 20:53   ` john stultz
  2007-04-04 21:04     ` Andrew Morton
  2007-04-04 21:23   ` Ingo Molnar
  2 siblings, 1 reply; 7+ messages in thread
From: john stultz @ 2007-04-04 20:53 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml, Thomas Gleixner, Ingo Molnar, Andi Kleen

On Wed, 2007-04-04 at 13:43 -0700, Andrew Morton wrote:
> On Wed, 04 Apr 2007 12:50:15 -0700
> john stultz <johnstul@us.ibm.com> wrote:
> 
> > 	In debugging a problem w/ the -rt tree, I noticed that on systems that
> > mark the tsc as unstable before it is registered, the TSC would still be
> > selected and used for a short period of time. Digging in it looks to be
> > a result of the mix of the clocksource list changes and my clocksource
> > initialization changes.
> > 
> > With the -rt tree, using a bad TSC, even for a short period of time can
> > results in a hang at boot. I was not able to reproduce this hang w/
> > mainline, but I'm not completely certain that someone won't trip on it.
> > 
> > This patch resolves the issue by initializing the jiffies clocksource
> > earlier so a bad TSC won't get selected just because nothing else is yet
> > registered.
> > 
> > thanks
> > -john
> > 
> > Signed-off-by: John Stultz <johnstul@us.ibm.com>
> > 
> > diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
> > index 3be8da8..4c256fd 100644
> > --- a/kernel/time/jiffies.c
> > +++ b/kernel/time/jiffies.c
> > @@ -69,4 +69,4 @@ static int __init init_jiffies_clocksour
> >  	return clocksource_register(&clocksource_jiffies);
> >  }
> >  
> > -module_init(init_jiffies_clocksource);
> > +core_initcall(init_jiffies_clocksource);
> 
> Do you think this is needed in 2.6.21?
> 
> If so: worrisome.  Startup ordering issues are fragile and tricky.  Time
> management is fragile and tricky.  The combination of the two doesn't get
> any better ;)

Its likely low-risk, however I'm pretty cautious this close to release.

> An option would be to test it in 2.6.22-rcX for a while, then backport to
> 2.6.21.x.

I'm fine with this (also getting it into the next -mm would help). But
I'd defer to others with stronger opinions.

thanks
-john


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

* Re: [PATCH -mm] fix jiffies clocksource inittime
  2007-04-04 20:53   ` john stultz
@ 2007-04-04 21:04     ` Andrew Morton
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2007-04-04 21:04 UTC (permalink / raw)
  To: john stultz; +Cc: lkml, Thomas Gleixner, Ingo Molnar, Andi Kleen

On Wed, 04 Apr 2007 13:53:47 -0700
john stultz <johnstul@us.ibm.com> wrote:

> > An option would be to test it in 2.6.22-rcX for a while, then backport to
> > 2.6.21.x.
> 
> I'm fine with this (also getting it into the next -mm would help). But
> I'd defer to others with stronger opinions.

No, I wouldn't wait around for -mm testing in a case like this.

Generally, if we plan on getting a patch into 2.6.x this late in the cycle,
I will slam it in asap so it gets as much testing as possible.

Oh well, fingers crossed - I'll add it to today's batch.

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

* Re: [PATCH -mm] fix jiffies clocksource inittime
  2007-04-04 20:43 ` Andrew Morton
  2007-04-04 20:46   ` Thomas Gleixner
  2007-04-04 20:53   ` john stultz
@ 2007-04-04 21:23   ` Ingo Molnar
  2007-04-04 21:32     ` Andrew Morton
  2 siblings, 1 reply; 7+ messages in thread
From: Ingo Molnar @ 2007-04-04 21:23 UTC (permalink / raw)
  To: Andrew Morton; +Cc: john stultz, lkml, Thomas Gleixner, Andi Kleen


* Andrew Morton <akpm@linux-foundation.org> wrote:

> If so: worrisome.  Startup ordering issues are fragile and tricky.  
> Time management is fragile and tricky.  The combination of the two 
> doesn't get any better ;)
> 
> An option would be to test it in 2.6.22-rcX for a while, then backport 
> to 2.6.21.x.

is the v2.6.21 release so close? From all i can see Adrian Bunk still 
has a very sizable regressions list, which necessiate a couple of weeks 
to track down. And the delta since -rc5 is pretty large too, 
necessiating an -rc6.

	Ingo

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

* Re: [PATCH -mm] fix jiffies clocksource inittime
  2007-04-04 21:23   ` Ingo Molnar
@ 2007-04-04 21:32     ` Andrew Morton
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2007-04-04 21:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: john stultz, lkml, Thomas Gleixner, Andi Kleen

On Wed, 4 Apr 2007 23:23:24 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Andrew Morton <akpm@linux-foundation.org> wrote:
> 
> > If so: worrisome.  Startup ordering issues are fragile and tricky.  
> > Time management is fragile and tricky.  The combination of the two 
> > doesn't get any better ;)
> > 
> > An option would be to test it in 2.6.22-rcX for a while, then backport 
> > to 2.6.21.x.
> 
> is the v2.6.21 release so close?

It's the closest it's ever been!

> From all i can see Adrian Bunk still 
> has a very sizable regressions list, which necessiate a couple of weeks 
> to track down. And the delta since -rc5 is pretty large too, 
> necessiating an -rc6.
> 

yeah, I wouldn't be surprised to see an rc7.

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

end of thread, other threads:[~2007-04-04 21:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-04 19:50 [PATCH -mm] fix jiffies clocksource inittime john stultz
2007-04-04 20:43 ` Andrew Morton
2007-04-04 20:46   ` Thomas Gleixner
2007-04-04 20:53   ` john stultz
2007-04-04 21:04     ` Andrew Morton
2007-04-04 21:23   ` Ingo Molnar
2007-04-04 21:32     ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox