Source-Changes-HG archive

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

[src/trunk]: src/sys Remove separate mb_map. The nmbclusters is computed at b...



details:   https://anonhg.NetBSD.org/src/rev/55fa176a17ec
branches:  trunk
changeset: 751915:55fa176a17ec
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Feb 08 19:02:25 2010 +0000

description:
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.

diffstat:

 sys/arch/acorn26/acorn26/machdep.c         |   5 +-
 sys/arch/acorn26/include/param.h           |  14 +------
 sys/arch/algor/algor/machdep.c             |   5 +-
 sys/arch/alpha/alpha/machdep.c             |   5 +-
 sys/arch/alpha/include/param.h             |  14 +------
 sys/arch/amd64/amd64/machdep.c             |  11 +----
 sys/arch/amd64/include/param.h             |  14 +------
 sys/arch/amiga/amiga/machdep.c             |  12 +-----
 sys/arch/arc/arc/machdep.c                 |   5 +-
 sys/arch/arc/include/param.h               |  14 +------
 sys/arch/arm/arm32/arm32_machdep.c         |  12 +-----
 sys/arch/arm/include/arm32/param.h         |  14 +------
 sys/arch/atari/atari/machdep.c             |  11 +----
 sys/arch/cesfic/cesfic/machdep.c           |  12 +-----
 sys/arch/cesfic/conf/GENERIC               |   4 +-
 sys/arch/cobalt/cobalt/machdep.c           |   5 +-
 sys/arch/evbarm/conf/CP3100                |   3 +-
 sys/arch/evbmips/adm5120/machdep.c         |   5 +-
 sys/arch/evbmips/alchemy/machdep.c         |   5 +-
 sys/arch/evbmips/atheros/machdep.c         |   5 +-
 sys/arch/evbmips/gdium/machdep.c           |   5 +-
 sys/arch/evbmips/malta/machdep.c           |   5 +-
 sys/arch/evbmips/rmixl/machdep.c           |   5 +-
 sys/arch/evbppc/conf/EV64260               |   3 +-
 sys/arch/evbppc/conf/OPENBLOCKS200         |   3 +-
 sys/arch/evbppc/conf/PMPPC                 |   3 +-
 sys/arch/evbppc/conf/VIRTEX_DFC            |   3 +-
 sys/arch/evbppc/conf/VIRTEX_GSRD1          |   3 +-
 sys/arch/evbppc/conf/VIRTEX_GSRD2          |   3 +-
 sys/arch/evbppc/conf/WALNUT                |   3 +-
 sys/arch/evbppc/explora/machdep.c          |   5 +-
 sys/arch/evbppc/obs405/obs405_machdep.c    |   6 +--
 sys/arch/evbppc/virtex/machdep.c           |   5 +-
 sys/arch/evbppc/walnut/machdep.c           |   5 +-
 sys/arch/ews4800mips/ews4800mips/machdep.c |   5 +-
 sys/arch/hp300/conf/GENERIC                |   6 +-
 sys/arch/hp300/conf/INSTALL                |   5 +-
 sys/arch/hp300/hp300/machdep.c             |  12 +-----
 sys/arch/hp700/hp700/machdep.c             |   8 +---
 sys/arch/hpcmips/hpcmips/machdep.c         |   5 +-
 sys/arch/hppa/include/param.h              |   5 +--
 sys/arch/i386/conf/GENERIC_TINY            |   5 +--
 sys/arch/i386/conf/INSTALL_TINY            |   3 +-
 sys/arch/i386/i386/machdep.c               |  11 +----
 sys/arch/i386/include/param.h              |  14 +-----
 sys/arch/ia64/ia64/machdep.c               |   3 +-
 sys/arch/ia64/include/param.h              |  14 +------
 sys/arch/ia64/stand/common/help.common     |   2 +-
 sys/arch/luna68k/include/vmparam.h         |   3 +-
 sys/arch/luna68k/luna68k/machdep.c         |  12 +-----
 sys/arch/m68k/include/param.h              |  14 +------
 sys/arch/mac68k/mac68k/machdep.c           |  11 +----
 sys/arch/mips/include/mips_param.h         |  13 +------
 sys/arch/mipsco/mipsco/machdep.c           |   5 +-
 sys/arch/mvme68k/mvme68k/machdep.c         |  11 +----
 sys/arch/news68k/news68k/machdep.c         |  11 +----
 sys/arch/newsmips/newsmips/machdep.c       |   5 +-
 sys/arch/next68k/next68k/machdep.c         |  12 +-----
 sys/arch/ofppc/conf/GENERIC                |   5 +-
 sys/arch/ofppc/conf/GENERIC.MP             |   5 +-
 sys/arch/pmax/pmax/machdep.c               |   5 +-
 sys/arch/powerpc/include/param.h           |  15 +-------
 sys/arch/powerpc/oea/oea_machdep.c         |  15 +------
 sys/arch/sbmips/sbmips/machdep.c           |   5 +-
 sys/arch/sgimips/sgimips/machdep.c         |   5 +-
 sys/arch/sh3/include/param.h               |  14 +------
 sys/arch/sh3/sh3/sh3_machdep.c             |   5 +-
 sys/arch/shark/conf/GENERIC                |   5 +-
 sys/arch/shark/conf/INSTALL                |   3 +-
 sys/arch/sparc/include/param.h             |  14 +------
 sys/arch/sparc/sparc/machdep.c             |  13 +-----
 sys/arch/sparc64/include/param.h           |  14 +------
 sys/arch/sparc64/sparc64/machdep.c         |  14 +------
 sys/arch/sun2/include/param.h              |   8 +--
 sys/arch/sun2/sun2/machdep.c               |  12 +-----
 sys/arch/sun3/sun3/machdep.c               |  12 +-----
 sys/arch/sun3/sun3x/machdep.c              |  12 +-----
 sys/arch/usermode/dev/cpu.c                |  10 +----
 sys/arch/usermode/usermode/machdep.c       |   5 +-
 sys/arch/vax/include/param.h               |  14 +------
 sys/arch/vax/vax/machdep.c                 |   5 +-
 sys/arch/x68k/x68k/machdep.c               |  12 +-----
 sys/conf/param.c                           |   7 +--
 sys/kern/uipc_mbuf.c                       |  57 +++++++++++++++++++++++------
 sys/netipsec/keysock.c                     |   6 +-
 sys/rump/librump/rumpkern/emul.c           |   5 +-
 sys/uvm/uvm_extern.h                       |   3 +-
 sys/uvm/uvm_km.c                           |   5 +-
 sys/uvm/uvm_map.c                          |   6 +-
 89 files changed, 197 insertions(+), 546 deletions(-)

diffs (truncated from 2616 to 300 lines):

diff -r e28865f37355 -r 55fa176a17ec sys/arch/acorn26/acorn26/machdep.c
--- a/sys/arch/acorn26/acorn26/machdep.c        Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/acorn26/acorn26/machdep.c        Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.32 2009/11/21 20:32:17 rmind Exp $ */
+/* $NetBSD: machdep.c,v 1.33 2010/02/08 19:02:25 joerg Exp $ */
 
 /*-
  * Copyright (c) 1998 Ben Harris
@@ -32,7 +32,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.32 2009/11/21 20:32:17 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.33 2010/02/08 19:02:25 joerg Exp $");
 
 #include <sys/buf.h>
 #include <sys/kernel.h>
@@ -57,7 +57,6 @@
 char cpu_model[] = "Archimedes";
 
 struct vm_map *phys_map = NULL;
-struct vm_map *mb_map = NULL; /* and ever more shall be so */
 
 int waittime = -1;
 
diff -r e28865f37355 -r 55fa176a17ec sys/arch/acorn26/include/param.h
--- a/sys/arch/acorn26/include/param.h  Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/acorn26/include/param.h  Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.3 2009/01/14 23:14:48 bjh21 Exp $  */
+/*     $NetBSD: param.h,v 1.4 2010/02/08 19:02:25 joerg Exp $  */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -58,18 +58,6 @@
 #define MSGBUFSIZE     NBPG            /* default message buffer size */
 #endif
 
-#ifndef NMBCLUSTERS
-#if defined(_KERNEL_OPT)
-#include "opt_gateway.h"
-#endif
-
-#ifdef GATEWAY
-#define        NMBCLUSTERS     512             /* map size, max cluster allocation */
-#else
-#define        NMBCLUSTERS     256             /* map size, max cluster allocation */
-#endif
-#endif
-
 /*
  * Defaults for lower- and upper-bounds for the kmem_map page count.
  * Can be overridden by kernel config options.
diff -r e28865f37355 -r 55fa176a17ec sys/arch/algor/algor/machdep.c
--- a/sys/arch/algor/algor/machdep.c    Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/algor/algor/machdep.c    Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.44 2009/12/14 00:45:59 matt Exp $        */
+/*     $NetBSD: machdep.c,v 1.45 2010/02/08 19:02:25 joerg Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2009/12/14 00:45:59 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2010/02/08 19:02:25 joerg Exp $");
 
 #include "opt_algor_p4032.h"
 #include "opt_algor_p5064.h" 
@@ -187,7 +187,6 @@
 struct cpu_info cpu_info_store;
 
 /* Maps for VM objects. */
-struct vm_map *mb_map = NULL;
 struct vm_map *phys_map = NULL;
 
 int    physmem;                /* # pages of physical memory */
diff -r e28865f37355 -r 55fa176a17ec sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c    Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/alpha/alpha/machdep.c    Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.325 2009/12/10 14:13:48 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.326 2010/02/08 19:02:25 joerg Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.325 2009/12/10 14:13:48 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.326 2010/02/08 19:02:25 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -137,7 +137,6 @@
 
 #include "ksyms.h"
 
-struct vm_map *mb_map = NULL;
 struct vm_map *phys_map = NULL;
 
 void *msgbufaddr;
diff -r e28865f37355 -r 55fa176a17ec sys/arch/alpha/include/param.h
--- a/sys/arch/alpha/include/param.h    Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/alpha/include/param.h    Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.36 2006/08/28 13:43:35 yamt Exp $ */
+/* $NetBSD: param.h,v 1.37 2010/02/08 19:02:25 joerg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -142,18 +142,6 @@
 
 #define        MCLBYTES        (1 << MCLSHIFT) /* size of a m_buf cluster */
 
-#ifndef NMBCLUSTERS
-#if defined(_KERNEL_OPT)
-#include "opt_gateway.h"
-#endif
-
-#ifdef GATEWAY
-#define        NMBCLUSTERS     4096            /* map size, max cluster allocation */
-#else
-#define        NMBCLUSTERS     2048            /* map size, max cluster allocation */
-#endif
-#endif
-
 /*
  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
  * logical pages.
diff -r e28865f37355 -r 55fa176a17ec sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.141 2009/12/31 01:11:28 jym Exp $        */
+/*     $NetBSD: machdep.c,v 1.142 2010/02/08 19:02:26 joerg Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.141 2009/12/31 01:11:28 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.142 2010/02/08 19:02:26 joerg Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -256,7 +256,6 @@
 extern struct vm_map *module_map;
 vaddr_t kern_end;
 
-struct vm_map *mb_map = NULL;
 struct vm_map *phys_map = NULL;
 
 extern paddr_t avail_start, avail_end;
@@ -341,12 +340,6 @@
        phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
                                   VM_PHYS_SIZE, 0, false, NULL);
 
-       /*
-        * Finally, allocate mbuf cluster submap.
-        */
-       mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
-           nmbclusters * mclbytes, VM_MAP_INTRSAFE, false, NULL);
-
        uvm_map_setup_kernel(&module_map_store, module_start, module_end, 0);
        module_map_store.vmk_map.pmap = pmap_kernel();
        module_map = &module_map_store.vmk_map;
diff -r e28865f37355 -r 55fa176a17ec sys/arch/amd64/include/param.h
--- a/sys/arch/amd64/include/param.h    Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/amd64/include/param.h    Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.12 2009/11/11 23:59:36 haad Exp $  */
+/*     $NetBSD: param.h,v 1.13 2010/02/08 19:02:26 joerg Exp $ */
 
 #ifdef __x86_64__
 
@@ -86,18 +86,6 @@
 
 #define        MCLBYTES        (1 << MCLSHIFT) /* size of a m_buf cluster */
 
-#ifndef NMBCLUSTERS
-#if defined(_KERNEL_OPT)
-#include "opt_gateway.h"
-#endif
-
-#ifdef GATEWAY
-#define        NMBCLUSTERS     4096            /* map size, max cluster allocation */
-#else
-#define        NMBCLUSTERS     2048            /* map size, max cluster allocation */
-#endif
-#endif
-
 #ifndef NFS_RSIZE
 #define NFS_RSIZE       32768
 #endif
diff -r e28865f37355 -r 55fa176a17ec sys/arch/amiga/amiga/machdep.c
--- a/sys/arch/amiga/amiga/machdep.c    Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/amiga/amiga/machdep.c    Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.224 2009/12/10 14:13:49 matt Exp $       */
+/*     $NetBSD: machdep.c,v 1.225 2010/02/08 19:02:26 joerg Exp $      */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -86,7 +86,7 @@
 #include "opt_panicbutton.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.224 2009/12/10 14:13:49 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.225 2010/02/08 19:02:26 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -163,7 +163,6 @@
 
 volatile unsigned int interrupt_depth = 0;
 
-struct vm_map *mb_map = NULL;
 struct vm_map *phys_map = NULL;
 
 void * msgbufaddr;
@@ -291,13 +290,6 @@
        phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
                                   VM_PHYS_SIZE, 0, false, NULL);
 
-       /*
-        * Finally, allocate mbuf cluster submap.
-        */
-       mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
-                                nmbclusters * mclbytes, VM_MAP_INTRSAFE,
-                                false, NULL);
-
 #ifdef DEBUG
        pmapdebug = opmapdebug;
 #endif
diff -r e28865f37355 -r 55fa176a17ec sys/arch/arc/arc/machdep.c
--- a/sys/arch/arc/arc/machdep.c        Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/arc/arc/machdep.c        Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.119 2009/12/16 23:19:06 matt Exp $       */
+/*     $NetBSD: machdep.c,v 1.120 2010/02/08 19:02:26 joerg Exp $      */
 /*     $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $   */
 
 /*
@@ -78,7 +78,7 @@
 /* from: Utah Hdr: machdep.c 1.63 91/04/24 */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.119 2009/12/16 23:19:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.120 2010/02/08 19:02:26 joerg Exp $");
 
 #include "fs_mfs.h"
 #include "opt_ddb.h"
@@ -167,7 +167,6 @@
 struct cpu_info cpu_info_store;
 
 /* maps for VM objects */
-struct vm_map *mb_map = NULL;
 struct vm_map *phys_map = NULL;
 
 int    maxmem;                 /* max memory per process */
diff -r e28865f37355 -r 55fa176a17ec sys/arch/arc/include/param.h
--- a/sys/arch/arc/include/param.h      Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/arc/include/param.h      Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.25 2009/08/13 05:15:08 matt Exp $  */
+/*     $NetBSD: param.h,v 1.26 2010/02/08 19:02:26 joerg Exp $ */
 /*      $OpenBSD: param.h,v 1.9 1997/04/30 09:54:15 niklas Exp $ */
 
 /*
@@ -132,18 +132,6 @@
 
 #define        MCLBYTES        (1 << MCLSHIFT) /* size of a m_buf cluster */
 
-#ifndef NMBCLUSTERS
-#if defined(_KERNEL_OPT)
-#include "opt_gateway.h"
-#endif
-
-#ifdef GATEWAY
-#define        NMBCLUSTERS     2048            /* map size, max cluster allocation */
-#else
-#define        NMBCLUSTERS     1024            /* map size, max cluster allocation */
-#endif
-#endif
-
 /* bytes to disk blocks */
 #define        btodb(x)        ((x) >> DEV_BSHIFT)
 #define dbtob(x)       ((x) << DEV_BSHIFT)
diff -r e28865f37355 -r 55fa176a17ec sys/arch/arm/arm32/arm32_machdep.c
--- a/sys/arch/arm/arm32/arm32_machdep.c        Mon Feb 08 17:59:06 2010 +0000
+++ b/sys/arch/arm/arm32/arm32_machdep.c        Mon Feb 08 19:02:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arm32_machdep.c,v 1.72 2010/01/18 23:04:30 jmmv Exp $  */



Home | Main Index | Thread Index | Old Index