git: kernel - Add lwkt.cache_threads boot-time tunable

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Mar 8 18:04:03 PST 2011


commit 765b1ae0159cca211559c3035641d842f28defd7
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Mar 8 18:01:08 2011 -0800

    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

Summary of changes:
 sys/kern/kern_exec.c     |    3 +-
 sys/kern/kern_objcache.c |  115 +++++++++++++++++++++++++---------------------
 sys/kern/lwkt_thread.c   |   14 ++++--
 sys/kern/uipc_mbuf.c     |    4 +-
 sys/sys/objcache.h       |    4 +-
 sys/sys/thread.h         |    2 -
 6 files changed, 77 insertions(+), 65 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/765b1ae0159cca211559c3035641d842f28defd7


-- 
DragonFly BSD source repository





More information about the Commits mailing list