Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755343AbcKBDIU (ORCPT ); Tue, 1 Nov 2016 23:08:20 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34838 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755257AbcKBDIR (ORCPT ); Tue, 1 Nov 2016 23:08:17 -0400 Date: Tue, 1 Nov 2016 19:08:13 -0800 From: Kent Overstreet To: Christoph Hellwig Cc: Ming Lei , Jens Axboe , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Kirill A . Shutemov" , Jens Axboe , Hannes Reinecke , Mike Christie , Dan Williams , Toshi Kani Subject: Re: [PATCH 28/60] block: introduce QUEUE_FLAG_SPLIT_MP Message-ID: <20161102030813.spwwymvdrym3lrah@kmo-pixel> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> <1477728600-12938-29-git-send-email-tom.leiming@gmail.com> <20161031153915.GL30919@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161031153915.GL30919@infradead.org> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1314 Lines: 25 On Mon, Oct 31, 2016 at 08:39:15AM -0700, Christoph Hellwig wrote: > On Sat, Oct 29, 2016 at 04:08:27PM +0800, Ming Lei wrote: > > Some drivers(such as dm) should be capable of dealing with multipage > > bvec, but the incoming bio may be too big, such as, a new singlepage bvec > > bio can't be cloned from the bio, or can't be allocated to singlepage > > bvec with same size. > > > > At least crypt dm, log writes and bcache have this kind of issue. > > We already have the segment_size limitation for request based drivers. > I'd rather extent it to bio drivers if really needed. > > But then again we should look into not having this limitation. E.g. > for bcache I'd be really surprised if it's that limited, given that > Kent came up with this whole multipage bvec scheme. AFAIK the only issue is with drivers that may have to bounce bios - pages that were contiguous in the original bio won't necessarily be contiguous in the bounced bio, thus bouncing might require more than BIO_MAX_SEGMENTS bvecs. I don't know what Ming's referring to by "singlepage bvec bios". Anyways, bouncing comes up in multiple places so we probably need to come up with a generic solution for that. Other than that, there shouldn't be any issues or limitations - if you're not bouncing, there's no need to clone the bvecs.