public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: PATCH: Multiprobe sanitizer
Date: Thu, 17 Aug 2006 04:58:53 -0700	[thread overview]
Message-ID: <20060817115853.GB6843@kroah.com> (raw)
In-Reply-To: <1155774994.15195.12.camel@localhost.localdomain>

On Thu, Aug 17, 2006 at 01:36:33AM +0100, Alan Cox wrote:
> Ar Mer, 2006-08-16 am 15:26 -0700, ysgrifennodd Greg KH:
> > What would this help out with?  Would the PCI layer (for example) handle
> > this "notify the core that it can continue" type logic?  Or would the
> > individual drivers need to be able to control it?
> > 
> > I'm guessing that you are thinking of this in relation to the disk
> > drivers, have you found cases where something like this is necessary due
> > to hardware constraints?
> 
> Actually it occurs everywhere because what happens is
> 
> 	PCI enumerates in bus order
> 	Threads *usually* run in bus order
> 
> so every n'th boot your devices re-order themselves out of bus order,
> and eth1 becomes eth0 for the day.

As per the help information for this option, this will happen.  Happens
all the time on my machines already, that's why I use a tool that always
names the devices in the proper way (like almost all distros do these
days.)

It's a trade off, if you want a parallel device probe, you have to stop
relying on the kernel name for devices and use something that is not
going to change.  Like PCI device ids, (well, ok, they change all the time
on pci hotplug boxes and bios upgrades) or MAC addresses, or serial
numbers, or file system labels.

> If you have a "ok now continue scanning" API then we can do
> 
> 	Grab resources
> 	Register driver
> 	Go parallel
> 	[Slow stuff]

It seems that for some types of devices, the "Grab resources" portion
takes the longest (SCSI...).  And the "register driver" stuff already
happens later in the process, in an async manner today.  So that's not
going to work :(

> I was thinking if we set multithread = 2 (and define some constants)
> then the core code would do
> 
> 	if (multithread == WAIT)
> 		down(&drv->wait);
> 
> 
> and we'd have
> 
> 	pci_driver_continue_enumerating(struct pci_driver *drv) {
> 		up(&drv->wait);
> 	}

Yeah, I played with limiting the number of outstanding threads in a
manner like this, but couldn't come up with a real reason to limit it.

If you can think of a place in the PCI core that we could block on in
this manner, please let me know.

thanks,

greg k-h

      parent reply	other threads:[~2006-08-17 12:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-16 16:42 PATCH: Multiprobe sanitizer Alan Cox
2006-08-16 22:26 ` Greg KH
2006-08-17  0:36   ` Alan Cox
2006-08-17  6:57     ` Benjamin Herrenschmidt
2006-08-17  7:00       ` Arjan van de Ven
2006-08-17  8:41       ` Alan Cox
2006-08-17  9:24         ` Benjamin Herrenschmidt
2006-08-17 12:00           ` Greg KH
2006-08-17 12:12             ` Benjamin Herrenschmidt
2006-08-17 12:22               ` Greg KH
2006-08-17 12:37                 ` Benjamin Herrenschmidt
2006-08-17 13:04                   ` Arjan van de Ven
2006-08-17 13:10                     ` Benjamin Herrenschmidt
2006-08-17 15:44                     ` Greg KH
2006-08-17 14:43                 ` Olaf Hering
2006-08-17 15:42                   ` Greg KH
2006-08-17 11:58     ` Greg KH [this message]

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=20060817115853.GB6843@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox