Subject: Re: DaemonNews article about boot speedups
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
From: Greywolf <greywolf@starwolf.com>
List: tech-kern
Date: 09/04/2000 21:02:06
On Tue, 5 Sep 2000, Hubert Feyrer wrote:

# I've just read the DaemonNews article about speeding up the NetBSD boot
# process by saving SCSI device probes. I wonder if hardcoding devices in
# the kernel would be of the same effect:
# 
# ahc0    at pci? dev 9 function ?        #HF# Adaptec AHA2940U, aic78x0 SCSI
# scsibus0 at ahc0                        #HF#
# sd0     at scsibus0 target 1 lun 0      #HF# SCSI disk: 2GB DORS (NT)
# sd1     at scsibus0 target 2 lun 0      #HF# SCSI disk: 4GB DCAS (ccd0 part 1)
# sd2     at scsibus0 target 4 lun 0      #HF# SCSI disk: 4GB DCAS (ccd0 part 2)
# 
# Without having any wildcard devices (scsibus*, sd?, ahc?) in the kernel. 
# Will this have the same speedup effect, or are the devices in the kernel
# config file still prone to expensive probes?

I believe it was the bus attach/reset that was expensive.  The device
probes themselves are actually quite quick.  And the only reason the
bus attach/reset is so expensive is due to the fact that every probe
waits for a settle.  Now, what you do is go out and establish all your
bus attaches at the same time (roughly), send out resets to them all
at the same time, and wait 2s + ((nbuses - 1) * attach_latency), and
then go back and rescan each bus for its devices.  Kind of a breadth-first
search rather than depth-first.

# 
#  - Hubert
# 
# P.S.: Thanks & congratulations to Chen & Raghav for this article!
# 
# 


				--*greywolf;
--
BSD: the second best thing you can get for free