Index: ufs_disksubr.c =================================================================== RCS file: /home/lair/ellard/CVS/nfs/freebsd_4.6.2/src/sys/ufs/ufs/ufs_disksubr.c,v retrieving revision 1.1 retrieving revision 1.9 diff -w -c -r1.1 -r1.9 *** ufs_disksubr.c 29 Oct 2002 15:57:44 -0000 1.1 --- ufs_disksubr.c 8 Apr 2003 16:40:35 -0000 1.9 *************** *** 2,7 **** --- 2,9 ---- * Copyright (c) 1982, 1986, 1988, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. + * This code is derived from software contributed to Berkeley by + * Rick Macklem at The University of Guelph. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with *************** *** 47,52 **** --- 49,76 ---- #include #include + #ifdef NFS_TWEAK + #include + #include + #endif /* NFS_TWEAK */ + + /* + * VERY IMPORTANT NOTE: the "cscan" sysctl variable controls whether + * the disk scheduler uses ordinary cyclical Elevator scan (aka CSCAN, + * but implemented more like CLOOK) or N-step CSCAN. If 0, then + * Elevator scan is used. If 1, then N-step CSCAN is used. This is + * NON-INTUITIVE and should be fixed in the future. At present, + * however, it would break too many regression tests, so that will + * have to wait until the next cleanup. -DJE + */ + + int nfst_CscanMode = 0; + + #ifdef NFS_TWEAK + SYSCTL_DECL(_vfs_nfs_nfst); + SYSCTL_INT(_vfs_nfs_nfst, OID_AUTO, cscan, CTLFLAG_RW, &nfst_CscanMode, 0, ""); + #endif /* NFS_TWEAK */ + /* * Seek sort for disks. * *************** *** 97,103 **** * "locked" portion of the list, then we must add ourselves * to the second request list. */ ! if (bp->b_pblkno < bufq->last_pblkno) { bq = bufq->switch_point; /* --- 121,127 ---- * "locked" portion of the list, then we must add ourselves * to the second request list. */ ! if (nfst_CscanMode || bp->b_pblkno < bufq->last_pblkno) { bq = bufq->switch_point; /*