Re: SCSI disk driver module spin-up problem (1.3.67)

Christer Weinigel (wingel@hog.rydnet.lysator.liu.se)
Sat, 24 Feb 1996 13:34:58 +0100


In article <9602222018.ZM24781@aib.com>, Eric Youngdale <eric@aib.com> wrote:
> I guess I am not really in favor of spinning down disks all the
>time.
>Most of the wear and tear that decreases the lifetime of a disk is at
>startup and shutdown, so unless there are power management reasons
>(i.e. on a laptop), I think it is probably better to simply leave the
>disks spinning all the time.

It is really useful for people like me who have a computer at home,
which is turned on 24 hours a day. My FTP-disk is really noisy, and
that's why I wrote my scsi-idle patch, it allows me to get some sleep
at night :-)

> In principle, it would probably not be that harmful to perform
>spinup/spindown on mount/unmount. Having an idle timer seems like a
>dangerous idea to me, as you could wear out a disk in a real hurry.
>
>>I expect that if support for spinning down scsi drives were to be added to
>>the kernel, such an approach would have to be taken anyways. The scsi-idle
>>patch available at sunsite, if it worked properly, would have basically
>>provided this -- is anyone still working on this one? I haven't seen any
>
> First I have heard of this one.

I wrote it a long time ago around 1.2.early and when the timer code
changed around 1.3.ten-something, I rewrote it from scratch. I've had
the intention of posting my patches to this list for quite a while,
but just haven't had the time and energy to do that. Anyways, I just
noticed a problem with scsi-idle when the scsi-support is configured
as a module and I've been wanting to take a look at it first.

If you're interested in the patch, here's the latest LSM-entry for it:

Begin3
Title: scsi-idle - Turn off SCSI disks when idle (Take 2)
Version: 1.3.45
Entered-date: 01JAN96
Description: A small kernel patch which spins down SCSI-disks after a
period of inactivity.
scsi-idle can probably be considered to be BETA software now,
it works for me and half dozen other people, but YMMV.
Keywords: SCSI idle
Author: wingel@ctrl-c.liu.se (Christer Weinigel)
Primary-site: ctrl-c.liu.se /unix/linux/wingel
scsi-idle-1_3_45_tar.gz
Platforms: Linux
Copying-policy: Freely distributable
End

It patches cleanly against 1.3.60 and works perfectly for me (spinning
down my /home and FTP-disks which are quite noisy), but I've had
reports that it doesn't work for some people. There seems to be some
race conditions when spinning down the root disk, but I really don't
know enough about the inner workings of the scsi-code to be able to
figure out why.
(I haven't had the time or energy to do that either. I guess I belong
to the `Odd Fixes' category of maintainers :-) ).

/Christer

>-Eric
>
>
>--
>"The woods are lovely, dark and deep. But I have promises to keep,
>And lines to code before I sleep, And lines to code before I sleep."
>

-- 
Christer Weinigel, wingel@ctrl-c.liu.se