kernel - Add lwkt.cache_threads boot-time tunable
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 9 Mar 2011 02:01:08 +0000 (18:01 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 9 Mar 2011 02:01:08 +0000 (18:01 -0800)
commit765b1ae0159cca211559c3035641d842f28defd7
treecc470940d098f09e9d4028ba1cc90675aa5798bc
parentad94a85194ced5428679ed27af6d39f90815d906
kernel - Add lwkt.cache_threads boot-time tunable

* Add lwkt.cache_threads boot-time tunable.  This has to be set in
  /boot/loader.conf and controls how large a thread+kstack cache the
  kernel should maintain.

* Increase the default thread+kstack cache from 6 to 32 threads.

* Change the objcache_create*() API a little.  Instead of passing a
  mag_capacity field pass a nom_cache (nominal free objects to keep cached)
  field.

* Change the mag_capacity calculation to take into account small caches
  (the exec args cache) and remove the too-small-for-ncpus warning.

Related-to: IRC conversion thesjg & vsrinivas
sys/kern/kern_exec.c
sys/kern/kern_objcache.c
sys/kern/lwkt_thread.c
sys/kern/uipc_mbuf.c
sys/sys/objcache.h
sys/sys/thread.h