Get rid of mb_map. Retool the mbuf and mbuf cluster allocator to use
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 31 Jul 2004 07:52:58 +0000 (07:52 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 31 Jul 2004 07:52:58 +0000 (07:52 +0000)
commit90775e29f77ba4b453af94f9fd97bdecda0ed0a6
tree6ceb497536239dfbed8e4b5a67388becf1c4b955
parent013a4c0e754af3f1a4ef58517e56a30c2df63f66
Get rid of mb_map.  Retool the mbuf and mbuf cluster allocator to use
malloc() (our slab allocator).  Get rid of the NULL callback function for
M_EXT buffers, assign real functions for standard M_EXT buffers and add
a new flag M_EXT_CLUSTER to tell the mbuf code when an M_EXT buffer is
under management by the mbuf cluster allocator.  Get rid of the address
calculations and the char array ref count that used to exist for mbuf
clusters.  Replace with a meta-data structure to keep track of ref
counts.  Note that the new cluster code uses the new M_EXT mechanism.

Increase the default mbuf+cluster pool from 10 to 20.  Add sysctl's to
set the mbuf and mbuf cluster free-pool maximums (kern.ipc.mcl_free_max and
kern.ipc.mbuf_free_max), beyond which mbuf and mbuf cluster memory is
returned to the system.
13 files changed:
sys/dev/atm/en/midway.c
sys/i386/i386/machdep.c
sys/kern/uipc_mbuf.c
sys/kern/uipc_mbuf2.c
sys/net/sl/if_sl.c
sys/netinet6/ipsec.c
sys/netproto/ipx/spx_usrreq.c
sys/netproto/ns/spp_usrreq.c
sys/platform/pc32/i386/machdep.c
sys/sys/mbuf.h
sys/vm/vm_kern.c
sys/vm/vm_kern.h
sys/vm/vm_object.c