Message ID | 542E8EA8.6070004@ce.jp.nec.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Mike Snitzer |
Headers | show
Return-Path: <dm-devel-bounces@redhat.com> X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A406D9F349 for <patchwork-dm-devel@patchwork.kernel.org>; Fri, 3 Oct 2014 12:01:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3A51201EF for <patchwork-dm-devel@patchwork.kernel.org>; Fri, 3 Oct 2014 12:01:25 +0000 (UTC) Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C5F120155 for <patchwork-dm-devel@patchwork.kernel.org>; Fri, 3 Oct 2014 12:01:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s93BvxH1021709; Fri, 3 Oct 2014 07:57:59 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s93Buiol014159 for <dm-devel@listman.util.phx.redhat.com>; Fri, 3 Oct 2014 07:56:44 -0400 Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.20]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s93BuiOv025638; Fri, 3 Oct 2014 07:56:44 -0400 Received: from tyo201.gate.nec.co.jp (TYO201.gate.nec.co.jp [210.143.35.51]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s93Bufu4029453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 3 Oct 2014 07:56:42 -0400 Received: from mailgate3.nec.co.jp ([10.7.69.192]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id s93BuZmT022326; Fri, 3 Oct 2014 20:56:35 +0900 (JST) Received: from mailsv.nec.co.jp (imss62.nec.co.jp [10.7.69.157]) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP id s93BuZ328570; Fri, 3 Oct 2014 20:56:35 +0900 (JST) Received: from mail03.kamome.nec.co.jp (mail03.kamome.nec.co.jp [10.25.43.7]) by mailsv.nec.co.jp (8.13.8/8.13.4) with ESMTP id s93BuZxm017628; Fri, 3 Oct 2014 20:56:35 +0900 (JST) Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.140] [10.38.151.140]) by mail02.kamome.nec.co.jp with ESMTP id BT-MMP-2343341; Fri, 3 Oct 2014 20:55:21 +0900 Received: from BPXM12GP.gisp.nec.co.jp ([169.254.2.135]) by BPXC12GP.gisp.nec.co.jp ([10.38.151.140]) with mapi id 14.03.0174.002; Fri, 3 Oct 2014 20:55:21 +0900 From: Junichi Nomura <j-nomura@ce.jp.nec.com> To: device-mapper development <dm-devel@redhat.com>, Mike Snitzer <snitzer@redhat.com> Thread-Topic: [PATCH 2/4] block: use bio_clone_fast() in blk_rq_prep_clone() Thread-Index: AQHP3wDofEAIB3VElUe3QaSX9jWftw== Date: Fri, 3 Oct 2014 11:55:20 +0000 Message-ID: <542E8EA8.6070004@ce.jp.nec.com> References: <542E8CF9.6000609@ce.jp.nec.com> In-Reply-To: <542E8CF9.6000609@ce.jp.nec.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.34.125.85] Content-ID: <308017FD40294F42B5A732246462F5D4@gisp.nec.co.jp> MIME-Version: 1.0 X-RedHat-Spam-Score: -4.602 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_MED, SPF_HELO_PASS, SPF_PASS) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.20 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id s93Buiol014159 X-loop: dm-devel@redhat.com Cc: Jens Axboe <axboe@kernel.dk>, Kent Overstreet <kmo@daterainc.com> Subject: [dm-devel] [PATCH 2/4] block: use bio_clone_fast() in blk_rq_prep_clone() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development <dm-devel@redhat.com> List-Id: device-mapper development <dm-devel.redhat.com> List-Unsubscribe: <https://www.redhat.com/mailman/options/dm-devel>, <mailto:dm-devel-request@redhat.com?subject=unsubscribe> List-Archive: <https://www.redhat.com/archives/dm-devel> List-Post: <mailto:dm-devel@redhat.com> List-Help: <mailto:dm-devel-request@redhat.com?subject=help> List-Subscribe: <https://www.redhat.com/mailman/listinfo/dm-devel>, <mailto:dm-devel-request@redhat.com?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
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;
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> --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)