Return to BSD News archive
Xref: sserve comp.os.386bsd.questions:13108 comp.os.386bsd.development:2549 Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!ipgaix!not-for-mail From: peppe@ipgaix.unipg.it (G. Vitillaro) Newsgroups: comp.os.386bsd.questions,comp.os.386bsd.development Subject: scsi_start_unit() in sd.c Date: 12 Sep 1994 22:31:11 +0200 Organization: Centro di Calcolo - Universita' di Perugia Lines: 49 Message-ID: <352dqf$t25@ipgaix.unipg.it> NNTP-Posting-Host: ipgaix.unipg.it X-Newsreader: NN version 6.5.0 #1 (NOV) I'm using FreeBSD 1.1.5.1 with an Adaptec 1542b and an IBM 0663L12 1Gb hard disk. After I finished to install the system I noted that it was very slow to fsck and mount partitions at boot time. After some investigation inside the kernel scsi drivers sources, I discovered in /sys/scsi/sd.c this couple of lines belonging to the sdopen() routine: /* * In case it is a funny one, tell it to start * not needed for most hard drives (ignore failure) */ scsi_start_unit(sc_link, SCSI_ERR_OK | SCSI_SILENT); It seems my disk is relatively slow (1 second) to answer to this SCSI command, even if the disk is already started. So any time the kernel open an hard disk partition (read sd0n) I got 1 second of delay. This is not a big problem, but is boring, especially during the boot and when you use disklabel/fdisk/mount. I figured that this has to apply to hard disk that start the motor only following this command (for example an external disk you may turn off after the boot), so I commented ths scsi_start_unit() calls and now the system seems to run fine. My questions are: (1) What risks I'm taking working this way, supposing I'll never have disks that may be turned off after the boot? (2) Is it not possible to ask to the SCSI device if it was already started and only in the negative case call scsi_start_unit()? Thank for any answer or suggestion, Peppe. -- Giuseppe Vitillaro - IBM SEMEA | E-Mail : peppe@unipg.it University of Perugia Italy | 06124 Perugia Phone:+39.75.585-2799 --------------------------------------------------------------------------- All comments/opinions are mine and don't represent those of IBM