smalloc: bump initial size to 8 pools

Commit 23bd40f944b7 shrank our pool size from 128 pools at 8MB max,
to one static 16MB pool. Christian reports:

"For our tests with about 250k files we found the smalloc pool being
 depleted.  Now for us values of 3-4 would be enough, but since it is a
 compile time switch I'd like to make it safe for everybody and set 8."

Bump the pool alloc to 8 pools again, retaining the 16MB size. That's
still substantially less than before, but should be enough for most
cases. Allocate the pools at init time, to avoid the issue that the
original commit fixed.

Also fix a bug where we failed to iterate some pools when restarting
the allocation scan, resulting in less-than-optimal exhaustion of all
pools before smalloc() gave up and returned NULL.

Signed-off-by: Jens Axboe <axboe@fb.com>
1 file changed