contigmalloc(9) rewrite

Brian Fundakowski Feldman green at FreeBSD.org
Tue Jun 15 19:57:11 GMT 2004


As I still couldn't get the reliability I wanted with contigmalloc(9)
(due to fundamental brokenness), I decided to do a reimplementation
of it that provides much more reliability and quite a bit less ugly
churn of the presently-allocated pageable memory.  In the new version,
allocations start at the top of the usable memory such that space is
not gratuitously wired at low physical addresses, as it is now,
leaving more room for those contigmalloc() calls that really do require
lower memory ranges.

I've tested it out a bit and had good results even with a fair bit of
load and full memory usage.  Limitations should only be on the kernel
pressure of VM page holdings and object locks, and wired/kernel
memory allocated.  I am primarily testing it out with ath(4), but I
can provoke lock-ups with or without any contigmalloc() changes
eventually when repeatedly hot-plugging the Atheros 802.11 card, so it
is not a very goodtest.

The patch, which applies to 5-CURRENT, can be found here:
	<http://green.homeunix.org/~green/contigmalloc2.patch>
The default is to use the old contigmalloc().  You can set the
sysctl or loader tunable "vm.old_contigmalloc" to 0 to enable it.

For anyone that normally runs into failed allocations hot-plugging
hardware, please try this and see if it helps out.

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green at FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\


More information about the freebsd-hackers mailing list