Source-Changes-HG archive

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

[src/trunk]: src/sys Add support for kern.maxphys, vm.maxslp, vm.uspace (the ...



details:   https://anonhg.NetBSD.org/src/rev/b3246a72fccd
branches:  trunk
changeset: 512703:b3246a72fccd
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Jul 14 06:36:01 2001 +0000

description:
Add support for kern.maxphys, vm.maxslp, vm.uspace (the later two for ps).

diffstat:

 sys/kern/kern_sysctl.c |  4 +++-
 sys/sys/sysctl.h       |  6 ++++--
 sys/uvm/uvm_meter.c    |  8 +++++++-
 sys/uvm/uvm_param.h    |  8 ++++++--
 4 files changed, 20 insertions(+), 6 deletions(-)

diffs (97 lines):

diff -r 43cbe3788186 -r b3246a72fccd sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c    Sat Jul 14 06:01:22 2001 +0000
+++ b/sys/kern/kern_sysctl.c    Sat Jul 14 06:36:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sysctl.c,v 1.91 2001/07/09 23:35:56 simonb Exp $  */
+/*     $NetBSD: kern_sysctl.c,v 1.92 2001/07/14 06:36:01 matt Exp $    */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -534,6 +534,8 @@
                return (sysctl_dopipe(name + 1, namelen - 1, oldp, oldlenp,
                    newp, newlen));
 #endif
+       case KERN_MAXPHYS:
+               return sysctl_rdint(oldp, oldlenp, newp, MAXPHYS);
        default:
                return (EOPNOTSUPP);
        }
diff -r 43cbe3788186 -r b3246a72fccd sys/sys/sysctl.h
--- a/sys/sys/sysctl.h  Sat Jul 14 06:01:22 2001 +0000
+++ b/sys/sys/sysctl.h  Sat Jul 14 06:36:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysctl.h,v 1.65 2001/07/09 10:25:21 simonb Exp $       */
+/*     $NetBSD: sysctl.h,v 1.66 2001/07/14 06:36:02 matt Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -174,7 +174,8 @@
 #define        KERN_CONSDEV            54      /* dev_t: console terminal device */
 #define        KERN_MAXPTYS            55      /* int: maximum number of ptys */
 #define        KERN_PIPE               56      /* node: pipe limits */
-#define        KERN_MAXID              57      /* number of valid kern ids */
+#define        KERN_MAXPHYS            57      /* int: kernel value of MAXPHYS */
+#define        KERN_MAXID              58      /* number of valid kern ids */
 
 #define        CTL_KERN_NAMES { \
        { 0, 0 }, \
@@ -234,6 +235,7 @@
        { "consdev", CTLTYPE_STRUCT }, \
        { "maxptys", CTLTYPE_INT }, \
        { "pipe", CTLTYPE_NODE }, \
+       { "maxphys", CTLTYPE_INT }, \
 }
 
 /*
diff -r 43cbe3788186 -r b3246a72fccd sys/uvm/uvm_meter.c
--- a/sys/uvm/uvm_meter.c       Sat Jul 14 06:01:22 2001 +0000
+++ b/sys/uvm/uvm_meter.c       Sat Jul 14 06:36:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_meter.c,v 1.20 2001/06/02 18:09:27 chs Exp $       */
+/*     $NetBSD: uvm_meter.c,v 1.21 2001/07/14 06:36:03 matt Exp $      */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -196,6 +196,12 @@
                uvmexp.vnodemin = t * 256 / 100;
                return rv;
 
+       case VM_MAXSLP:
+               return (sysctl_rdint(oldp, oldlenp, newp, maxslp));
+
+       case VM_USPACE:
+               return (sysctl_rdint(oldp, oldlenp, newp, USPACE));
+
        default:
                return (EOPNOTSUPP);
        }
diff -r 43cbe3788186 -r b3246a72fccd sys/uvm/uvm_param.h
--- a/sys/uvm/uvm_param.h       Sat Jul 14 06:01:22 2001 +0000
+++ b/sys/uvm/uvm_param.h       Sat Jul 14 06:36:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_param.h,v 1.10 2001/05/25 04:06:16 chs Exp $       */
+/*     $NetBSD: uvm_param.h,v 1.11 2001/07/14 06:36:03 matt Exp $      */
 
 /*
  * Copyright (c) 1991, 1993
@@ -112,8 +112,10 @@
 #define        VM_ANONMIN      6
 #define        VM_VTEXTMIN     7
 #define        VM_VNODEMIN     8
+#define        VM_MAXSLP       9
+#define        VM_USPACE       10
 
-#define        VM_MAXID        9               /* number of valid vm ids */
+#define        VM_MAXID        11              /* number of valid vm ids */
 
 #define        CTL_VM_NAMES { \
        { 0, 0 }, \
@@ -125,6 +127,8 @@
        { "anonmin", CTLTYPE_INT }, \
        { "vtextmin", CTLTYPE_INT }, \
        { "vnodemin", CTLTYPE_INT }, \
+       { "maxslp", CTLTYPE_INT }, \
+       { "uspace", CTLTYPE_INT }, \
 }
 
 #ifndef ASSEMBLER



Home | Main Index | Thread Index | Old Index