Re: detecting hard disk idleness

From: Richard Zidlicky (
Date: Wed Aug 21 2002 - 08:39:17 EST

On Tue, Aug 20, 2002 at 11:25:11PM -0700, Mukesh Rajan wrote:
> hi,
> i'm trying to implement an alogrithm that requires as input the idleness
> period of a hard disk (i.e. time between satisfying a request and arrival
> of new request).
> so far implementation polls "proc/stat" periodically to detect idleness
> over the poll period. this implementation is not accurate and also i have
> very small poll interval (milli secs). with some measurements, conclusion
> is that implementation is consuming quite some power. this millisecond
> polling overhead could be avoided if i can come up with an interrupt
> driven implementation. in DOS, i would have manipulated the interrupt
> table and inserted my code for 13h (disk interrupt right?). this would
> help me do some preprocessing before the actual call to the hard disk
> (13h).
> is this possible in any way in Linux? i.e. have the kernel inform a
> program when a hard disk interrupt occurs? either through interrupt
> manipulation or otherwise?

cat /proc/interrupts

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

This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:22 EST