Deleted Added
full compact
machdep.c (879) machdep.c (911)
1/*-
2 * Copyright (c) 1992 Terrence R. Lambert.
3 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * William Jolitz.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
1/*-
2 * Copyright (c) 1992 Terrence R. Lambert.
3 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * William Jolitz.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
38 * $Id: machdep.c,v 1.21 1993/12/12 12:22:56 davidg Exp $
38 * $Id: machdep.c,v 1.22 1993/12/19 00:50:03 wollman Exp $
39 */
40
41#include "npx.h"
42#include "isa.h"
43
44#include <stddef.h>
45#include "param.h"
46#include "systm.h"

--- 159 unchanged lines hidden (view full) ---

206#endif
207 /*
208 * Determine how many buffers to allocate.
209 * Use 20% of memory of memory beyond the first 2MB
210 * Insure a minimum of 16 fs buffers.
211 * We allocate 1/2 as many swap buffer headers as file i/o buffers.
212 */
213 if (bufpages == 0)
39 */
40
41#include "npx.h"
42#include "isa.h"
43
44#include <stddef.h>
45#include "param.h"
46#include "systm.h"

--- 159 unchanged lines hidden (view full) ---

206#endif
207 /*
208 * Determine how many buffers to allocate.
209 * Use 20% of memory of memory beyond the first 2MB
210 * Insure a minimum of 16 fs buffers.
211 * We allocate 1/2 as many swap buffer headers as file i/o buffers.
212 */
213 if (bufpages == 0)
214 bufpages = ((physmem << PGSHIFT) - 3072*1024) / NBPG / 5;
215 if (bufpages < 32)
216 bufpages = 32;
214 bufpages = ((physmem << PGSHIFT) - 2048*1024) / NBPG / 5;
215 if (bufpages < 64)
216 bufpages = 64;
217
218 /*
219 * We must still limit the maximum number of buffers to be no
220 * more than 2/5's of the size of the kernal malloc region, this
221 * will only take effect for machines with lots of memory
222 */
223 bufpages = min(bufpages, (VM_KMEM_SIZE / NBPG) * 2 / 5);
224 if (nbuf == 0) {
225 nbuf = bufpages / 2;
217
218 /*
219 * We must still limit the maximum number of buffers to be no
220 * more than 2/5's of the size of the kernal malloc region, this
221 * will only take effect for machines with lots of memory
222 */
223 bufpages = min(bufpages, (VM_KMEM_SIZE / NBPG) * 2 / 5);
224 if (nbuf == 0) {
225 nbuf = bufpages / 2;
226 if (nbuf < 16)
227 nbuf = 16;
226 if (nbuf < 32)
227 nbuf = 32;
228 }
229 freebufspace = bufpages * NBPG;
230 if (nswbuf == 0) {
231 nswbuf = (nbuf / 2) &~ 1; /* force even */
232 if (nswbuf > 256)
233 nswbuf = 256; /* sanity */
234 }
235 valloc(swbuf, struct buf, nswbuf);

--- 1267 unchanged lines hidden ---
228 }
229 freebufspace = bufpages * NBPG;
230 if (nswbuf == 0) {
231 nswbuf = (nbuf / 2) &~ 1; /* force even */
232 if (nswbuf > 256)
233 nswbuf = 256; /* sanity */
234 }
235 valloc(swbuf, struct buf, nswbuf);

--- 1267 unchanged lines hidden ---