[BLOCK] Don't pin lots of memory in mempools
authorJens Axboe <jens.axboe@oracle.com>
Mon, 2 Apr 2007 08:06:42 +0000 (10:06 +0200)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Mon, 30 Apr 2007 07:08:17 +0000 (09:08 +0200)
commit5972511b77809cb7c9ccdb79b825c54921c5c546
tree8dec5821badf9750be04f339f0f621fab2114c8a
parentb9099ff63c75216d6ca10bce5a1abcd9293c27e6
[BLOCK] Don't pin lots of memory in mempools

Currently we scale the mempool sizes depending on memory installed
in the machine, except for the bio pool itself which sits at a fixed
256 entry pre-allocation.

There's really no point in "optimizing" this OOM path, we just need
enough preallocated to make progress. A single unit is enough, lets
scale it down to 2 just to be on the safe side.

This patch saves ~150kb of pinned kernel memory on a 32-bit box.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/md/dm-crypt.c
drivers/md/dm-io.c
drivers/md/dm.c
drivers/scsi/scsi_lib.c
fs/bio.c
include/linux/bio.h