diff -u --recursive --new-file linux/drivers/block/ll_rw_blk.c linux-trace/drivers/block/ll_rw_blk.c --- linux/drivers/block/ll_rw_blk.c Fri Jun 29 21:58:07 2001 +++ linux-trace/drivers/block/ll_rw_blk.c Tue Aug 7 18:23:36 2001 @@ -31,6 +31,33 @@ #include +#define N_PARAM 9 + +/* stuff for I/O tracing (tell which process an I/O request came from) */ +union bdflush_param { + struct { + int nfract; /* Percentage of buffer cache dirty to + activate bdflush */ + int ndirty; /* Maximum number of dirty blocks to write out per + wake-cycle */ + int nrefill; /* Number of clean buffers to try to obtain + each time we call refill */ + int dummy1; /* 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 dummy2; /* unused */ + int dummy3; /* unused */ + } b_un; + unsigned int data[N_PARAM]; +}; + +extern union bdflush_param bdf_prm; + +#define io_tracing (bdf_prm.b_un.dummy2) +/* end stuff for I/O tracing */ + /* * MAC Floppy IWM hooks */ @@ -525,6 +552,11 @@ return; kstat.dk_drive[major][index] += new_io; + + if (io_tracing) { + printk("%s by %s\n", (rw==READ ? "read" : (rw==WRITE ? "write" : "??")), current->comm); + } + if (rw == READ) { kstat.dk_drive_rio[major][index] += new_io; kstat.dk_drive_rblk[major][index] += nr_sectors; diff -u --recursive --new-file linux/fs/buffer.c linux-trace/fs/buffer.c --- linux/fs/buffer.c Sat Jun 30 13:44:32 2001 +++ linux-trace/fs/buffer.c Tue Aug 7 17:42:26 2001 @@ -131,7 +131,7 @@ /* These are the min and max parameter values that we will allow to be assigned */ int bdflush_min[N_PARAM] = { 0, 10, 5, 25, 0, 1*HZ, 0, 0, 0}; -int bdflush_max[N_PARAM] = {100,50000, 20000, 20000,600*HZ, 6000*HZ, 100, 0, 0}; +int bdflush_max[N_PARAM] = {100,50000, 20000, 20000,600*HZ, 6000*HZ, 100, 1, 0}; /* * Rewrote the wait-routines to use the "new" wait-queue functionality,