From: Matthew Wilcox <matthew@wil.cx>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-hotplug-devel@lists.sourceforge.net,
Stefan Richter <stefanr@s5r6.in-berlin.de>,
"Alexander E. Patrakov" <patrakov@ums.usu.ru>,
linux-scsi@vger.kernel.org,
Patrick Mansfield <patmans@us.ibm.com>
Subject: Re: Asynchronous scsi scanning, version 9
Date: Sun, 25 Jun 2006 22:46:31 +0000 [thread overview]
Message-ID: <20060625224631.GD1608@parisc-linux.org> (raw)
In-Reply-To: <1151270127.3617.26.camel@mulgrave.il.steeleye.com>
On Sun, Jun 25, 2006 at 04:15:26PM -0500, James Bottomley wrote:
> Actually, the first problem is that SCSI doesn't compile as a module at
> all: late_initcalls are defined to be module_init calls for modules.
> Your adding this to scsi_scan.c now gives us two module_init calls,
> which won't build. I fixed this by putting an #ifdef MODULE around the
> late_initcall.
I think that's a good idea (well, I would, I suggested it to you ;-)
> > There's a potential solution to this. If we add a hook to sys_module_init
> > such that it'll call a specified function before returning, we can make
> > it wait until all scans are done. This way, userspace never sees the
> > asynchronous scanning behaviour. But if you have devices of different
> > types, you won't get the overlapping scans.
>
> How about this solution which works for me with debian on a huge 6 bus
> scsi machine: it introduces a new module scsi_wait_scan.ko whose sole
> job is to wait for the scans to complete in its init function. The
> initrd/initramfs sequence now becomes:
>
> insert all other modules
> modprobe scsi_wait_scan
I think that's a great idea. I wonder about making it always fail
initialisation, since then it can be loaded multiple times without being
unloaded. I think Arjan was suggesting some proc or sysfs file that
would cause scsi_complete_async_scans() to be called, but I couldn't
figure out where a good place to put such a file would be.
> @@ -22,6 +22,10 @@
>
> obj-$(CONFIG_SCSI) += scsi_mod.o
>
> +ifeq ("$(CONFIG_SCSI)", "m")
> + obj-m += scsi_wait_scan.o
> +endif
We seem to have a bit of an allergy to conditionals in Makefiles these
days; how about:
tmp-$(CONFIG_SCSI) := scsi_wait_scan.o
obj-m += $(tmp-m)
>
> -static int scsi_complete_async_scans(void)
> +int scsi_complete_async_scans(void)
> {
> struct async_scan_data *data;
>
> @@ -157,8 +157,10 @@
> kfree(data);
> return 0;
> }
Do you think it's worth putting in something like:
/* Only exported for the benefit of scsi_wait_scan */
And maybe ...
#ifdef MODULE
/* Only exported for the benefit of scsi_wait_scan */
EXPORT_SYMBOL_GPL(scsi_complete_async_scans);
#else
late_initcall(scsi_complete_async_scans);
#endif
I really don't want to see driver authors calling it -- if they are,
something's gone pretty horribly wrong.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Wilcox <matthew@wil.cx>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-hotplug-devel@lists.sourceforge.net,
Stefan Richter <stefanr@s5r6.in-berlin.de>,
"Alexander E. Patrakov" <patrakov@ums.usu.ru>,
linux-scsi@vger.kernel.org,
Patrick Mansfield <patmans@us.ibm.com>
Subject: Re: Asynchronous scsi scanning, version 9
Date: Sun, 25 Jun 2006 16:46:31 -0600 [thread overview]
Message-ID: <20060625224631.GD1608@parisc-linux.org> (raw)
In-Reply-To: <1151270127.3617.26.camel@mulgrave.il.steeleye.com>
On Sun, Jun 25, 2006 at 04:15:26PM -0500, James Bottomley wrote:
> Actually, the first problem is that SCSI doesn't compile as a module at
> all: late_initcalls are defined to be module_init calls for modules.
> Your adding this to scsi_scan.c now gives us two module_init calls,
> which won't build. I fixed this by putting an #ifdef MODULE around the
> late_initcall.
I think that's a good idea (well, I would, I suggested it to you ;-)
> > There's a potential solution to this. If we add a hook to sys_module_init
> > such that it'll call a specified function before returning, we can make
> > it wait until all scans are done. This way, userspace never sees the
> > asynchronous scanning behaviour. But if you have devices of different
> > types, you won't get the overlapping scans.
>
> How about this solution which works for me with debian on a huge 6 bus
> scsi machine: it introduces a new module scsi_wait_scan.ko whose sole
> job is to wait for the scans to complete in its init function. The
> initrd/initramfs sequence now becomes:
>
> insert all other modules
> modprobe scsi_wait_scan
I think that's a great idea. I wonder about making it always fail
initialisation, since then it can be loaded multiple times without being
unloaded. I think Arjan was suggesting some proc or sysfs file that
would cause scsi_complete_async_scans() to be called, but I couldn't
figure out where a good place to put such a file would be.
> @@ -22,6 +22,10 @@
>
> obj-$(CONFIG_SCSI) += scsi_mod.o
>
> +ifeq ("$(CONFIG_SCSI)", "m")
> + obj-m += scsi_wait_scan.o
> +endif
We seem to have a bit of an allergy to conditionals in Makefiles these
days; how about:
tmp-$(CONFIG_SCSI) := scsi_wait_scan.o
obj-m += $(tmp-m)
>
> -static int scsi_complete_async_scans(void)
> +int scsi_complete_async_scans(void)
> {
> struct async_scan_data *data;
>
> @@ -157,8 +157,10 @@
> kfree(data);
> return 0;
> }
Do you think it's worth putting in something like:
/* Only exported for the benefit of scsi_wait_scan */
And maybe ...
#ifdef MODULE
/* Only exported for the benefit of scsi_wait_scan */
EXPORT_SYMBOL_GPL(scsi_complete_async_scans);
#else
late_initcall(scsi_complete_async_scans);
#endif
I really don't want to see driver authors calling it -- if they are,
something's gone pretty horribly wrong.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
next prev parent reply other threads:[~2006-06-25 22:46 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-11 14:33 [RFC] Asynchronous scsi scanning Matthew Wilcox
2006-05-11 18:15 ` Mike Christie
2006-05-11 18:21 ` Matthew Wilcox
2006-05-11 18:49 ` Mike Christie
2006-05-11 18:56 ` Matthew Wilcox
2006-05-11 19:09 ` Mike Christie
2006-05-18 17:22 ` [PATCH] " Matthew Wilcox
2006-05-29 3:19 ` Asynchronous scsi scanning, version 9 Matthew Wilcox
2006-05-29 8:38 ` Stefan Richter
2006-05-29 13:05 ` Matthew Wilcox
2006-05-29 13:11 ` Arjan van de Ven
2006-05-29 13:19 ` Matthew Wilcox
2006-05-31 23:21 ` Patrick Mansfield
2006-05-31 23:21 ` Patrick Mansfield
2006-06-01 12:22 ` Kay Sievers
2006-06-01 12:22 ` Kay Sievers
2006-10-26 19:53 ` maximilian attems
2006-10-26 19:53 ` maximilian attems
2006-06-01 13:14 ` Alexander E. Patrakov
2006-06-01 13:14 ` Alexander E. Patrakov
2006-06-01 13:21 ` maximilian attems
2006-06-01 13:21 ` maximilian attems
2006-06-01 13:23 ` Matthew Wilcox
2006-06-01 13:23 ` Matthew Wilcox
2006-06-01 13:26 ` Alexander E. Patrakov
2006-06-01 13:26 ` Alexander E. Patrakov
2006-06-01 14:00 ` Arjan van de Ven
2006-06-01 14:00 ` Arjan van de Ven
2006-06-25 21:15 ` James Bottomley
2006-06-25 21:15 ` James Bottomley
2006-06-25 22:46 ` Matthew Wilcox [this message]
2006-06-25 22:46 ` Matthew Wilcox
2006-06-26 8:24 ` Arjan van de Ven
2006-06-26 8:24 ` Arjan van de Ven
2006-06-26 12:40 ` Matthew Wilcox
2006-06-26 12:40 ` Matthew Wilcox
2006-06-26 12:59 ` Arjan van de Ven
2006-06-26 12:59 ` Arjan van de Ven
2006-06-26 16:03 ` Greg KH
2006-06-26 16:03 ` Greg KH
2006-06-26 14:44 ` Matthew Dharm
2006-06-26 14:44 ` Matthew Dharm
2006-06-26 15:18 ` Matthew Wilcox
2006-06-26 15:18 ` Matthew Wilcox
2006-06-26 15:44 ` James Bottomley
2006-06-26 15:44 ` James Bottomley
2006-06-26 16:02 ` Greg KH
2006-06-26 16:02 ` Greg KH
2006-06-26 21:08 ` Matthew Dharm
2006-06-26 21:08 ` Matthew Dharm
2006-06-26 22:15 ` Matthew Wilcox
2006-06-26 22:15 ` Matthew Wilcox
2006-06-26 18:55 ` [SPAM] " Doug Ledford
2006-06-26 18:55 ` Doug Ledford
2006-06-26 21:04 ` Matthew Dharm
2006-06-26 21:04 ` Matthew Dharm
2006-06-26 21:20 ` Doug Ledford
2006-06-26 21:20 ` Doug Ledford
2006-06-26 20:58 ` Linas Vepstas
2006-06-26 20:58 ` Linas Vepstas
2006-06-26 21:14 ` James Bottomley
2006-06-26 21:14 ` James Bottomley
2006-06-26 21:21 ` Linas Vepstas
2006-06-26 21:21 ` Linas Vepstas
2006-06-26 21:41 ` James Bottomley
2006-06-26 21:41 ` James Bottomley
2006-06-28 7:52 ` Hannes Reinecke
2006-06-28 7:52 ` Hannes Reinecke
2006-06-28 16:03 ` James Bottomley
2006-06-28 16:03 ` James Bottomley
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=20060625224631.GD1608@parisc-linux.org \
--to=matthew@wil.cx \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--cc=linux-scsi@vger.kernel.org \
--cc=patmans@us.ibm.com \
--cc=patrakov@ums.usu.ru \
--cc=stefanr@s5r6.in-berlin.de \
/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.