Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool pages. So, mb_map wasn't actually being used. Saves around 4MB of kernel virtual address space in a typical configuration. Garbage-collect the related VM_MBUF_SIZE constant.
This commit is contained in:
parent
34f3cd7ce9
commit
567cda0537
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.163 1999/03/24 05:50:51 mrg Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.164 1999/03/26 00:15:04 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -82,7 +82,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.163 1999/03/24 05:50:51 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.164 1999/03/26 00:15:04 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -261,7 +261,6 @@ u_int8_t dec_3000_scsiid[2], dec_3000_scsifast[2];
|
|||
|
||||
struct platform platform;
|
||||
|
||||
u_int32_t vm_mbuf_size = _VM_MBUF_SIZE;
|
||||
u_int32_t vm_kmem_size = _VM_KMEM_SIZE;
|
||||
u_int32_t vm_phys_size = _VM_PHYS_SIZE;
|
||||
|
||||
|
@ -717,7 +716,6 @@ nobootinfo:
|
|||
* It's for booting a GENERIC kernel on a large memory platform.
|
||||
*/
|
||||
if (physmem >= atop(128 * 1024 * 1024)) {
|
||||
vm_mbuf_size <<= 1;
|
||||
vm_kmem_size <<= 3;
|
||||
vm_phys_size <<= 2;
|
||||
}
|
||||
|
@ -1086,10 +1084,11 @@ cpu_startup()
|
|||
VM_PHYS_SIZE, TRUE, FALSE, NULL);
|
||||
|
||||
/*
|
||||
* Finally, allocate mbuf cluster submap.
|
||||
* No need to allocate an mbuf cluster submap. Mbuf clusters
|
||||
* are allocated via the pool allocator, and we use K0SEG to
|
||||
* map those pages.
|
||||
*/
|
||||
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
|
||||
VM_MBUF_SIZE, FALSE, FALSE, NULL);
|
||||
|
||||
/*
|
||||
* Initialize callouts
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.84 1999/03/24 05:50:51 mrg Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.85 1999/03/26 00:15:04 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -155,7 +155,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.84 1999/03/24 05:50:51 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.85 1999/03/26 00:15:04 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -731,7 +731,7 @@ pmap_bootstrap(ptaddr, maxasn, ncpuids)
|
|||
* This should be kept in sync.
|
||||
* We also reserve space for kmem_alloc_pageable() for vm_fork().
|
||||
*/
|
||||
lev3mapsize = (VM_KMEM_SIZE + VM_MBUF_SIZE + VM_PHYS_SIZE +
|
||||
lev3mapsize = (VM_KMEM_SIZE + VM_PHYS_SIZE +
|
||||
nbuf * MAXBSIZE + 16 * NCARGS) / NBPG + 512 +
|
||||
(maxproc * UPAGES);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vmparam.h,v 1.13 1999/01/16 20:04:22 chuck Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.14 1999/03/26 00:15:05 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -144,17 +144,14 @@
|
|||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)ALPHA_K1SEG_END)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define _VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
|
||||
#define _VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define _VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
|
||||
#ifndef _KERNEL
|
||||
#define VM_MBUF_SIZE _VM_MBUF_SIZE
|
||||
#define VM_KMEM_SIZE _VM_KMEM_SIZE
|
||||
#define VM_PHYS_SIZE _VM_PHYS_SIZE
|
||||
#else
|
||||
extern u_int32_t vm_mbuf_size, vm_kmem_size, vm_phys_size;
|
||||
#define VM_MBUF_SIZE vm_mbuf_size
|
||||
extern u_int32_t vm_kmem_size, vm_phys_size;
|
||||
#define VM_KMEM_SIZE vm_kmem_size
|
||||
#define VM_PHYS_SIZE vm_phys_size
|
||||
#endif /* _KERNEL */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vmparam.h,v 1.13 1999/01/18 03:48:34 nisimura Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.14 1999/03/26 00:15:05 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -137,7 +137,6 @@
|
|||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xFFFFC000)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.53 1999/03/24 05:51:05 mrg Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.54 1999/03/26 00:15:05 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -78,7 +78,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.53 1999/03/24 05:51:05 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.54 1999/03/26 00:15:05 thorpej Exp $");
|
||||
|
||||
/*
|
||||
* Manages physical address maps.
|
||||
|
@ -265,7 +265,7 @@ pmap_bootstrap()
|
|||
* Allocate a PTE table for the kernel.
|
||||
* We also reserve space for kmem_alloc_pageable() for vm_fork().
|
||||
*/
|
||||
Sysmapsize = (VM_KMEM_SIZE + VM_MBUF_SIZE + VM_PHYS_SIZE +
|
||||
Sysmapsize = (VM_KMEM_SIZE + VM_PHYS_SIZE +
|
||||
nbuf * MAXBSIZE + 16 * NCARGS) / NBPG;
|
||||
/*
|
||||
* Allocate PTE space space for u-areas (XXX)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.20 1999/03/24 05:51:07 mrg Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.21 1999/03/26 00:15:05 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 1999/03/24 05:51:07 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 1999/03/26 00:15:05 thorpej Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
||||
|
@ -399,10 +399,11 @@ cpu_startup()
|
|||
VM_PHYS_SIZE, TRUE, FALSE, NULL);
|
||||
|
||||
/*
|
||||
* Finally, allocate mbuf cluster submap.
|
||||
* No need to allocate an mbuf cluster submap. Mbuf clusters
|
||||
* are allocated via the pool allocator, and we use KSEG to
|
||||
* map those pages.
|
||||
*/
|
||||
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
|
||||
VM_MBUF_SIZE, FALSE, FALSE, NULL);
|
||||
|
||||
/*
|
||||
* Initialize callouts
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.130 1999/03/25 01:17:53 simonb Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.131 1999/03/26 00:15:05 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.130 1999/03/25 01:17:53 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.131 1999/03/26 00:15:05 thorpej Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
||||
|
@ -590,10 +590,10 @@ cpu_startup()
|
|||
VM_PHYS_SIZE, TRUE, FALSE, NULL);
|
||||
|
||||
/*
|
||||
* Finally, allocate mbuf cluster submap.
|
||||
* No need to allocate an mbuf cluster submap. Mbuf clusters
|
||||
* are allocated via the pool allocator, and we use KSEG to
|
||||
* map those pages.
|
||||
*/
|
||||
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
|
||||
VM_MBUF_SIZE, FALSE, FALSE, NULL);
|
||||
|
||||
/*
|
||||
* Initialize callouts
|
||||
|
|
Loading…
Reference in New Issue