All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] dm: reduce memory overhead of DM devices
@ 2014-10-03 11:48 Junichi Nomura
  2014-10-03 11:55 ` [PATCH 1/4] dm: remove nr_iovecs parameter from alloc_tio() Junichi Nomura
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Junichi Nomura @ 2014-10-03 11:48 UTC (permalink / raw)
  To: device-mapper development, Mike Snitzer; +Cc: Jens Axboe, Kent Overstreet

This series of patches reduce the memory overhead of device-mapper
device mainly by removing unused mempool for bio vecs.

DM creates per-device bioset to ensure forward progress under
low memory situation and bioset always includes mempool for bvec.

However, with the introduction of immutable bvec by Kent Overstreet,
dm core now uses bio_clone_fast for creating a clone bio, and no longer
needs bvecs for it.

For example, when you create 10,000 bio-based DM devices and 1,000
request-based DM devices, memory usage of biovec under no load is:
  # grep biovec /proc/slabinfo
  biovec-256        418068 418068   4096  ...
  biovec-128             0      0   2048  ...
  biovec-64              0      0   1024  ...
  biovec-16              0      0    256  ...

With this patch series applied, the usage becomes:
  # grep biovec /proc/slabinfo
  biovec-256           116    116   4096  ...
  biovec-128             0      0   2048  ...
  biovec-64              0      0   1024  ...
  biovec-16              0      0    256  ...

So 4096 * (418068 - 116) = 1.6GB of memory is saved in this example.

Jun'ichi Nomura (4):
  dm: remove nr_iovecs parameter from alloc_tio()
  block: use bio_clone_fast() in blk_rq_prep_clone()
  block: add bioset_nobvec_create()
  dm: use bioset_nobvec_create()

 block/bio.c         | 61 ++++++++++++++++++++++++++++++++++++++---------------
 block/blk-core.c    |  2 +-
 drivers/md/dm.c     | 15 +++++--------
 include/linux/bio.h |  1 +
 4 files changed, 51 insertions(+), 28 deletions(-)

-- 
1.9.3

--
Jun'ichi Nomura, NEC Corporation

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-10-06  0:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-03 11:48 [PATCH 0/4] dm: reduce memory overhead of DM devices Junichi Nomura
2014-10-03 11:55 ` [PATCH 1/4] dm: remove nr_iovecs parameter from alloc_tio() Junichi Nomura
2014-10-03 20:01   ` Mike Snitzer
2014-10-03 11:55 ` [PATCH 2/4] block: use bio_clone_fast() in blk_rq_prep_clone() Junichi Nomura
2014-10-03 11:55 ` [PATCH 3/4] block: add bioset_nobvec_create() Junichi Nomura
2014-10-03 13:16   ` Mike Snitzer
2014-10-03 11:55 ` [PATCH 4/4] dm: use bioset_nobvec_create() Junichi Nomura
2014-10-03 13:23 ` [PATCH 0/4] dm: reduce memory overhead of DM devices Mike Snitzer
2014-10-03 20:48   ` Mike Snitzer
2014-10-03 20:57     ` Jens Axboe
2014-10-03 21:04       ` Mike Snitzer
2014-10-03 21:27     ` [PATCH v2 1/4] dm: remove nr_iovecs parameter from alloc_tio() Mike Snitzer
2014-10-03 21:27     ` [PATCH v2 2/4] block: use bio_clone_fast() in blk_rq_prep_clone() Mike Snitzer
2014-10-03 21:27     ` [PATCH v2 3/4] block: add bioset_create_nobvec() Mike Snitzer
2014-10-03 21:27     ` [PATCH v2 4/4] dm: use bioset_create_nobvec() Mike Snitzer
2014-10-05 23:06       ` Junichi Nomura
2014-10-06  0:24         ` Mike Snitzer
2014-10-04 17:01 ` [PATCH 0/4] dm: reduce memory overhead of DM devices Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.