Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759638AbcDFBFp (ORCPT ); Tue, 5 Apr 2016 21:05:45 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49065 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754394AbcDFBFn (ORCPT ); Tue, 5 Apr 2016 21:05:43 -0400 MIME-Version: 1.0 In-Reply-To: <20160406005951.GA3129698@devbig084.prn1.facebook.com> References: <1459878246-9249-1-git-send-email-ming.lei@canonical.com> <20160405182720.GA2375685@devbig084.prn1.facebook.com> <20160406002733.GB31161@kmo-pixel> <20160406003006.GA3084175@devbig084.prn1.facebook.com> <20160406003604.GE31161@kmo-pixel> <20160406004147.GA3100363@devbig084.prn1.facebook.com> <20160406004555.GA32042@kmo-pixel> <20160406005951.GA3129698@devbig084.prn1.facebook.com> Date: Wed, 6 Apr 2016 09:05:39 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] block: make sure big bio is splitted into at most 256 bvecs From: Ming Lei To: Shaohua Li Cc: Kent Overstreet , Jeff Moyer , Jens Axboe , Linux Kernel Mailing List , linux-block@vger.kernel.org, Christoph Hellwig , Eric Wheeler , Sebastian Roesner , "4.2+" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1720 Lines: 35 On Wed, Apr 6, 2016 at 8:59 AM, Shaohua Li wrote: > On Tue, Apr 05, 2016 at 04:45:55PM -0800, Kent Overstreet wrote: >> On Tue, Apr 05, 2016 at 05:41:47PM -0700, Shaohua Li wrote: >> > On Tue, Apr 05, 2016 at 04:36:04PM -0800, Kent Overstreet wrote: >> > > On Tue, Apr 05, 2016 at 05:30:07PM -0700, Shaohua Li wrote: >> > > > this one: >> > > > http://marc.info/?l=linux-kernel&m=145926976808760&w=2 >> > > >> > > Ah. that patch won't actually fix the bug, since md isn't using >> > > blk_default_limits, it's using blk_set_stacking_limits(). >> > >> > Not really, the limit is set by under layer disk not md, otherwise it >> > should be BLK_SAFE_MAX_SECTORS, but the reported bio has 2560 sectors. >> > blk_set_stacking_limits() will use it. >> >> What? Well, that could should just be deleted, there's no reason anymore for md >> to care about the queue limits of the devices underneath it. >> >> Regardless, using BLK_DEF_MAX_SECTORS to limit # of pages in the biovec is >> _crazy_. Why would you even do that? We have a separate field in queue limits >> for # max segments, use it. > > We don't limit the max segments in blk_queue_max_segments(), but we can > add. On the other hand, limit max segments to 256 could be a problem, > because bvec page isn't always 4k, this might make some bio smaller. It is nothing with max segments limit, it is about max sectors limit: think about one big bio which includes 2Mbytes, then 512 bvecs are required, but the 2M buffer can be continuous physically. > -- > To unsubscribe from this list: send the line "unsubscribe linux-block" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html