freebsd-dev/sys
Bosko Milekic 08442f8a82 Introduce numerous SMP friendly changes to the mbuf allocator. Namely,
introduce a modified allocation mechanism for mbufs and mbuf clusters; one
which can scale under SMP and which offers the possibility of resource
reclamation to be implemented in the future. Notable advantages:

 o Reduce contention for SMP by offering per-CPU pools and locks.
 o Better use of data cache due to per-CPU pools.
 o Much less code cache pollution due to excessively large allocation macros.
 o Framework for `grouping' objects from same page together so as to be able
   to possibly free wired-down pages back to the system if they are no longer
   needed by the network stacks.

 Additional things changed with this addition:

  - Moved some mbuf specific declarations and initializations from
    sys/conf/param.c into mbuf-specific code where they belong.
  - m_getclr() has been renamed to m_get_clrd() because the old name is really
    confusing. m_getclr() HAS been preserved though and is defined to the new
    name. No tree sweep has been done "to change the interface," as the old
    name will continue to be supported and is not depracated. The change was
    merely done because m_getclr() sounds too much like "m_get a cluster."
  - TEMPORARILY disabled mbtypes statistics displaying in netstat(1) and
    systat(1) (see TODO below).
  - Fixed systat(1) to display number of "free mbufs" based on new per-CPU
    stat structures.
  - Fixed netstat(1) to display new per-CPU stats based on sysctl-exported
    per-CPU stat structures. All infos are fetched via sysctl.

 TODO (in order of priority):

  - Re-enable mbtypes statistics in both netstat(1) and systat(1) after
    introducing an SMP friendly way to collect the mbtypes stats under the
    already introduced per-CPU locks (i.e. hopefully don't use atomic() - it
    seems too costly for a mere stat update, especially when other locks are
    already present).
  - Optionally have systat(1) display not only "total free mbufs" but also
    "total free mbufs per CPU pool."
  - Fix minor length-fetching issues in netstat(1) related to recently
    re-enabled option to read mbuf stats from a core file.
  - Move reference counters at least for mbuf clusters into an unused portion
    of the cluster itself, to save space and need to allocate a counter.
  - Look into introducing resource freeing possibly from a kproc.

Reviewed by (in parts): jlemon, jake, silby, terry
Tested by: jlemon (Intel & Alpha), mjacob (Intel & Alpha)
Preliminary performance measurements: jlemon (and me, obviously)
URL: http://people.freebsd.org/~bmilekic/mb_alloc/
2001-06-22 06:35:32 +00:00
..
alpha Clean up some junk. The bogus trapframe on the stack was removed from the 2001-06-16 22:07:32 +00:00
amd64 Initialize mutexes needed early on all in the same place so that the 2001-06-18 19:19:38 +00:00
arm/include Fix style of defines. 2001-06-09 05:21:17 +00:00
boot Remove -DNEW_LINKERSET, it is not used here anymore. This is now native. 2001-06-21 00:08:23 +00:00
cam Fix warnings: 2001-06-15 00:07:27 +00:00
coda Warning fix: coda_fbsd.c:113: warning: unused variable `ret' 2001-06-15 00:02:27 +00:00
compat Bah, back out part of previous commit. I got too carried away. 2001-06-15 08:18:24 +00:00
compile
conf Introduce numerous SMP friendly changes to the mbuf allocator. Namely, 2001-06-22 06:35:32 +00:00
contrib Do only call oltr_stop() if we are not already in OL_STOPPED state. 2001-06-14 15:08:40 +00:00
crypto less warning 2001-06-16 19:32:37 +00:00
ddb With this commit, I hereby pronounce gensetdefs past its use-by date. 2001-06-13 10:58:39 +00:00
dev Move check against CAM_NEW_TRAN_CODE ahead of the file that might include 2001-06-22 01:02:41 +00:00
fs #if 0 out pfs_null() to silence the warning about it not being referenced. 2001-06-15 12:30:46 +00:00
geom Polish error handling with biofinish(). 2001-05-08 09:10:27 +00:00
gnu new (gpl licensed) firmware image for cs4280/cs46xx sound chips 2001-05-30 22:28:30 +00:00
i4b Submitted by: Juha-Matti Liukkonen (Cubical Solutions Ltd) (jml@cubical.fi) 2001-05-25 08:43:30 +00:00
i386 Don't set CONSPEED to the default and deobfuscate the comment. 2001-06-21 19:50:11 +00:00
ia64 oops. prepare_usermode() died in August 2000 in the MI and x86 code. 2001-06-15 09:59:27 +00:00
isa Cosmetics: 2001-06-20 20:21:55 +00:00
isofs/cd9660 - FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION file 2001-05-23 09:42:29 +00:00
kern Introduce numerous SMP friendly changes to the mbuf allocator. Namely, 2001-06-22 06:35:32 +00:00
libkern Make the rcsid and FreeBSD IDs more sane in the wcs* and wmem* files. 2001-05-24 08:47:42 +00:00
modules Implement a loadable module for the oltr Olicom Token Ring driver. I 2001-06-14 15:16:04 +00:00
net Close a race where we were releasing the unit resource at the start 2001-06-20 10:06:28 +00:00
netatalk Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
netatm Silence some warnings 2001-03-20 10:42:49 +00:00
netgraph Fix warning: (int/long mixup in printf) 2001-06-15 07:35:25 +00:00
netinet - Renumber KAME local ICMP types and NDP options numberes beacaues they 2001-06-21 07:08:43 +00:00
netinet6 Add IFT_L2VLAN for supported NDP type. IPv6 over VLAN works now. 2001-06-19 14:48:02 +00:00
netipx Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
netkey Sync with recent KAME. 2001-06-11 12:39:29 +00:00
netnatm Change a couple of M_WAITOKs used in M_PREPEND() to M_TRYWAITs, which 2001-04-05 04:20:48 +00:00
netncp Fix warning: 203: implicit declaration of function `kernel_sysctlbyname' 2001-06-15 07:37:01 +00:00
netns
netsmb Remove bogus include. 2001-06-14 11:05:01 +00:00
nfs Unlock the process returned from pfind() if it does not return NULL. 2001-06-01 01:30:51 +00:00
nfsclient Unlock the process returned from pfind() if it does not return NULL. 2001-06-01 01:30:51 +00:00
nfsserver Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
pc98 Allocate all resources using keyboard controller. 2001-06-17 04:43:28 +00:00
pccard Some people are having problems with insert/eject. Add some debug 2001-06-16 23:26:18 +00:00
pci Change m_devget()'s outdated and unused `offset' argument to actually mean 2001-06-20 19:48:35 +00:00
posix4 o Merge contents of struct pcred into struct ucred. Specifically, add the 2001-05-25 16:59:11 +00:00
powerpc More verbose version of identifycpu() which also contains many more CPU 2001-06-19 13:27:33 +00:00
rpc Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and 2001-03-19 12:50:13 +00:00
svr4
sys Introduce numerous SMP friendly changes to the mbuf allocator. Namely, 2001-06-22 06:35:32 +00:00
tools replace calls to non-existant bail() subroutine with calls to 2001-03-23 11:48:50 +00:00
ufs Fix warning: 2001-06-15 07:44:39 +00:00
vm Introduce numerous SMP friendly changes to the mbuf allocator. Namely, 2001-06-22 06:35:32 +00:00
Makefile