1) base number of cache vm objects on NTEXT. Move initialization of
[unix-history] / sys / conf / param.c
index 260d8fc..b98d1b2 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *     from: @(#)param.c       7.20 (Berkeley) 6/27/91
  * SUCH DAMAGE.
  *
  *     from: @(#)param.c       7.20 (Berkeley) 6/27/91
- *     $Id: param.c,v 1.3 1993/10/16 16:31:57 rgrimes Exp $
+ *     $Id: param.c,v 1.5 1994/01/21 09:55:52 davidg Exp $
  */
 
 #include "sys/param.h"
  */
 
 #include "sys/param.h"
 #include "machine/vmparam.h"
 #include "sys/shm.h"
 #endif
 #include "machine/vmparam.h"
 #include "sys/shm.h"
 #endif
+#ifdef SYSVSEM
+#include "sys/sem.h"
+#endif
+#ifdef SYSVMSG
+#include "sys/msg.h"
+#endif
 
 /*
  * System parameter formulae.
 
 /*
  * System parameter formulae.
@@ -73,7 +79,8 @@ int   tickadj = TICKADJ       /* NTP users may prefer a smaller value */
 struct timezone tz = { TIMEZONE, DST };
 #define        NPROC (20 + 16 * MAXUSERS)
 int    maxproc = NPROC;
 struct timezone tz = { TIMEZONE, DST };
 #define        NPROC (20 + 16 * MAXUSERS)
 int    maxproc = NPROC;
-#define        NTEXT (80 + NPROC / 8)                  /* actually the object cache */
+#define        NTEXT (NPROC)                   /* actually the object cache */
+int    vm_cache_max = NTEXT;
 #define        NVNODE (NPROC + NTEXT + 100)
 long   desiredvnodes = NVNODE;
 int    maxfdescs = MAXFDESCS;
 #define        NVNODE (NPROC + NTEXT + 100)
 long   desiredvnodes = NVNODE;
 int    maxfdescs = MAXFDESCS;
@@ -102,6 +109,43 @@ struct     shminfo shminfo = {
 };
 #endif
 
 };
 #endif
 
+/*
+ * Values in support of System V compatible semaphores.
+ */
+
+#ifdef SYSVSEM
+
+struct seminfo seminfo = {
+                SEMMAP,         /* # of entries in semaphore map */
+                SEMMNI,         /* # of semaphore identifiers */
+                SEMMNS,         /* # of semaphores in system */
+                SEMMNU,         /* # of undo structures in system */
+                SEMMSL,         /* max # of semaphores per id */
+                SEMOPM,         /* max # of operations per semop call */
+                SEMUME,         /* max # of undo entries per process */
+                SEMUSZ,         /* size in bytes of undo structure */
+                SEMVMX,         /* semaphore maximum value */
+                SEMAEM          /* adjust on exit max value */
+};
+#endif
+
+/*
+ * Values in support of System V compatible messages.
+ */
+
+#ifdef SYSVMSG
+
+struct msginfo msginfo = {
+                MSGMAX,         /* max chars in a message */
+                MSGMNI,         /* # of message queue identifiers */
+                MSGMNB,         /* max chars in a queue */
+                MSGTQL,         /* max messages in system */
+                MSGSSZ,         /* size of a message segment */
+                               /* (must be small power of 2 greater than 4) */
+                MSGSEG          /* number of message segments */
+};
+#endif
+
 /*
  * These are initialized at bootstrap time
  * to values dependent on memory size
 /*
  * These are initialized at bootstrap time
  * to values dependent on memory size