Rollup mbuf/objcache fixes.
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 8 Jun 2005 22:22:59 +0000 (22:22 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 8 Jun 2005 22:22:59 +0000 (22:22 +0000)
commit77e294a10460f8d122395807dac6c50c41f2b7ac
tree0d8a3f9e17d488860ed3c5482fdb1c6df62a63f1
parent796176d85006914b61ec98f5cd3025e376756ba7
Rollup mbuf/objcache fixes.

* Completely replace the blocking algorithm that is used to stall when the
  depot has insufficient resources.

* Use __offsetof() to calculate variable length structural sizes.

* #if 0 out balancing code for now.  There isn't actually much of a need for
  it since each cpu can hold no more then two magazines anyway.  The depot
  will have the rest.

* Increase the magazine capacity from 5 to 256 elements to improve
  performance.

* The mbufs were being returned to a different objcache then they had been
  allocated from, due to a dependance on M_PKTHDR  and M_EXT.  But these
  flags can change unexpectedly and this led to lockups in the objcache
  code and other issues.  Also the share count on the cluster may mean
  that it is not possible to release an mbuf+cluster back to its original
  mbuf+cluster cache... it may have to be DTORed instead.

* Change the way ref counts are handled in the mclmeta_cache.  The cache
  returns and expects a ref count of 0 now, and the link code deals with
  bumping it.
sys/kern/kern_objcache.c
sys/kern/uipc_mbuf.c
sys/sys/mbuf.h
sys/sys/objcache.h