Re: [RFC PATCH] Multi-threaded device probing

Greg KH
2006-07-26T07:36:00Z

On Wed, Jul 26, 2006 at 02:34:09AM +0200, Stefan Richter wrote:
> 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.
> ...
>
> Just FYI:
>
> 1.) SCSI:
> There is a patch circulating at linux-scsi which adds parallelized bus
> scanning to the SCSI subsystem. I believe this cannot be built upon
> parallelization by driver core. But I am not too familiar with the
> subsystem facilities which this patch expands on. The patch is from
> Matthew Wilcox, titled "Asynchronous target discovery".
> http://marc.theaimsgroup.com/?t=115349750400001

I don't know enough about SCSI to say if this driver core patch will
help them out or not. At first glance it does, but the device order
gets all messed up from what users are traditionally used to, so perhaps
the scsi core will just have to stick with their own changes.

> 2.) IEEE 1394:
> There was brief preliminary discussion of parallelized probing for the
> ieee1394 subsystem at linux1394-devel. Using driver core's
> parallelization would achieve about 1/3rd of what would be desirable.
> Background: After each bus reset, the 1394 core (nodemgr) has to
> download part or all of the configuration ROM of attached devices to
> determine their identity and capabilities. After that, either a protocol
> driver probe (generic device hook), a protocol driver remove or suspend
> routine (generic device hook), or a protocol driver update routine
> (extra 1394 subsystem hook) is executed; depending on whether nodes were
> added, removed, or in-use nodes were rediscovered. --- I.e. we better
> have these subthreads provided by ieee1394/nodemgr itself.

That's fine, nothing in this patch precludes you from doing that at all.
I'm not thinking that all busses will enable this, rather that some
will, and some will rely on their bus code to do threaded stuff if it
can.

thanks,

greg k-h