Because the objcache caches up to two magazines on each cpu some pretty
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 2 Jul 2007 06:34:26 +0000 (06:34 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 2 Jul 2007 06:34:26 +0000 (06:34 +0000)
commita1f6a1fea8ebbf0877601f90b27855771c3b13e2
treeafebc90d69f3b5faac8e20a6ef208e70cb037aa3
parente77dc05b6d9ff61c755a27903ab890c0d6e5a7cd
Because the objcache caches up to two magazines on each cpu some pretty
bad degenerate conditions will be hit if the cluster limit is set too small
or the magazine size is set too large.

Detect the problem and reduce the magazine size to compensate.  If we hit
the minimum magazine size (16), increase the cluster limit to compensate.
Report the corrections on the console.

We also have the option of stealing magazines from other cpus, or reducing
the magazine size even further to handle extreme cases.

This should solve most of the objcache issues when ncpus is set to 31.
sys/kern/kern_objcache.c