Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754357AbbETS6s (ORCPT ); Wed, 20 May 2015 14:58:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36702 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753651AbbETS6q (ORCPT ); Wed, 20 May 2015 14:58:46 -0400 From: Jeff Moyer To: Ming Lin Cc: lkml , Christoph Hellwig , Jens Axboe , Kent Overstreet , Dongsu Park , Christoph Hellwig , Al Viro , Ming Lei , Neil Brown , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Lars Ellenberg , drbd-user@lists.linbit.com, Jiri Kosina , Geoff Levand , Jim Paris , Joshua Morris , Philip Kelleher , Minchan Kim , Nitin Gupta , Oleg Drokin , Andreas Dilger Subject: Re: [PATCH v3 01/11] block: make generic_make_request handle arbitrarily sized bios References: <1430980461-5235-1-git-send-email-mlin@kernel.org> <1430980461-5235-2-git-send-email-mlin@kernel.org> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Wed, 20 May 2015 14:58:41 -0400 In-Reply-To: (Ming Lin's message of "Wed, 20 May 2015 11:30:10 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1557 Lines: 48 Ming Lin writes: > On Mon, May 18, 2015 at 9:52 AM, Jeff Moyer wrote: >> Ming Lin writes: >> >>> diff --git a/block/blk-core.c b/block/blk-core.c >>> index fd154b9..909f317 100644 >>> --- a/block/blk-core.c >>> +++ b/block/blk-core.c >>> @@ -617,6 +617,10 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) >>> if (q->id < 0) >>> goto fail_q; >>> >>> + q->bio_split = bioset_create(4, 0); >>> + if (!q->bio_split) >>> + goto fail_id; >>> + >> >> Arbitrary numbers should be documented. > > Kent, > > Is there specific reason to choose number 4? > If no, I may change it to BIO_POOL_SIZE which is 2. Here's what he had to say last time around: On Mon, Nov 25, 2013 at 10:09:21PM -0800, Christoph Hellwig wrote: > > + q->bio_split = bioset_create(4, 0); > > + if (!q->bio_split) > > + goto fail_id; > > How did we arrive at a mempool size of 4 to make sure we can always make > progress with arbitrarily sized bios? Shouldn't we document the design > decision somewhere? It just has to be nonzero to guarantee forward progress - the bio_alloc_bioset() rescuer thing I did awhile back guarantees that. link: https://lkml.org/lkml/2013/11/26/47 Cheers, Jeff -- 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/