[lkml]   [2001]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: New SCSI subsystem in 2.4, and scsi idle patch
On Sun, Sep 09, 2001 at 06:21:13PM +0000, Phillip Susi wrote:
> I'm trying to get my 2.4.9 system to spin down my scsi disk(s) when idle.
> Aparently, this is supported on IDE disks, but not SCSI. I found an old
> patch to add support for this to the 2.0.34 kernel, and have been trying to
> use it as a guide to fixing the 2.4.9 kernel. It seems that major changes
> have been done to the scsi layer, so I'm a little confused. Any help is
> appreciated. Here is my current status:

I had played around with scsi spinup a couple of months ago but then had to
give away my scsi system, so the patch remained unfinished. Let me dig in the

Trying to trap NOT_READY was fine, but I believe the tricky part was one
should avoid to allocate a new request for the spinup command. The number
of requests in the queue is limited, so an additional request issued from
an incomplete request might deadlock. So you have to piggyback the spinup
on the original command, catch it when it completes, and re-issue the
command. Some of the error handlers do similar stuff, but clobber a few
entries from the original command. I therefore added new backup fields to
Scsi_Cmnd in scsi.h. The other changes were local to scsi_lib.c, IIRC.

> P.S. I'd like to use a user mode daemon to detect disk idle, and issue the
> existing ioctl code to spin the disk down, and rely on the kernel to spin it
> back up as needed.

As already suggested elsewhere in this thread, please have a look at noflushd
( It implements all the user level features
you describe. The scsi code is disabled by default, however, because of the
lack of spinup support in the standard kernel. The lastest scsi spinup patch
shipped with noflushd applies to kernel 2.3.28. If you cook up a patch that
works with recent kernels, please let me know!



GNU/Linux Audio Mechanics -
Cutting Edge Office -
GPG Key ID 89BF7E2B -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:03    [W:0.628 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site