summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-08-11 19:17:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-08-11 19:17:18 +0000
commit45443497d1b1837b0f507d85565636f50fa5cecf (patch)
treee668bde68e4fb4b463aba3fd31dd16875bb9ddb7
parent71991877bea22a82789b29c8995baf0589fd2be4 (diff)
Do not bother initializing bufpages in the md code if the computation is
exactly the same the mi could will use if bufinit() is invoked with bufpages == 0.
-rw-r--r--sys/arch/alpha/alpha/machdep.c9
-rw-r--r--sys/arch/amd64/amd64/machdep.c9
-rw-r--r--sys/arch/arm/arm/arm32_machdep.c15
-rw-r--r--sys/arch/aviion/aviion/machdep.c9
-rw-r--r--sys/arch/hp300/hp300/machdep.c9
-rw-r--r--sys/arch/hppa/hppa/machdep.c9
-rw-r--r--sys/arch/hppa64/hppa64/machdep.c9
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c9
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c9
-rw-r--r--sys/arch/macppc/macppc/machdep.c9
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c9
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c9
-rw-r--r--sys/arch/mvmeppc/mvmeppc/machdep.c9
-rw-r--r--sys/arch/sgi/sgi/machdep.c9
-rw-r--r--sys/arch/sh/sh/sh_machdep.c15
-rw-r--r--sys/arch/socppc/socppc/machdep.c9
-rw-r--r--sys/arch/solbourne/solbourne/machdep.c9
-rw-r--r--sys/arch/sparc/sparc/machdep.c9
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c9
-rw-r--r--sys/arch/vax/vax/machdep.c9
20 files changed, 20 insertions, 172 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 080c1fd9a72..57460e66997 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.119 2009/08/11 18:46:30 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.120 2009/08/11 19:17:14 miod Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -825,13 +825,6 @@ cpu_startup()
}
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index e3802e15839..d747347d756 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.100 2009/08/11 18:46:31 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.101 2009/08/11 19:17:16 miod Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -307,13 +307,6 @@ cpu_startup(void)
ptoa((psize_t)physmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/arm/arm/arm32_machdep.c b/sys/arch/arm/arm/arm32_machdep.c
index bf035342094..21387977306 100644
--- a/sys/arch/arm/arm/arm32_machdep.c
+++ b/sys/arch/arm/arm/arm32_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arm32_machdep.c,v 1.31 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: arm32_machdep.c,v 1.32 2009/08/11 19:17:16 miod Exp $ */
/* $NetBSD: arm32_machdep.c,v 1.42 2003/12/30 12:33:15 pk Exp $ */
/*
@@ -286,19 +286,6 @@ cpu_startup()
ptoa(physmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /* Restrict to at most 25% filled kvm */
- if (bufpages >
- (VM_MAX_KERNEL_ADDRESS-VM_MIN_KERNEL_ADDRESS) / PAGE_SIZE / 4)
- bufpages = (VM_MAX_KERNEL_ADDRESS-VM_MIN_KERNEL_ADDRESS) /
- PAGE_SIZE / 4;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c
index b0897a57c4e..85572c37a19 100644
--- a/sys/arch/aviion/aviion/machdep.c
+++ b/sys/arch/aviion/aviion/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.32 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.33 2009/08/11 19:17:16 miod Exp $ */
/*
* Copyright (c) 2007 Miodrag Vallat.
*
@@ -271,13 +271,6 @@ cpu_startup()
platform->startup();
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 7b633b7f487..9e7f020213f 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.125 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.126 2009/08/11 19:17:16 miod Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -268,13 +268,6 @@ cpu_startup()
ptoa(physmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index a8d372255c8..a20d756dede 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.177 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.178 2009/08/11 19:17:16 miod Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -629,13 +629,6 @@ cpu_startup(void)
printf("rsvd mem = %u (%uKB)\n", ptoa(resvmem), ptoa(resvmem) / 1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c
index efab3f596b9..70cd7295598 100644
--- a/sys/arch/hppa64/hppa64/machdep.c
+++ b/sys/arch/hppa64/hppa64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.18 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.19 2009/08/11 19:17:16 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -380,13 +380,6 @@ cpu_startup(void)
ptoa((psize_t)phsymem) / 1024 / 1024);
printf("rsvd mem = %u (%uKB)\n", ptoa(resvmem), ptoa(resvmem) / 1024);
- /*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
printf("here3\n");
/*
* Allocate a submap for exec arguments. This map effectively
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index 2726d4fa5bc..6565aa6bdf1 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.67 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.68 2009/08/11 19:17:16 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -448,13 +448,6 @@ cpu_startup()
panic("obiova %lx: OBIO not free", obiova);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index 8097b84fcec..384485b82aa 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.152 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.153 2009/08/11 19:17:16 miod Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -397,13 +397,6 @@ cpu_startup(void)
ptoa(physmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 40a9a9e172f..1698a7b296a 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.112 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.113 2009/08/11 19:17:16 miod Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -486,13 +486,6 @@ cpu_startup()
ptoa(physmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 1c3282c1afd..c61381d1a69 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.119 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.120 2009/08/11 19:17:16 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -243,13 +243,6 @@ cpu_startup()
ptoa(physmem) / 1024 / 1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 13f790cd9ba..9ae417ec3e5 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.234 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.235 2009/08/11 19:17:16 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -382,13 +382,6 @@ cpu_startup()
}
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c
index c5685002d6a..a998b943d4a 100644
--- a/sys/arch/mvmeppc/mvmeppc/machdep.c
+++ b/sys/arch/mvmeppc/mvmeppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.61 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.62 2009/08/11 19:17:17 miod Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -392,13 +392,6 @@ cpu_startup()
ptoa(physmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 58bb0da8d5a..103754b6eba 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.80 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.81 2009/08/11 19:17:17 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -718,13 +718,6 @@ cpu_startup()
ptoa(rsvdmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/sh/sh/sh_machdep.c b/sys/arch/sh/sh/sh_machdep.c
index b6e19c2b170..9ab193ef8b4 100644
--- a/sys/arch/sh/sh/sh_machdep.c
+++ b/sys/arch/sh/sh/sh_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sh_machdep.c,v 1.25 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: sh_machdep.c,v 1.26 2009/08/11 19:17:17 miod Exp $ */
/* $NetBSD: sh3_machdep.c,v 1.59 2006/03/04 01:13:36 uwe Exp $ */
/*
@@ -279,19 +279,6 @@ sh_startup()
ptoa(physmem) / 1024 / 1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /* Restrict to at most 25% filled kvm */
- if (bufpages >
- (VM_MAX_KERNEL_ADDRESS-VM_MIN_KERNEL_ADDRESS) / PAGE_SIZE / 4)
- bufpages = (VM_MAX_KERNEL_ADDRESS-VM_MIN_KERNEL_ADDRESS) /
- PAGE_SIZE / 4;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c
index f1477e0ad49..e6001152602 100644
--- a/sys/arch/socppc/socppc/machdep.c
+++ b/sys/arch/socppc/socppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.17 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.18 2009/08/11 19:17:17 miod Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -749,13 +749,6 @@ cpu_startup()
ptoa(physmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c
index 48518fdb19d..92ed8df10e6 100644
--- a/sys/arch/solbourne/solbourne/machdep.c
+++ b/sys/arch/solbourne/solbourne/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.13 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.14 2009/08/11 19:17:17 miod Exp $ */
/* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */
/*
@@ -166,13 +166,6 @@ cpu_startup()
ptoa(physmem) / 1024 / 1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 5e0b5825ecf..3aba61d12dc 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.122 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.123 2009/08/11 19:17:17 miod Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -180,13 +180,6 @@ cpu_startup()
ptoa(physmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index cad2d0aff64..31454c8661d 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.120 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.121 2009/08/11 19:17:17 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -238,13 +238,6 @@ cpu_startup()
ptoa((psize_t)physmem)/1024/1024);
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively
* limits the number of processes exec'ing at any time.
*/
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index 5fccc2bec91..41e272548d5 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.105 2009/08/11 18:46:32 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.106 2009/08/11 19:17:17 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
@@ -187,13 +187,6 @@ cpu_startup()
spl0();
/*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-
- /*
* Allocate a submap for exec arguments. This map effectively limits
* the number of processes exec'ing at any time.
*/