[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>
This commit is contained in:
@@ -1012,7 +1012,7 @@ static struct mapped_device *alloc_dev(int minor)
|
||||
if (!md->tio_pool)
|
||||
goto bad3;
|
||||
|
||||
md->bs = bioset_create(16, 16, 4);
|
||||
md->bs = bioset_create(16, 16);
|
||||
if (!md->bs)
|
||||
goto bad_no_bioset;
|
||||
|
||||
|
Reference in New Issue
Block a user