Re: [RFC] Asynchronous scsi scanning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Wilcox wrote:
> A customer has a machine with 162 scsi hosts, and just scanning the scsi
> busses takes over an hour.  Here's what I've come up with to reduce that.
> For drivers which call scsi_scan_host(), no changes are necessary.
> The fibrechannel and SAS drivers are going to take a bit more work,
> but I thought I'd send out the core first.  I'm not entirely happy about
> how the threads rendezvous; it'd be nice to not have to use a completion.
> 
> One user-visible change in behaviour is that after loading a driver, the
> insmod will return before discovery is finished.  Apparently Ubuntu's
> userspace already copes with this, but it's something to be aware of.
> The late_initcall takes care of this for built-in modules, but it'd be
> nice if there were an API to say "run this function before insmod exits".
> 


Instead of all the scanning from work queue and kthreads, what about
just running something from the host addition hotplug event. When a host
or target or rport or whatever we want is added, userspace gets a
hotplug event today, I thought. From that event could you just do

echo - - - > path-to-object/scan

This is basically what we do for iscsi. We can scan all hosts or
sessions in parrallel which makes startup pretty fast. The problem is of
course getting the distros to support it. I guess if they have to
support async scanning for all hosts (I think fedora and red hat does
not support this - maybe just for usb), then they could also userspace
scanning support at the same time.
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux