diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-04-02 04:06:42 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2007-04-30 03:08:17 -0400 |
commit | 5972511b77809cb7c9ccdb79b825c54921c5c546 (patch) | |
tree | 8dec5821badf9750be04f339f0f621fab2114c8a /drivers/md/dm-io.c | |
parent | b9099ff63c75216d6ca10bce5a1abcd9293c27e6 (diff) |
[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/md/dm-io.c')
-rw-r--r-- | drivers/md/dm-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index 4eb73d395213..8bdc8a87b249 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c | |||
@@ -60,7 +60,7 @@ static int resize_pool(unsigned int new_ios) | |||
60 | if (!_io_pool) | 60 | if (!_io_pool) |
61 | return -ENOMEM; | 61 | return -ENOMEM; |
62 | 62 | ||
63 | _bios = bioset_create(16, 16, 4); | 63 | _bios = bioset_create(16, 16); |
64 | if (!_bios) { | 64 | if (!_bios) { |
65 | mempool_destroy(_io_pool); | 65 | mempool_destroy(_io_pool); |
66 | _io_pool = NULL; | 66 | _io_pool = NULL; |