From patchwork Fri Oct 3 11:55:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junichi Nomura X-Patchwork-Id: 5022051 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: 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 9DC049F349 for ; Fri, 3 Oct 2014 12:01:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D5328201D3 for ; Fri, 3 Oct 2014 12:01:06 +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 0035020155 for ; Fri, 3 Oct 2014 12:01:05 +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 s93Bv5KE021657; Fri, 3 Oct 2014 07:57:05 -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 s93Bv4qf014188 for ; Fri, 3 Oct 2014 07:57:04 -0400 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s93Bv3js025693; Fri, 3 Oct 2014 07:57:03 -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 s93Bv1u3028420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 3 Oct 2014 07:57:02 -0400 Received: from mailgate3.nec.co.jp ([10.7.69.195]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id s93Buv74022392; Fri, 3 Oct 2014 20:56:57 +0900 (JST) Received: from mailsv4.nec.co.jp (imss61.nec.co.jp [10.7.69.156]) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP id s93Buvx19934; Fri, 3 Oct 2014 20:56:57 +0900 (JST) Received: from mail03.kamome.nec.co.jp (mail03.kamome.nec.co.jp [10.25.43.7]) by mailsv4.nec.co.jp (8.13.8/8.13.4) with ESMTP id s93Buv5H029936; Fri, 3 Oct 2014 20:56:57 +0900 (JST) Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.138] [10.38.151.138]) by mail01b.kamome.nec.co.jp with ESMTP id BT-MMP-2331233; Fri, 3 Oct 2014 20:55:27 +0900 Received: from BPXM12GP.gisp.nec.co.jp ([169.254.2.135]) by BPXC10GP.gisp.nec.co.jp ([10.38.151.138]) with mapi id 14.03.0174.002; Fri, 3 Oct 2014 20:55:27 +0900 From: Junichi Nomura To: device-mapper development , Mike Snitzer Thread-Topic: [PATCH 4/4] dm: use bioset_nobvec_create() Thread-Index: AQHP3wDrSVnE4Z6rxUCmVqojSMPd1w== Date: Fri, 3 Oct 2014 11:55:26 +0000 Message-ID: <542E8EAE.8060300@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: <0FDA2F8F0D721C429E70C24152967BAF@gisp.nec.co.jp> MIME-Version: 1.0 X-RedHat-Spam-Score: -4.202 (BAYES_00, 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.18 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id s93Bv4qf014188 X-loop: dm-devel@redhat.com Cc: Jens Axboe , Kent Overstreet Subject: [dm-devel] [PATCH 4/4] dm: use bioset_nobvec_create() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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 --- 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;