Re: New SCSI subsystem in 2.4, and scsi idle patch

Robert Love (
09 Sep 2001 18:53:34 -0400

On Sun, 2001-09-09 at 14:21, Phillip Susi wrote:
> 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. Isn't there somewhere in /proc that keeps IO counters on
> the disk I can monitor? Also, is there a way I could ask the kernel to not
> flush dirty pages to disk unless it gets a whole lot of them so the disk
> won't be spun up all the time just to write a few KB?

You can change the behavior of how dirty pages are flushed using

[18:41:55]rml@phantasy:/proc/sys/vm# cat bdflush
30 64 64 256 500 3000 60 0 0

Of these 9 parameters, you probably care about the first and sixth. The
first is percent of buffer full before bdflush kicks in and starts
flushing. Setting this to 60% is fine, and will work towards your aim.

Note that, Documentation/sysctl/vm.txt is outdated (I will send a patch
off...) this is the correct values of the fields on bdflush:

union bdflush_param {
struct {
int nfract; /* Percentage of buffer cache dirty to
activate bdflush */
int dummy1; /* old "ndirty" */
int dummy2; /* old "nrefill" */
int dummy3; /* unused */
int interval; /* jiffies delay between kupdate flushes */
int age_buffer; /* Time for normal buffer to age before we flush it */
int nfract_sync;/* Percentage of buffer cache dirty to
activate bdflush synchronously */
int dummy4; /* unused */
int dummy5; /* unused */
} b_un;
unsigned int data[N_PARAM];
} bdf_prm = {{30, 64, 64, 256, 5*HZ, 30*HZ, 60, 0, 0}};

Finally, I like your idea. I have an all SCSI system and would like my
disks to spin down. Good luck.

Robert M. Love
rml at
rml at

- 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