iostat(1) and Rimfire controllers: patch to driver
Gregory Bond
munnari!melba.bby.oz.au!gnb at uunet.uu.net
Fri Dec 30 21:19:02 AEST 1988
We are evaluating different server configurations, and a plot of the
output from iostat over a couple of "normal" days is part of the
comparison. Users of the Ciprico Rimfire controller (3200/3400) will find
that iostat command doesn't report stats for this controller.
Enclosed is a patch to the rimfire device driver "rf.c" (v1.14) that makes
iostat report the rimfire stats, and fixes some pretty ugly #if/#endif
mismatches in the code.
NB: USE AT YOUR OWN RISK! I am not a super experienced kernel hacker, but
the results have run for a week or two with no problems, and the answers
seem to be in the right ballpark. But then, who can tell...
BTW: on a 3/260, a Rimfire+CDC SABRE V seems about 25-50% faster than a
Xylogics 750+SABRE, which is itself about twice as fast as a Xylogics 451
with Fuji M-2333 drives. Your mileage (or kilometerage in the real
world!) may vary.
Disclaimer: I have no association with Ciprico or Xylogics except as a
test site for a local distributor from whom we will probably buy the
Rimfire sometime soon.
--
Gregory Bond, Burdett Buckeridge & Young Ltd, Melbourne, Australia
Internet: gnb at melba.bby.oz.au non-MX: gnb%melba.bby.oz at uunet.uu.net
Uucp: {uunet,mnetor,pyramid,ubc-vision,ukc,mcvax,...}!munnari!melba.bby.oz!gnb
----X--- cut here
*** ORIG_rf.c Thu Dec 8 15:32:15 1988
--- rf.c Tue Dec 20 16:19:42 1988
***************
*** 252,257 ****
--- 252,259 ----
#include "../sundev/rferr.h"
#include "../sundev/mbvar.h"
+ #define GNB /* Add gnb's code to make iostat work */
+
/* Get a Direct Virtual Memory Address (DVMA) from a virtual kernel address */
#define RF_ADDR(x) ((int)((int)(x) & 0xfffff)) /* DVMA address (20 bits) */
***************
*** 296,302 ****
/* Debugging aids */
! #define DSKBUG /* comment this line out to run faster */
static int debuglevel = 0x00; /* all debug levels OFF */
#ifdef RFSTATS
/* Statistic gathering information: */
--- 298,304 ----
/* Debugging aids */
! /* #define DSKBUG /* comment this line out to run faster */
static int debuglevel = 0x00; /* all debug levels OFF */
#ifdef RFSTATS
/* Statistic gathering information: */
***************
*** 389,394 ****
--- 391,397 ----
int finished; /* save reset complete status */
static char tellem = 1; /* Identify driver for them just once 1.10b */
+ #ifdef DSKBUG
if (debuglevel&1)
printf("rfprobe: controller %d at %x\n", unit, rf);
#endif DSKBUG
***************
*** 433,439 ****
printf("rf: RF3200/RF3400 driver version 1.14\n");
tellem = 0;
}
- #ifdef DSKBUG
return(sizeof(RF32REG));
}
--- 436,441 ----
***************
*** 1085,1090 ****
--- 1087,1101 ----
}
}
+ #ifdef GNB
+ /* Assume it's OK -> add to dk info for iostat */
+ if (device->md_dk >= 0 && device->md_dk < DK_NDRIVE) { /* Is OK */
+ /* bytes/sec = bytes/sector * rev/sec * nsectors */
+ /* interleave = 1 */
+ dk_bps[device->md_dk] = DEV_BSIZE * 60 * gp->dkg_nsect;
+ }
+ #endif GNB
+
/* release resources */
rmfree(iopbmap, sizeof(EXTPB), (caddr_t)xpb);
return(1);
***************
*** 1544,1549 ****
--- 1555,1569 ----
/* tell upper half we are done */
iodone(bp);
+ #ifdef GNB
+ if(!nqbuf[controller]) { /* Mark drive inactive */
+ register int dk = rfdrive_info[unit]->md_dk;
+
+ if (dk >= 0 && dk < DK_NDRIVE) {
+ dk_busy &= ~(1 << dk);
+ }
+ }
+ #endif
} /* command complete */
} /* while there are status blocks to process */
***************
*** 3457,3462 ****
--- 3477,3490 ----
/* we think for perfmeter */
if(device->md_dk >= 0)
dk_xfer[device->md_dk]++;
+ #ifdef GNB
+ if ((i = device->md_dk) >= 0) {
+ dk_busy |= 1 << i;
+ dk_seek[i]++;
+ dk_wds[i] += pb->blkcount << 3; /* 64 byte chunks? */
+ }
+ #endif
+
((RF32REG *) device->md_mc->mc_addr)->attention = SWAB(HOST_ID);
#ifdef DSKBUG
if (debuglevel & 1) {
More information about the Comp.sys.sun
mailing list