aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-04-02 10:06:42 +0200
committerJens Axboe <axboe@nelson.home.kernel.dk>2007-04-30 09:08:17 +0200
commit5972511b77809cb7c9ccdb79b825c54921c5c546 (patch)
tree8dec5821badf9750be04f339f0f621fab2114c8a /drivers/scsi/scsi_lib.c
parentMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 (diff)
downloadlinux-dev-5972511b77809cb7c9ccdb79b825c54921c5c546.tar.xz
linux-dev-5972511b77809cb7c9ccdb79b825c54921c5c546.zip
[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>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 9f7482d0b594..05d79af5ab90 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -31,7 +31,7 @@
#define SG_MEMPOOL_NR ARRAY_SIZE(scsi_sg_pools)
-#define SG_MEMPOOL_SIZE 32
+#define SG_MEMPOOL_SIZE 2
struct scsi_host_sg_pool {
size_t size;