1) If nrpos <= 1, don't output rpos table (and set fs_cpc to 0) - disabling

the use of the rotational position table.
2) Allow specification of 0 rotational positions (disables function).
3) Make rotdelay=0 and nrpos=0 by default.

   The purpose of the above is to optimize for modern SCSI (and IDE) drives
that do read-ahead/write-behind.
This commit is contained in:
David Greenman 1994-10-01 16:56:22 +00:00
parent 9eb98cece8
commit 7ce005d7c1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3271
2 changed files with 23 additions and 13 deletions

View File

@ -443,7 +443,7 @@ mkfs(pp, fsys, fi, fo)
sblock.fs_npsect = nphyssectors;
sblock.fs_postblformat = FS_DYNAMICPOSTBLFMT;
sblock.fs_sbsize = fragroundup(&sblock, sizeof(struct fs));
if (sblock.fs_ntrak == 1) {
if (sblock.fs_ntrak == 1 || sblock.fs_nrpos <= 1) {
sblock.fs_cpc = 0;
goto next;
}

View File

@ -104,12 +104,17 @@ void fatal();
#define DESCPG 16 /* desired fs_cpg */
/*
* ROTDELAY gives the minimum number of milliseconds to initiate
* another disk transfer on the same cylinder. It is used in
* determining the rotationally optimal layout for disk blocks
* within a file; the default of fs_rotdelay is 4ms.
* Once upon a time...
* ROTDELAY gives the minimum number of milliseconds to initiate
* another disk transfer on the same cylinder. It is used in
* determining the rotationally optimal layout for disk blocks
* within a file; the default of fs_rotdelay is 4ms.
*
* ...but now we make this 0 to disable the rotdelay delay because
* modern drives with read/write-behind achieve higher performance
* without the delay.
*/
#define ROTDELAY 4
#define ROTDELAY 0
/*
* MAXBLKPG determines the maximum number of data blocks which are
@ -126,13 +131,18 @@ void fatal();
#define NFPI 4
/*
* For each cylinder we keep track of the availability of blocks at different
* rotational positions, so that we can lay out the data to be picked
* up with minimum rotational latency. NRPOS is the default number of
* rotational positions that we distinguish. With NRPOS of 8 the resolution
* of our summary information is 2ms for a typical 3600 rpm drive.
* Once upon a time...
* For each cylinder we keep track of the availability of blocks at different
* rotational positions, so that we can lay out the data to be picked
* up with minimum rotational latency. NRPOS is the default number of
* rotational positions that we distinguish. With NRPOS of 8 the resolution
* of our summary information is 2ms for a typical 3600 rpm drive.
*
* ...but now we make this 1 (which disables the rotational position table)
* because modern drives with read-ahead and write-behind do better without
* the rotational position table.
*/
#define NRPOS 8 /* number distinct rotational positions */
#define NRPOS 0 /* number distinct rotational positions */
int mfs; /* run as the memory based filesystem */
@ -269,7 +279,7 @@ main(argc, argv)
fatal("%s: bad free space %%\n", optarg);
break;
case 'n':
if ((nrpos = atoi(optarg)) <= 0)
if ((nrpos = atoi(optarg)) < 0)
fatal("%s: bad rotational layout count\n",
optarg);
break;