summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2002-03-23 13:28:35 +0000
committerMarc Espie <espie@cvs.openbsd.org>2002-03-23 13:28:35 +0000
commitd5dbb93c5f932440dcab912174cdcaace0478710 (patch)
treec8b5272c356b9a1d36d58ac8de203ac79f55c530
parent22d4ae0d10ce3d60ef93721631a03beb15f29642 (diff)
Add variables for config(8) -e time tweak of systemV shared memory
parameters. Ok millert@, miod@, maja@
-rw-r--r--sys/arch/alpha/alpha/machdep.c5
-rw-r--r--sys/arch/amiga/amiga/machdep.c5
-rw-r--r--sys/arch/hp300/hp300/machdep.c5
-rw-r--r--sys/arch/hppa/hppa/machdep.c5
-rw-r--r--sys/arch/i386/i386/machdep.c5
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c5
-rw-r--r--sys/arch/macppc/macppc/machdep.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c5
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c5
-rw-r--r--sys/arch/mvmeppc/mvmeppc/machdep.c5
-rw-r--r--sys/arch/sparc/sparc/machdep.c5
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c5
-rw-r--r--sys/arch/sun3/sun3/machdep.c5
-rw-r--r--sys/arch/vax/vax/machdep.c5
-rw-r--r--sys/conf/param.c4
-rw-r--r--sys/sys/shm.h6
16 files changed, 64 insertions, 16 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index fca42b84f94..ebc8593097b 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.68 2002/03/14 01:26:26 millert Exp $ */
+/* $OpenBSD: machdep.c,v 1.69 2002/03/23 13:28:33 espie Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -806,6 +806,9 @@ allocsys(v)
(name) = (type *)v; v = (caddr_t)ALIGN((name)+(num))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c
index 431008ce8a2..9a9aeb236d2 100644
--- a/sys/arch/amiga/amiga/machdep.c
+++ b/sys/arch/amiga/amiga/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.68 2002/03/14 20:31:30 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.69 2002/03/23 13:28:33 espie Exp $ */
/* $NetBSD: machdep.c,v 1.95 1997/08/27 18:31:17 is Exp $ */
/*
@@ -363,6 +363,9 @@ again:
#define valloclim(name, type, num, lim) \
(name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 60766640803..55bb0781111 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.80 2002/03/14 20:31:30 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.81 2002/03/23 13:28:33 espie Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -418,6 +418,9 @@ allocsys(v)
(name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index af2503c9ce1..3c675e3e1cd 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.63 2002/03/19 19:03:20 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.64 2002/03/23 13:28:34 espie Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -492,6 +492,9 @@ hppa_init(start)
valloc(buf, struct buf, nbuf);
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 58fe8caa682..47ff4f36063 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.201 2002/03/18 16:04:24 espie Exp $ */
+/* $OpenBSD: machdep.c,v 1.202 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -470,6 +470,9 @@ allocsys(v)
#define valloc(name, type, num) \
v = (caddr_t)(((name) = (type *)v) + (num))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index 846d76a09f7..29dcfd2ce9b 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.96 2002/03/14 03:15:55 millert Exp $ */
+/* $OpenBSD: machdep.c,v 1.97 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -392,6 +392,9 @@ again:
#define valloclim(name, type, num, lim) \
(name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 1300b1b572b..3612e899be8 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.32 2002/03/21 03:02:32 drahn Exp $ */
+/* $OpenBSD: machdep.c,v 1.33 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -634,6 +634,9 @@ allocsys(v)
v = (caddr_t)(((name) = (type *)v) + (num))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 99d6d9ec766..51ba7a72595 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.67 2002/03/14 20:31:31 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.68 2002/03/23 13:28:34 espie Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -291,6 +291,9 @@ again:
#define valloclim(name, type, num, lim) \
(name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 9f261ce0bd9..4b653a3ff25 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.92 2002/03/14 03:15:57 millert Exp $ */
+/* $OpenBSD: machdep.c,v 1.93 2002/03/23 13:28:34 espie Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -705,6 +705,9 @@ allocsys(v)
v = (caddr_t)(((name) = (type *)v) + (num))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c
index 363e09c8e5e..8824de9c06d 100644
--- a/sys/arch/mvmeppc/mvmeppc/machdep.c
+++ b/sys/arch/mvmeppc/mvmeppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.23 2002/03/14 03:15:58 millert Exp $ */
+/* $OpenBSD: machdep.c,v 1.24 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -596,6 +596,9 @@ allocsys(v)
v = (caddr_t)(((name) = (type *)v) + (num))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 936d909d1aa..5ac5fa48048 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.81 2002/03/14 01:26:44 millert Exp $ */
+/* $OpenBSD: machdep.c,v 1.82 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -310,6 +310,9 @@ allocsys(v)
#define valloc(name, type, num) \
v = (caddr_t)(((name) = (type *)v) + (num))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index 7d572de7590..ae6a28e500b 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.39 2002/03/14 03:16:01 millert Exp $ */
+/* $OpenBSD: machdep.c,v 1.40 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -371,6 +371,9 @@ allocsys(caddr_t v)
#define valloc(name, type, num) \
v = (caddr_t)(((name) = (type *)v) + (num))
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/sun3/sun3/machdep.c b/sys/arch/sun3/sun3/machdep.c
index 26ffbcb7ac8..be8280512ff 100644
--- a/sys/arch/sun3/sun3/machdep.c
+++ b/sys/arch/sun3/sun3/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.54 2002/03/14 20:31:31 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.55 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: machdep.c,v 1.77 1996/10/13 03:47:51 christos Exp $ */
/*
@@ -184,6 +184,9 @@ allocsys(v)
{
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index fbd88328bc6..a71e7d1dfb2 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.56 2002/03/14 20:31:31 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.57 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
@@ -788,6 +788,9 @@ allocsys(v)
{
#ifdef SYSVSHM
+ shminfo.shmmax = shmmaxpgs;
+ shminfo.shmall = shmmaxpgs;
+ shminfo.shmseg = shmseg;
VALLOC(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif
#ifdef SYSVSEM
diff --git a/sys/conf/param.c b/sys/conf/param.c
index 91ab5dda828..6cded81a9dd 100644
--- a/sys/conf/param.c
+++ b/sys/conf/param.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.c,v 1.18 2002/02/17 22:59:53 maja Exp $ */
+/* $OpenBSD: param.c,v 1.19 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: param.c,v 1.16 1996/03/12 03:08:40 mrg Exp $ */
/*
@@ -107,6 +107,8 @@ int mcllowat = MCLLOWAT;
int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */
+int shmseg = 8;
+int shmmaxpgs = SHMMAXPGS;
/*
* Values in support of System V compatible shared memory. XXX
*/
diff --git a/sys/sys/shm.h b/sys/sys/shm.h
index 44747a1e16e..55db6b0dda1 100644
--- a/sys/sys/shm.h
+++ b/sys/sys/shm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: shm.h,v 1.12 2002/03/14 01:27:14 millert Exp $ */
+/* $OpenBSD: shm.h,v 1.13 2002/03/23 13:28:34 espie Exp $ */
/* $NetBSD: shm.h,v 1.20 1996/04/09 20:55:35 cgd Exp $ */
/*
@@ -102,6 +102,10 @@ struct shm_sysctl_info {
extern struct shminfo shminfo;
extern struct shmid_ds *shmsegs;
+/* initial values for machdep.c */
+extern int shmseg;
+extern int shmmaxpgs;
+
struct vmspace;
void shminit(void);