1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
freebsd/usr.bin
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
..
alias
apply
asa
at
atm Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
awk
banner
basename
biff
bluetooth Clean up language and markup. 2004-05-19 10:45:40 +00:00
brandelf
bzip2 /rescue/b{,un}zip exists, so build this dynamically now. 2003-11-17 05:19:37 +00:00
bzip2recover
c89
c99 Update URL of GCC status page to GCC 3.3 2004-03-04 20:29:27 +00:00
calendar Include <sys/uio.h> for the complete type of struct iovec. 2004-05-28 17:41:36 +00:00
cap_mkdb
catman
chat Rename logf --> chat_logf to avoid naming conflicts 2003-10-31 06:22:03 +00:00
checknr
chkey Put chkey(1), newkey(8), and keyserv(8) into the crypto distribution. 2004-01-18 09:29:47 +00:00
chpass Typo fix. 2004-03-03 09:15:07 +00:00
cksum
cmp
col
colcrt
colldef Markup nits. 2004-05-19 09:45:46 +00:00
colrm
column
comm
compile_et
compress
csplit Use fseeko() to properly support large files. 2004-03-22 11:15:03 +00:00
ctags It was pointed out[0] that ctags(1) uses some potentially dangerous 2004-05-07 19:44:40 +00:00
cut
dig
dirname
dnskeygen
dnsquery
du Use humanize_number(3) to format sizes into a human readable form. 2004-05-24 22:22:29 +00:00
ee
elf2aout
elfdump Elf_Phdr.p_type 7 is "PT_TLS". 2004-03-02 14:06:27 +00:00
enigma Bump the .Dd value. 2004-05-14 19:29:39 +00:00
env Language and markup polishing. 2004-05-19 10:44:24 +00:00
expand
false
fetch Fix integer overflow in the file size output when dealing with 2004-05-19 11:07:30 +00:00
file Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
file2c
find - introduce a new primary `-depth n', which tests whether 2004-05-28 17:17:15 +00:00
finger Remove spurious semicolons. Outside of functions they are actually errors but 2004-05-16 22:08:17 +00:00
fmt
fold
from
fstat Correct the description of the -N option. 2004-03-26 10:48:35 +00:00
fsync
ftp Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
gcore Fix some WARNS: 2004-02-15 22:48:25 +00:00
gencat
getconf
getopt
gprof Include <string.h> for prototypes of various string functions. 2004-05-24 12:44:00 +00:00
head
hesinfo
hexdump
host
id Add missing %s so that all of the usage message gets printed. 2004-05-19 21:06:36 +00:00
indent Fixed document date. 2004-05-19 09:49:54 +00:00
ipcrm
ipcs Added -u to the SYNOPSIS. 2004-05-18 20:40:37 +00:00
join
jot
kdump Bump document date on behalf of the -E option. 2004-05-18 20:42:36 +00:00
keylogin
keylogout Removed unnecessary dependencies on librpcsvc. 2004-02-04 11:59:08 +00:00
killall Bump document date on behalf of the -e option. 2004-05-18 20:45:32 +00:00
ktrace
ktrdump Add a "-r" flag to ktrdump(1) to print relative timestamps when used 2004-05-22 08:26:10 +00:00
lam
last Include timeconv.h for _int_to_time and _time_to_int. 2004-02-15 21:52:59 +00:00
lastcomm Remove unneeded lseek(2) hack to position past the 2GB point, 2004-05-20 19:25:27 +00:00
ldd Fix a few WARNS: 2004-02-15 22:01:23 +00:00
leave
less Restore old value of LESSKEYFILE_SYS. 2004-04-17 07:48:21 +00:00
lessecho
lesskey
lex Replace <iostream.h> with <iostream> to remove annoying warning 2004-03-11 10:43:35 +00:00
limits
locale Clean up language and markup. 2004-05-19 10:45:40 +00:00
locate
lock Two fixes here: 2004-01-22 04:24:15 +00:00
lockf
logger
login Fixed style bugs in previous commit (.ifndef instead of .if defined(), 2004-02-29 06:39:11 +00:00
logins Fix markup. 2004-03-06 23:36:41 +00:00
logname
look
lorder
lsvfs
m4 Don't depend on NULL's expansion being a pointer, cast it before it is passed 2004-05-18 15:53:58 +00:00
mail Bumped document date. 2004-05-19 09:51:31 +00:00
make Markup nits. 2004-05-19 09:51:58 +00:00
makewhatis
mesg
minigzip Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
ministat Added missing DPADD. 2004-02-05 22:01:28 +00:00
mkdep
mkfifo
mklocale Fix section number in cross reference. 2004-01-23 20:29:03 +00:00
mkstr Fixed a misspelling of 0 as NULL. 2004-03-14 05:51:20 +00:00
mktemp
msgs Fixed misspellings of '\0' as NULL. 2004-03-11 10:12:05 +00:00
mt Backout previous commit. It seems this comment applied to something 2004-04-09 17:30:26 +00:00
ncal Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
ncplist
ncplogin
netstat Bring in mbuma to replace mballoc. 2004-05-31 21:46:06 +00:00
newgrp Use (char *)NULL to terminated to argument list for execl(). 2003-10-30 15:14:34 +00:00
newkey Put chkey(1), newkey(8), and keyserv(8) into the crypto distribution. 2004-01-18 09:29:47 +00:00
nfsstat
nice
nl
nohup
objformat
opieinfo
opiekey
opiepasswd
pagesize
passwd
paste
pathchk
pkill Added pgrep to the SYNOPSIS. 2004-05-19 10:46:56 +00:00
pr
printenv
printf Make it possible for the %[eEfgG] formats to not result in an error 2004-03-07 22:22:13 +00:00
quota
renice
rev
rlogin
rpcgen - style(9) improvements courtesy of bde. 2004-05-02 07:07:54 +00:00
rpcinfo Fixed a misspelling of '\0' as NULL. 2004-03-11 10:22:25 +00:00
rs
rsh
rup
ruptime
rusers Fix a couple of warnings: 2004-05-19 21:34:52 +00:00
rwall Removed unnecessary dependencies on librpcsvc. 2004-02-04 11:59:08 +00:00
rwho
script Bumped document date. 2004-05-19 09:53:03 +00:00
sed A new version that does exponents and lots of other neat things. Update 2004-05-01 02:15:58 +00:00
shar
showmount
smbutil
sockstat
split
stat
su Bumped the document date. 2004-05-19 09:53:41 +00:00
systat Bring in mbuma to replace mballoc. 2004-05-31 21:46:06 +00:00
tabs
tail
talk Do not attempt ro read more than sizeof(buf) from stdin. 2004-05-10 15:52:16 +00:00
tar Correction: -h should be a synonym for -L, not -H. 2004-05-31 20:22:41 +00:00
tcopy
tee
telnet
tftp Bumped the document date. 2004-05-19 09:54:14 +00:00
time
tip Use a proper protoype to declare interp() and move it to tip.h. Fix an 2004-05-06 13:25:09 +00:00
top
touch
tput
tr
true
truncate
truss Add support for decoding Timespec, Timeval, Itimerval, Pollfd, 2004-03-23 12:37:02 +00:00
tset
tsort
tty
uac Remove (another) now redundant and now conflicting declaration of 2004-01-12 04:05:23 +00:00
ul
uname
unexpand
unifdef
uniq
units Use miligram rather than mg in the definition of carats. 2004-05-30 16:09:12 +00:00
unvis
usbhidaction Misc fixes brought to light by WARNS=6: 2004-03-09 11:35:43 +00:00
usbhidctl Correct reference to a non existant man page. 2004-01-04 16:34:16 +00:00
users
uudecode
uuencode Userland signed char fixes for PPC build. Problems were using a char 2004-01-22 07:23:36 +00:00
uuidgen The uuidgen(1) program is WARNS=6 clean, so flag it as such. 2003-12-07 21:34:56 +00:00
vacation
vgrind
vi Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
vis
vmstat Bumped the document date. 2004-05-19 09:54:14 +00:00
w Include <sys/proc.h> instead of depending on namespace pollution in 2004-04-14 09:34:17 +00:00
wall
wc Improve robustness of multibyte character handling (-m option), and 2004-04-09 11:17:29 +00:00
what
whereis
which
who
whois
window Add FBSDID. Use %ld to printf(3) a long (even if the number is small). 2004-04-04 19:11:01 +00:00
write
xargs
xinstall Improved incorrect usage diagnostics. 2004-03-17 11:06:40 +00:00
xlint Define PTRDIFF_IS_LONG and SIZEOF_IS_ULONG for arm. 2004-05-14 13:44:36 +00:00
xstr
yacc Use getopt instead of hand-rolled argument parsing. Usage remains 2004-03-05 01:52:09 +00:00
yes
ypcat
ypmatch
ypwhich Be consistant while reporting error conditions. 2004-04-04 19:17:38 +00:00
Makefile Build/install gprof on amd64 as well, after repocopying the MD bits. 2004-05-18 18:05:19 +00:00
Makefile.inc