All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Greg KH <gregkh@suse.de>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com
Subject: Re: [RFC PATCH] Multi-threaded device probing
Date: Tue, 25 Jul 2006 14:27:10 -0700	[thread overview]
Message-ID: <44C68CAE.6090108@zytor.com> (raw)
In-Reply-To: <20060725203028.GA1270@kroah.com>

Greg KH wrote:
> During the kernel summit, I was reminded by the wish by some people to
> do device probing in parallel, so I created the following patch.  It
> offers up the ability for the driver core to create a new thread for
> every driver<->device probe call.  To enable this, the driver needs to
> have the multithread_probe flag set to 1, otherwise the "traditional"
> sequencial probe happens.
> 
> Note that this patch does not actually enable the threaded probe for any
> busses, as that's very dangerous at this point in time, without the
> different bus authors trying it out and verifying that it does work
> properly.
> 
> I did enable this for both USB and PCI and shaved .4 seconds off of the
> boot time of my tiny little single processor laptop.  The savings of my
> 4-way workstation is much greater, but things start to happen so fast we
> miss the root disk, as init starts before the disks are finished being
> initialized.  I have some hacks to work around this right now, but I'll
> hold off on posting them before I make sure they work properly (breaking
> booting of people's machines isn't the best way to get them to accept
> new features...)
> 
> Anyway, have fun playing around with this if you want, I'll be adding
> this to the next -mm, but you will have to enable the bit on your own if
> you want to see any speedups.
> 

This is very interesting in the context of a few discussions I had at 
OLS about klibc; there are people who would like initramfs to be 
accessible *before* device probing is done, so that drivers can access 
firmware and possible hotplug from the initramfs during the driver 
initialization.  We could even invoke (k)init at this point; this would 
require a) having a system call or device that would allow kinit to 
block until device probing was complete, and b) a way to handle 
/dev/console -- there are several different ways to deal with it; it's 
mostly a matter of picking a good one.

Note that we don't need device drivers for userspace -- we only need VM, 
VFS and scheduler initialization.

Multithreaded device initialization is a great idea, especially since 
many devices require delays during initialization, sometimes on the 
order of seconds.

	-hpa



  parent reply	other threads:[~2006-07-25 21:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-25 20:30 [RFC PATCH] Multi-threaded device probing Greg KH
2006-07-25 21:09 ` Alexey Dobriyan
2006-07-25 21:27   ` Greg KH
2006-07-25 21:27 ` H. Peter Anvin [this message]
2006-07-25 22:00 ` Dmitry Torokhov
2006-07-26  7:28   ` Greg KH
2006-07-25 22:15 ` James Courtier-Dutton
2006-07-26  0:08   ` Stefan Richter
2006-07-26  7:27     ` Greg KH
2006-07-26  7:24   ` Greg KH
2006-07-25 22:57 ` Keshavamurthy Anil S
2006-07-26  7:22   ` Greg KH
2006-07-26  0:34 ` Stefan Richter
2006-07-26  7:31   ` Greg KH
2006-07-26 11:29     ` Matthew Wilcox
2006-07-26 16:16       ` Greg KH
2006-07-26 16:42         ` Matthew Wilcox
2006-07-26 16:46           ` Greg KH
2006-07-27  0:02 ` Arnd Bergmann
2006-07-27  0:20   ` Greg KH

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=44C68CAE.6090108@zytor.com \
    --to=hpa@zytor.com \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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 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.