Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Don't bother allocating mb_map on these systems. M...



details:   https://anonhg.NetBSD.org/src/rev/d55bbd10b9f3
branches:  trunk
changeset: 467567:d55bbd10b9f3
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Mar 26 00:15:04 1999 +0000

description:
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.

diffstat:

 sys/arch/alpha/alpha/machdep.c       |  13 ++++++-------
 sys/arch/alpha/alpha/pmap.c          |   6 +++---
 sys/arch/alpha/include/vmparam.h     |   7 ++-----
 sys/arch/mips/include/vmparam.h      |   3 +--
 sys/arch/mips/mips/pmap.c            |   6 +++---
 sys/arch/newsmips/newsmips/machdep.c |  11 ++++++-----
 sys/arch/pmax/pmax/machdep.c         |  10 +++++-----
 7 files changed, 26 insertions(+), 30 deletions(-)

diffs (213 lines):

diff -r ac96377998b9 -r d55bbd10b9f3 sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c    Thu Mar 25 23:20:22 1999 +0000
+++ b/sys/arch/alpha/alpha/machdep.c    Fri Mar 26 00:15:04 1999 +0000
@@ -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 @@
 
 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 @@
         * 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 @@
                                   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
         */
diff -r ac96377998b9 -r d55bbd10b9f3 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c       Thu Mar 25 23:20:22 1999 +0000
+++ b/sys/arch/alpha/alpha/pmap.c       Fri Mar 26 00:15:04 1999 +0000
@@ -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 @@
         * 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);
 
diff -r ac96377998b9 -r d55bbd10b9f3 sys/arch/alpha/include/vmparam.h
--- a/sys/arch/alpha/include/vmparam.h  Thu Mar 25 23:20:22 1999 +0000
+++ b/sys/arch/alpha/include/vmparam.h  Fri Mar 26 00:15:04 1999 +0000
@@ -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 */
diff -r ac96377998b9 -r d55bbd10b9f3 sys/arch/mips/include/vmparam.h
--- a/sys/arch/mips/include/vmparam.h   Thu Mar 25 23:20:22 1999 +0000
+++ b/sys/arch/mips/include/vmparam.h   Fri Mar 26 00:15:04 1999 +0000
@@ -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)
 
diff -r ac96377998b9 -r d55bbd10b9f3 sys/arch/mips/mips/pmap.c
--- a/sys/arch/mips/mips/pmap.c Thu Mar 25 23:20:22 1999 +0000
+++ b/sys/arch/mips/mips/pmap.c Fri Mar 26 00:15:04 1999 +0000
@@ -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 @@
         * 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)
diff -r ac96377998b9 -r d55bbd10b9f3 sys/arch/newsmips/newsmips/machdep.c
--- a/sys/arch/newsmips/newsmips/machdep.c      Thu Mar 25 23:20:22 1999 +0000
+++ b/sys/arch/newsmips/newsmips/machdep.c      Fri Mar 26 00:15:04 1999 +0000
@@ -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 @@
                                   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
         */
diff -r ac96377998b9 -r d55bbd10b9f3 sys/arch/pmax/pmax/machdep.c
--- a/sys/arch/pmax/pmax/machdep.c      Thu Mar 25 23:20:22 1999 +0000
+++ b/sys/arch/pmax/pmax/machdep.c      Fri Mar 26 00:15:04 1999 +0000
@@ -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 @@
                                   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



Home | Main Index | Thread Index | Old Index