Subject: disklabel documentation inconsistancy
To: None <current-users@netbsd.org>
From: Luke Mewburn <lm@melb.cpr.itg.telecom.com.au>
List: current-users
Date: 10/18/1994 08:43:05
(I would send-pr this, but the BSD box is not net.connected today, and
 I don't like sending non send-pr reports to netbsd-bugs)

Whilst tracking down a problem I was having with a DEC RZ58 1.3GB
drive, I noticed that the filesystem code and disklabel disagree on
the units for track-to-track seek and headswitch.

All through the code comments appear as `usec', which I take to mean
``microseconds''. However, in disklabel -e sd0 or disklabel sd0, the
comments indicate that you should use milliseconds - a factor of 1000x
larger...  At first, I thought my problem was due to the driver
thinking that a headswitch of 3 (milliseconds according to disklabel,
microseconds to everything else) was a tad to quick ;), but it turns
out the drive itself was flaky.

So, although I couldn't find anywhere in the kernel that actually uses
the track-to-track seek in any calculations, can someone fix up either
disklabel to say microseconds, or the comments to say `msec',
depending on whichever is correct. A patch for the former is simple
(attached below.) The latter would take a rework of a shitload of
comments.


On another unrelated disk issue, we've found that having larger
maxcontig (default 1, we've tried 7, 16, and 32) and maxbpg
(default 1/4 of a cylinder, we use 2/3rds) noticably improves
performance on SCSI drives under NetBSD-1.0-current(august).


*** disklabel.c.orig	Tue Oct 18 08:42:06 1994
--- disklabel.c	Tue Oct 18 08:42:14 1994
***************
*** 773,780 ****
  	fprintf(f, "interleave: %d\n", lp->d_interleave);
  	fprintf(f, "trackskew: %d\n", lp->d_trackskew);
  	fprintf(f, "cylinderskew: %d\n", lp->d_cylskew);
! 	fprintf(f, "headswitch: %d\t\t# milliseconds\n", lp->d_headswitch);
! 	fprintf(f, "track-to-track seek: %d\t# milliseconds\n", lp->d_trkseek);
  	fprintf(f, "drivedata: ");
  	for (i = NDDATA - 1; i >= 0; i--)
  		if (lp->d_drivedata[i])
--- 773,780 ----
  	fprintf(f, "interleave: %d\n", lp->d_interleave);
  	fprintf(f, "trackskew: %d\n", lp->d_trackskew);
  	fprintf(f, "cylinderskew: %d\n", lp->d_cylskew);
! 	fprintf(f, "headswitch: %d\t\t# microseconds\n", lp->d_headswitch);
! 	fprintf(f, "track-to-track seek: %d\t# microseconds\n", lp->d_trkseek);
  	fprintf(f, "drivedata: ");
  	for (i = NDDATA - 1; i >= 0; i--)
  		if (lp->d_drivedata[i])

-- 
Luke Mewburn, <lm@cpr.itg.telecom.com.au>
`Think of it as Evolution in Action.' - "Oath of Fealty", Niven & Pournelle