Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Remove mclpool_allocator, which is unnecessary sinc...



details:   https://anonhg.NetBSD.org/src/rev/01abf5f46f8f
branches:  trunk
changeset: 754006:01abf5f46f8f
user:      rmind <rmind%NetBSD.org@localhost>
date:      Fri Apr 16 02:57:15 2010 +0000

description:
Remove mclpool_allocator, which is unnecessary since mb_map removal.

diffstat:

 sys/kern/uipc_mbuf.c |  34 ++++------------------------------
 1 files changed, 4 insertions(+), 30 deletions(-)

diffs (77 lines):

diff -r e4b47bf2173b -r 01abf5f46f8f sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Fri Apr 16 01:52:54 2010 +0000
+++ b/sys/kern/uipc_mbuf.c      Fri Apr 16 02:57:15 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf.c,v 1.134 2010/02/08 22:55:36 joerg Exp $    */
+/*     $NetBSD: uipc_mbuf.c,v 1.135 2010/04/16 02:57:15 rmind Exp $    */
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.134 2010/02/08 22:55:36 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.135 2010/04/16 02:57:15 rmind Exp $");
 
 #include "opt_mbuftrace.h"
 #include "opt_nmbclusters.h"
@@ -100,18 +100,10 @@
 
 static int mb_ctor(void *, void *, int);
 
-static void    *mclpool_alloc(struct pool *, int);
-static void    mclpool_release(struct pool *, void *);
-
 static void    sysctl_kern_mbuf_setup(void);
 
 static struct sysctllog *mbuf_sysctllog;
 
-static struct pool_allocator mclpool_allocator = {
-       .pa_alloc = mclpool_alloc,
-       .pa_free = mclpool_release,
-};
-
 static struct mbuf *m_copym0(struct mbuf *, int, int, int, int);
 static struct mbuf *m_split0(struct mbuf *, int, int, int);
 static int m_copyback0(struct mbuf **, int, int, const void *, int, int);
@@ -192,14 +184,12 @@
 
        sysctl_kern_mbuf_setup();
 
-       mclpool_allocator.pa_backingmap = kmem_map;
-
        mb_cache = pool_cache_init(msize, 0, 0, 0, "mbpl",
            NULL, IPL_VM, mb_ctor, NULL, NULL);
        KASSERT(mb_cache != NULL);
 
-       mcl_cache = pool_cache_init(mclbytes, 0, 0, 0, "mclpl",
-           &mclpool_allocator, IPL_VM, NULL, NULL, NULL);
+       mcl_cache = pool_cache_init(mclbytes, 0, 0, 0, "mclpl", NULL,
+           IPL_VM, NULL, NULL, NULL);
        KASSERT(mcl_cache != NULL);
 
        pool_cache_set_drain_hook(mb_cache, m_reclaim, NULL);
@@ -459,22 +449,6 @@
 #endif /* MBUFTRACE */
 }
 
-static void *
-mclpool_alloc(struct pool *pp, int flags)
-{
-       bool waitok = (flags & PR_WAITOK) ? true : false;
-
-       return ((void *)uvm_km_alloc_poolpage(kmem_map, waitok));
-}
-
-static void
-mclpool_release(struct pool *pp, void *v)
-{
-
-       uvm_km_free_poolpage(kmem_map, (vaddr_t)v);
-}
-
-/*ARGSUSED*/
 static int
 mb_ctor(void *arg, void *object, int flags)
 {



Home | Main Index | Thread Index | Old Index