All of lore.kernel.org
 help / color / mirror / Atom feed
* Use of parallel init threads for slow devices start ups?
@ 2007-02-19 17:50 Woodruff, Richard
  2007-02-19 22:26 ` Pavel Machek
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Woodruff, Richard @ 2007-02-19 17:50 UTC (permalink / raw)
  To: pm list; +Cc: Reddy, Teerth

Hi,

While doing some startup time profiling it is noticed we spend a lot of
time in the idle loop.  As there is only one thread initializing devices
there is no one to schedule during device start ups.  So for example an
external sensor might need a couple seconds to power up.

Does anyone want to give an opinion on forking off a parallel thread to
handle slower devices which are not dependent?

The init could be deferred but you still need to eat the wait time.  Its
nicest if a few devices can be doing their waiting at the same time.

This is true for boot time and for device resume time...

Regards,
Richard W.

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

* Re: Use of parallel init threads for slow devices start ups?
  2007-02-19 17:50 Use of parallel init threads for slow devices start ups? Woodruff, Richard
@ 2007-02-19 22:26 ` Pavel Machek
  2007-02-19 23:52 ` Andi Kleen
  2007-02-20  0:48 ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2007-02-19 22:26 UTC (permalink / raw)
  To: Woodruff, Richard; +Cc: Reddy, Teerth, pm list

Hi!

> While doing some startup time profiling it is noticed we spend a lot of
> time in the idle loop.  As there is only one thread initializing devices
> there is no one to schedule during device start ups.  So for example an
> external sensor might need a couple seconds to power up.
> 
> Does anyone want to give an opinion on forking off a parallel thread to
> handle slower devices which are not dependent?

GregKH had a patch to do that for PCI and USB, but it was broken. You
are welcome to ressurect them and fix them...

> This is true for boot time and for device resume time...

Lets get it right for boot, first.
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: Use of parallel init threads for slow devices start ups?
  2007-02-19 17:50 Use of parallel init threads for slow devices start ups? Woodruff, Richard
  2007-02-19 22:26 ` Pavel Machek
@ 2007-02-19 23:52 ` Andi Kleen
  2007-02-20  0:48 ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2007-02-19 23:52 UTC (permalink / raw)
  To: Woodruff, Richard; +Cc: Reddy, Teerth, pm list

"Woodruff, Richard" <r-woodruff2@ti.com> writes:
> 
> Does anyone want to give an opinion on forking off a parallel thread to
> handle slower devices which are not dependent?

Recent kernels have CONFIG_PCI_MULTITHREAD_PROBE. But it's considered
highly experimental for now because of unknown races. 
I guess a lot of testing and fixing any bugs you hit would be welcome.

-Andi

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

* Re: Use of parallel init threads for slow devices start ups?
  2007-02-19 17:50 Use of parallel init threads for slow devices start ups? Woodruff, Richard
  2007-02-19 22:26 ` Pavel Machek
  2007-02-19 23:52 ` Andi Kleen
@ 2007-02-20  0:48 ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2007-02-20  0:48 UTC (permalink / raw)
  To: Woodruff, Richard; +Cc: Reddy, Teerth, pm list

On Mon, Feb 19, 2007 at 11:50:38AM -0600, Woodruff, Richard wrote:
> Hi,
> 
> While doing some startup time profiling it is noticed we spend a lot of
> time in the idle loop.  As there is only one thread initializing devices
> there is no one to schedule during device start ups.  So for example an
> external sensor might need a couple seconds to power up.
> 
> Does anyone want to give an opinion on forking off a parallel thread to
> handle slower devices which are not dependent?

I've added options to the kernel to do just this, and in the end, it
wasn't really worth it.  Yes, it does save some time for some machines,
but the number of errors it added was quite large as most drivers and
bus subsystems are not ready to handle such multi-threaded probing.

But you can try it out yourself if you want, look at the patches in the
previous few kernel releases that enable this functionality.

thanks,

greg k-h

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

end of thread, other threads:[~2007-02-20  0:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19 17:50 Use of parallel init threads for slow devices start ups? Woodruff, Richard
2007-02-19 22:26 ` Pavel Machek
2007-02-19 23:52 ` Andi Kleen
2007-02-20  0:48 ` Greg KH

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.