Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/nfs Introduce NFS_DEFAULT_NIOTHREADS to define the defau...



details:   https://anonhg.NetBSD.org/src/rev/1df7fff91a39
branches:  trunk
changeset: 511962:1df7fff91a39
user:      gmcgarry <gmcgarry%NetBSD.org@localhost>
date:      Sun Jul 01 02:13:35 2001 +0000

description:
Introduce NFS_DEFAULT_NIOTHREADS to define the default number
of nfs_niothreads instead of hard-coding 4.

This change has the advantage that the default can be specified
at compile time.  If the root filesystem is mounted over NFS
we don't have an opportunity to use the syscall to limit the
number of threads.  Useful on small-memory machines.

diffstat:

 sys/nfs/nfs.h        |  5 ++++-
 sys/nfs/nfs_vfsops.c |  4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 9969b4509b8c -r 1df7fff91a39 sys/nfs/nfs.h
--- a/sys/nfs/nfs.h     Sun Jul 01 02:04:57 2001 +0000
+++ b/sys/nfs/nfs.h     Sun Jul 01 02:13:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs.h,v 1.28 2001/04/03 15:08:38 chs Exp $     */
+/*     $NetBSD: nfs.h,v 1.29 2001/07/01 02:13:35 gmcgarry Exp $        */
 /*
  * Copyright (c) 1989, 1993, 1995
  *     The Regents of the University of California.  All rights reserved.
@@ -83,6 +83,9 @@
 #define        NFS_MAXASYNCDAEMON      20      /* Max. number async_daemons runable */
 #ifdef _KERNEL
 extern int nfs_niothreads;              /* Number of async_daemons desired */
+#ifndef NFS_DEFAULT_NIOTHREADS
+#define NFS_DEFAULT_NIOTHREADS 4
+#endif
 #endif
 #define NFS_MAXGATHERDELAY     100     /* Max. write gather delay (msec) */
 #ifndef NFS_GATHERDELAY
diff -r 9969b4509b8c -r 1df7fff91a39 sys/nfs/nfs_vfsops.c
--- a/sys/nfs/nfs_vfsops.c      Sun Jul 01 02:04:57 2001 +0000
+++ b/sys/nfs/nfs_vfsops.c      Sun Jul 01 02:13:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_vfsops.c,v 1.103 2001/05/30 11:42:14 mrg Exp $     */
+/*     $NetBSD: nfs_vfsops.c,v 1.104 2001/07/01 02:13:36 gmcgarry Exp $        */
 
 /*
  * Copyright (c) 1989, 1993, 1995
@@ -629,7 +629,7 @@
         */
 
        if (nfs_niothreads < 0) {
-               nfs_niothreads = 4;
+               nfs_niothreads = NFS_DEFAULT_NIOTHREADS;
                nfs_getset_niothreads(TRUE);
        }
        



Home | Main Index | Thread Index | Old Index