[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Reduced system performance after prolonged usage



On Fri, Jun 25, 1999 at 08:15:18PM +0530, root wrote:

> another interesting thing i have noted the sum of read and write operations
> shown by procinfo is not equal to the number of interrupt requests made on the
> irq of my harddisk again shown by procinfo .

And why do you expect the number of read/write operations to be equal to
the number of interrupts ?

If you're talking about disk_rblk disk_wblk and the irq lines in /proc/stat,
then you're missing the point.

Here's what happens in the kernel:

1. You make a disk request of 1MB - say by issuing read(2)
2. A request gets queued. disk_rio gets incremented by 1 and disk_rblk by
   the number of sectors requested. (linux/drivers/block/ll_rw_blk.c)
3. Eventually the disk driver gets the request and it has to issue several
   DMA operations. Each time  DMA is done, the CPU gets an interrupt. There
   are several hardware/software optimizations going on here, which makes
   keeping accurate stats impossible. (linux/driver/block/ide-intr.c) 

So there is no one to one correspondence between the number of interrupts
and the number of requests queued (disk_rio) or the number of interrupts
needed to finish the I/O request. 

	-Arun


- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/

------------------------------