On 18 December 2012 03:23, Greg 'groggy' Lehey <g...@freebsd.org> wrote:
> On Monday, 17 December 2012 at 16:44:11 -0500, Dieter BSD wrote:
>> The newfs man page says:
>>
>>  -a maxcontig
>>  Specify the maximum number of contiguous blocks that will be laid
>>  out before forcing a rotational delay.  The default value is 16.
>>  See tunefs(8) for more details on how to set this option.
>>
>> Is this still a good idea with modern drives where the number of
>> sectors per track varies, and no one but the manufacturer knows how
>> many sectors a particular track has?
>
> No.
>
> It looks as if this, and also a number of comments in sys/ufs/ffs/fs.h
> and sys/ufs/ffs/ffs_alloc.c, are leftovers from the Olden Days.  The
> value isn't used anywhere that I can see.  Unless somebody can show
> that I'm wrong, I'd suggest that this is a documentation issue that I
> can take a look at.

[performance@ list trimmed]

I'm not sure about this.
In UFS fs_maxcontig controls fs_contigsumsize during newfs, both saved
in superblock, and fs_contigsumsize is widely used throughout FFS.

        sblock.fs_maxcontig = maxcontig;
        if (sblock.fs_maxcontig < sblock.fs_maxbsize / sblock.fs_bsize) {
                sblock.fs_maxcontig = sblock.fs_maxbsize / sblock.fs_bsize;
                printf("Maxcontig raised to %d\n", sblock.fs_maxbsize);
        }
        if (sblock.fs_maxcontig > 1)
                sblock.fs_contigsumsize = MIN(sblock.fs_maxcontig,FS_MAXCONTIG);


For ext2 this is instead "reconstructed" in the in-memory sblock copy
in mountfs().

        /*
         * Calculate the maximum contiguous blocks and size of cluster summary
         * array.  In FFS this is done by newfs; however, the superblock
         * in ext2fs doesn't have these variables, so we can calculate
         * them here.
         */
        ump->um_e2fs->e2fs_maxcontig = MAX(1, MAXPHYS /
ump->um_e2fs->e2fs_bsize);
        if (ump->um_e2fs->e2fs_maxcontig > 0)
                ump->um_e2fs->e2fs_contigsumsize =
                    MIN(ump->um_e2fs->e2fs_maxcontig, EXT2_MAXCONTIG);
        else
                ump->um_e2fs->e2fs_contigsumsize = 0;

-- 
wbr,
pluknet
_______________________________________________
freebsd-performance@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "freebsd-performance-unsubscr...@freebsd.org"

Reply via email to