Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbbE0Alj (ORCPT ); Tue, 26 May 2015 20:41:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51050 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246AbbE0Alh (ORCPT ); Tue, 26 May 2015 20:41:37 -0400 Date: Wed, 27 May 2015 01:40:22 +0100 From: Alasdair G Kergon To: device-mapper development Cc: Alasdair G Kergon , Mike Snitzer , Ming Lei , Al@redhat.com, Christoph Hellwig , Lars Ellenberg , Oleg@redhat.com, Philip Kelleher , Joshua Morris , Christoph Hellwig , Kent@redhat.com, Overstreet , Nitin Gupta , Drokin , Viro , Dave Chinner , Ming Lin , Jens Axboe , Andreas Dilger , Geoff Levand , Jiri Kosina , lkml , Jim Paris , Minchan Kim , Dongsu Park , drbd-user@lists.linbit.com Subject: Re: [dm-devel] [PATCH v4 01/11] block: make generic_make_request handle arbitrarily sized bios Message-ID: <20150527004022.GD31182@agk-dp.fab.redhat.com> Mail-Followup-To: device-mapper development , Alasdair G Kergon , Mike Snitzer , Ming Lei , Al@redhat.com, Christoph Hellwig , Lars Ellenberg , Oleg@redhat.com, Philip Kelleher , Joshua Morris , Christoph Hellwig , Kent@redhat.com, Overstreet , Nitin Gupta , Drokin , Viro , Dave Chinner , Ming Lin , Jens Axboe , Andreas Dilger , Geoff Levand , Jiri Kosina , lkml , Jim Paris , Minchan Kim , Dongsu Park , drbd-user@lists.linbit.com References: <1432318723-18829-1-git-send-email-mlin@kernel.org> <1432318723-18829-2-git-send-email-mlin@kernel.org> <20150526143626.GA4315@redhat.com> <20150526153414.GA31182@agk-dp.fab.redhat.com> <20150527090640.44c346e2@notabene.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150527090640.44c346e2@notabene.brown> Organization: Red Hat UK Ltd. Registered in England and Wales, number 03798903. Registered Office: 64 Baker Street, 4th floor, London, W1U 7DF. User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1651 Lines: 32 On Wed, May 27, 2015 at 09:06:40AM +1000, Neil Brown wrote: > Because we don't know what the "right" size is. And the "right" size can > change when array reconfiguration happens. In certain configurations today, device-mapper does report back a sensible maximum bio size smaller than would otherwise be used and thereby avoids retrospective splitting. (In tests, the overhead of the duplicate calculation was found to be negligible so we never restructured the code to optimise it away.) > Splitting has to happen somewhere, if only in bio_addpage where it decides to > create a new bio rather than add another page to the current one. So moving > the split to a different level of the stack shouldn't necessarily change the > performance profile. It does sometimes make a significant difference to device-mapper stacks. DM only uses it for performance reasons - it can already split bios when it needs to. I tried to remove merge_bvec_fn from DM several years ago but couldn't because of the adverse performance impact of lots of splitting activity. The overall cost of splitting ought to be less in many (but not necessarily all) cases now as a result of all these patches, so exactly where the best balance lies now needs to be reassessed empirically. It is hard to reach conclusions theoretically because of the complex interplay between the various factors at different levels. Alasdair -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/