From: Mike Snitzer <snitzer@redhat.com>
To: snitzer@redhat.com, Junichi Nomura <j-nomura@ce.jp.nec.com>,
Jens Axboe <axboe@kernel.dk>
Cc: dm-devel@redhat.com, Kent Overstreet <kmo@daterainc.com>
Subject: [PATCH v2 2/4] block: use bio_clone_fast() in blk_rq_prep_clone()
Date: Fri, 3 Oct 2014 17:27:11 -0400 [thread overview]
Message-ID: <1412371633-30356-2-git-send-email-snitzer@redhat.com> (raw)
In-Reply-To: <1412371633-30356-1-git-send-email-snitzer@redhat.com>
In-Reply-To: <20141003204852.GA14135@redhat.com>
From: Junichi Nomura <j-nomura@ce.jp.nec.com>
Request cloning clones bios in the request to track the completion
of each bio.
For that purpose, we can use bio_clone_fast() instead of bio_clone()
to avoid unnecessary allocation and copy of bvecs.
This patch reduces memory footprint of request-based device-mapper
(about 1-4KB for each request) and is a preparation for further
reduction of memory usage by removing unused bvec mempool.
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
block/blk-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index bf930f4..a92f720 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2931,7 +2931,7 @@ int blk_rq_prep_clone(struct request *rq, struct request *rq_src,
blk_rq_init(NULL, rq);
__rq_for_each_bio(bio_src, rq_src) {
- bio = bio_clone_bioset(bio_src, gfp_mask, bs);
+ bio = bio_clone_fast(bio_src, gfp_mask, bs);
if (!bio)
goto free_and_out;
--
1.9.3
next prev parent reply other threads:[~2014-10-03 21:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Mike Snitzer [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1412371633-30356-2-git-send-email-snitzer@redhat.com \
--to=snitzer@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=j-nomura@ce.jp.nec.com \
--cc=kmo@daterainc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.