change the semantic for calculating when to grow the size of a cache list.
authordlg <dlg@openbsd.org>
Fri, 23 Jun 2017 01:02:18 +0000 (01:02 +0000)
committerdlg <dlg@openbsd.org>
Fri, 23 Jun 2017 01:02:18 +0000 (01:02 +0000)
commit9a59f80880a441f001cf639359b5ae85ae51b152
treec67cb40093fcea2fb5369221eedc5546511fdec2
parenta8c898ea5da328e9d7b21d8aa60dca2484a882ce
change the semantic for calculating when to grow the size of a cache list.

previously it would figure out if there's enough items overall for
all the cpus to have full active an inactive free lists. this
included currently allocated items, which pools wont actually hold
on a free list and cannot predict when they will come back.

instead, see if there's enough items in the idle lists in the depot
that could instead go on all the free lists on the cpus. if there's
enough idle items, then we can grow.

tested by hrvoje popovski and amit kulkarni
ok visa@
share/man/man9/pool_cache_init.9
sys/kern/subr_pool.c
sys/sys/pool.h
usr.bin/systat/pool.c