lkml.org 
[lkml]   [2001]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: New SCSI subsystem in 2.4, and scsi idle patch
From
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
dust...

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
(http://noflushd.sourceforge.net). 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!

Regards,

Daniel.

--
GNU/Linux Audio Mechanics - http://www.glame.de
Cutting Edge Office - http://www.c10a02.de
GPG Key ID 89BF7E2B - http://www.keyserver.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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