[dm-devel] [PATCH 4/4] dm: use bioset_nobvec_create()

Junichi Nomura j-nomura at ce.jp.nec.com
Fri Oct 3 11:55:26 UTC 2014


Since dm core uses bio_clone_fast() for both bio-based and request-based
DM device, there is no need for bvec mempool.

With this patch, on arch with 4KB page for example, memory usage will be
reduced by 64KB for each bio-based DM device and 1MB for each
request-based DM device.

Signed-off-by: Jun'ichi Nomura <j-nomura at ce.jp.nec.com>
---
 drivers/md/dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 4210b3c..7160853 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2895,7 +2895,7 @@ struct dm_md_mempools *dm_alloc_md_mempools(unsigned type, unsigned integrity, u
 	if (!pools->io_pool)
 		goto out;
 
-	pools->bs = bioset_create(pool_size, front_pad);
+	pools->bs = bioset_nobvec_create(pool_size, front_pad);
 	if (!pools->bs)
 		goto out;
 
-- 
1.9.3




More information about the dm-devel mailing list