dm: reduce memory overhead of DM devices
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | dm: remove nr_iovecs parameter from alloc_tio()drivers/ | +4 | 1 reply | |
| 2/4 | block: use bio_clone_fast() in blk_rq_prep_clone()block/ | +1 | 0 replies | |
| 3/4 | block: add bioset_nobvec_create()block/ include/ | +45 | 1 reply | |
| 4/4 | dm: use bioset_nobvec_create()drivers/ | +1 | 0 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Mike Snitzer |
|---|---|
| Series | A-b |
| 1/4 | |
| 2/4 | |
| 3/4 | A-b |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] dm: reduce memory overhead of DM devices
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(-)
Signature · 4 lines
1.9.3 -- Jun'ichi Nomura, NEC Corporation