freebsd-dev/sys/conf
Bosko Milekic 099a0e588c Bring in mbuma to replace mballoc.
mbuma is an Mbuf & Cluster allocator built on top of a number of
extensions to the UMA framework, all included herein.

Extensions to UMA worth noting:
  - Better layering between slab <-> zone caches; introduce
    Keg structure which splits off slab cache away from the
    zone structure and allows multiple zones to be stacked
    on top of a single Keg (single type of slab cache);
    perhaps we should look into defining a subset API on
    top of the Keg for special use by malloc(9),
    for example.
  - UMA_ZONE_REFCNT zones can now be added, and reference
    counters automagically allocated for them within the end
    of the associated slab structures.  uma_find_refcnt()
    does a kextract to fetch the slab struct reference from
    the underlying page, and lookup the corresponding refcnt.

mbuma things worth noting:
  - integrates mbuf & cluster allocations with extended UMA
    and provides caches for commonly-allocated items; defines
    several zones (two primary, one secondary) and two kegs.
  - change up certain code paths that always used to do:
    m_get() + m_clget() to instead just use m_getcl() and
    try to take advantage of the newly defined secondary
    Packet zone.
  - netstat(1) and systat(1) quickly hacked up to do basic
    stat reporting but additional stats work needs to be
    done once some other details within UMA have been taken
    care of and it becomes clearer to how stats will work
    within the modified framework.

From the user perspective, one implication is that the
NMBCLUSTERS compile-time option is no longer used.  The
maximum number of clusters is still capped off according
to maxusers, but it can be made unlimited by setting
the kern.ipc.nmbclusters boot-time tunable to zero.
Work should be done to write an appropriate sysctl
handler allowing dynamic tuning of kern.ipc.nmbclusters
at runtime.

Additional things worth noting/known issues (READ):
   - One report of 'ips' (ServeRAID) driver acting really
     slow in conjunction with mbuma.  Need more data.
     Latest report is that ips is equally sucking with
     and without mbuma.
   - Giant leak in NFS code sometimes occurs, can't
     reproduce but currently analyzing; brueffer is
     able to reproduce but THIS IS NOT an mbuma-specific
     problem and currently occurs even WITHOUT mbuma.
   - Issues in network locking: there is at least one
     code path in the rip code where one or more locks
     are acquired and we end up in m_prepend() with
     M_WAITOK, which causes WITNESS to whine from within
     UMA.  Current temporary solution: force all UMA
     allocations to be M_NOWAIT from within UMA for now
     to avoid deadlocks unless WITNESS is defined and we
     can determine with certainty that we're not holding
     any locks when we're M_WAITOK.
   - I've seen at least one weird socketbuffer empty-but-
     mbuf-still-attached panic.  I don't believe this
     to be related to mbuma but please keep your eyes
     open, turn on debugging, and capture crash dumps.

This change removes more code than it adds.

A paper is available detailing the change and considering
various performance issues, it was presented at BSDCan2004:
http://www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf
Please read the paper for Future Work and implementation
details, as well as credits.

Testing and Debugging:
    rwatson,
    brueffer,
    Ketrien I. Saihr-Kesenchedra,
    ...
Reviewed by: Lots of people (for different parts)
2004-05-31 21:46:06 +00:00
..
defines
files Bring in mbuma to replace mballoc. 2004-05-31 21:46:06 +00:00
files.alpha Move fdc from isa/fd.c to dev/fdc/fdc.c. The old files were 2004-05-17 05:46:16 +00:00
files.amd64 Fixed profiling of trap, syscall and interrupt handlers and some 2004-05-24 12:08:56 +00:00
files.arm Remove libkern/mem* 2004-05-14 23:42:54 +00:00
files.i386 MFamd64: 2004-05-26 07:43:41 +00:00
files.ia64 o De-support fdc(4). No ia64 has ever been made with PC floppy and 2004-05-17 06:51:19 +00:00
files.pc98 MFi386: revision 1.493. 2004-05-26 13:10:37 +00:00
files.powerpc Add an implementation of uiomove_fromphys() for PowerPC. This 2004-03-23 18:26:03 +00:00
files.sparc64 - Remove the old sparc64 OFW PCI code (as opposed to the former 2004-05-08 13:53:47 +00:00
kern.mk Define INLINE_LIMIT for arm. 2004-05-14 13:35:46 +00:00
kern.post.mk Add pccarddevs.h and usbdevs.h as depends, ala miidevs.h, in the right 2004-05-26 16:31:41 +00:00
kern.pre.mk Address few style issues pointed out by bde 2004-04-27 16:38:15 +00:00
kmod_syms.awk Our awk does not implement the ARGIND variable, so we were attempting 2002-08-06 19:31:04 +00:00
kmod.mk Move to generating pccarddevs.h on the fly, both for the kernel and 2004-05-26 00:53:10 +00:00
ldscript.alpha Don't override the standard SYSTEM_LD setting from kern.pre.mk. 2004-02-13 12:28:53 +00:00
ldscript.amd64 Provide the _start_ctors and _stop_ctors symbols. As on i386, the addresses 2004-05-29 01:09:00 +00:00
ldscript.arm Add config magic for arm. 2004-05-14 11:49:40 +00:00
ldscript.i386 Align the .ctors section correctly. 2003-12-03 07:40:03 +00:00
ldscript.ia64 Load the kernel at a 64M instead of 5M. The advantage of this is that 2003-09-06 05:15:36 +00:00
ldscript.powerpc Page align the data segment. 2001-10-08 10:43:34 +00:00
ldscript.sparc64 Use the same SEARCH_DIR as other platforms. 2003-06-07 18:23:50 +00:00
majors 1. Spell Cronyx Sigma-ISA and Cronyx Tau-ISA correctly. 2004-05-05 13:09:11 +00:00
majors.awk Add necessary awk magic to create a table of major numbers allocated 2003-02-27 08:52:11 +00:00
Makefile.alpha Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.amd64 Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.arm Add config magic for arm. 2004-05-14 11:49:40 +00:00
Makefile.i386 Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.ia64 Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.pc98 Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.powerpc Change required config(8) version. 2004-05-09 22:29:38 +00:00
Makefile.sparc64 Change required config(8) version. 2004-05-09 22:29:38 +00:00
makeLINT.mk Implemented "nooption" and "nomakeoption" config(8) tokens. 2003-02-26 23:36:59 +00:00
makeLINT.sed Implemented "nooption" and "nomakeoption" config(8) tokens. 2003-02-26 23:36:59 +00:00
newvers.sh Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
NOTES - Connect geom(8) and its libraries to the build. 2004-05-20 10:37:13 +00:00
options - Connect geom(8) and its libraries to the build. 2004-05-20 10:37:13 +00:00
options.alpha Add option NO_SIO to work-around the hardcoded dependency on sio(4). 2003-08-25 03:43:08 +00:00
options.amd64 MFp4: comment out options that don't exist so that they cannot be 2004-03-13 22:16:34 +00:00
options.arm Add config magic for arm. 2004-05-14 11:49:40 +00:00
options.i386 Remove isa compat stuff. 2004-03-14 23:03:57 +00:00
options.ia64 Add LOG2_ID_PAGE_SIZE to the mix of options on ia64. 2003-09-09 18:30:20 +00:00
options.pc98 MFi386: Add NETGRAPH_CRONYX. 2004-05-18 11:56:24 +00:00
options.powerpc Add required GFB options as well as one for ofw/syscons. 2004-01-21 05:20:58 +00:00
options.sparc64 - Remove the old sparc64 OFW PCI code (as opposed to the former 2004-05-08 13:53:47 +00:00
systags.sh Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00