Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760786AbcDFC6U (ORCPT ); Tue, 5 Apr 2016 22:58:20 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:36322 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760537AbcDFC6Q (ORCPT ); Tue, 5 Apr 2016 22:58:16 -0400 Date: Tue, 5 Apr 2016 18:58:10 -0800 From: Kent Overstreet To: Ming Lei Cc: Jens Axboe , Linux Kernel Mailing List , linux-block@vger.kernel.org, Christoph Hellwig , Eric Wheeler , Sebastian Roesner , "4.2+" , Shaohua Li Subject: Re: [PATCH] block: make sure big bio is splitted into at most 256 bvecs Message-ID: <20160406025810.GA7956@kmo-pixel> References: <20160406011028.GA32334@kmo-pixel> <20160406012839.GA32713@kmo-pixel> <20160406022249.GB7452@kmo-pixel> <20160406023411.GA7793@kmo-pixel> <20160406024031.GB7793@kmo-pixel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1662 Lines: 39 On Wed, Apr 06, 2016 at 10:51:40AM +0800, Ming Lei wrote: > On Wed, Apr 6, 2016 at 10:40 AM, Kent Overstreet > wrote: > > On Wed, Apr 06, 2016 at 10:37:05AM +0800, Ming Lei wrote: > >> On Wed, Apr 6, 2016 at 10:34 AM, Kent Overstreet > >> wrote: > >> > On Wed, Apr 06, 2016 at 10:30:22AM +0800, Ming Lei wrote: > >> >> Now limit.max_segments is for limiting segments from hw view, one this > >> >> segment may include lots of pages/bvecs. > >> >> > >> >> The current bio_clone() issue is that we can't clone from one bio which > >> >> includes more than 256 bvecs, maybe all these 256 bvecs belong to > >> >> one same hw segment. > >> > > >> > So the distinction is purely a post multipage bvec thing? > >> > >> Even after multipage bvec is applied, the limit for max bvecs is still needed > >> for some cases like bio bounce, in which bio_clone() need to > >> clone single page bvec. > > > > s/max bvecs/max pages/? > > Exactly, :-) > > > > > What I meant is that until we have multipage bvecs, unless I'm missing something > > max_segments is exactly what we want. After multipage bvecs, things do get more > > Yes, but now we need to fix current issue and backport the fix. Given bio > bounce isn't easy to fix, not like other users of bio_clone, I think > we still need > to apply the max pages limit globally, what do you think of it? Ugh, yeah bouncing is an issue, with that it's most of the drivers. Ok, yeah I guess the global limit makes sense for now. Please add a giant comment explaining why the global limit is there, precisely what it's needed for and that we'd like to get rid of it.