Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754618AbbETSQa (ORCPT ); Wed, 20 May 2015 14:16:30 -0400 Received: from mail.kernel.org ([198.145.29.136]:35435 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754560AbbETSQZ (ORCPT ); Wed, 20 May 2015 14:16:25 -0400 MIME-Version: 1.0 In-Reply-To: <20150520124418.GA15594@lst.de> References: <1430980461-5235-1-git-send-email-mlin@kernel.org> <1430980461-5235-2-git-send-email-mlin@kernel.org> <20150520124418.GA15594@lst.de> Date: Wed, 20 May 2015 11:16:20 -0700 Message-ID: Subject: Re: [PATCH v3 01/11] block: make generic_make_request handle arbitrarily sized bios From: Ming Lin To: Christoph Hellwig Cc: Ming Lin , lkml , 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 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: 1767 Lines: 46 On Wed, May 20, 2015 at 5:44 AM, Christoph Hellwig wrote: > This needs the patch below for the blk-mq case with multiple queues. Will add it. > > Also I wonder why we really want to push this below ->make_request. > Moving it just outside ->make_request would make the callchain more > obvious and avoid the recursion into the driver. Are you saying move the split to generic_make_request()? Below is an off-list discussion. Ming Lei asked: > > I am wondering why the bio isn't splitted just before q->make_request_fn > > is called in generic_make_request()? By this way, drivers won't need > > to call blk_queue_split() at all. Is it because performance reason? or > > others? Kent replied: > > The reasoning was because blk_queue_split() was only an interim solution - > > there's actually no inherent need to split the bios at all, but not splitting > > them takes (a small amount of) driver modification. You just have the driver > > consume the bios incrementally, advancing the iterator and using bi_remaining > > when they have multiple tags pointing to the same bio. > > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index e9bbc04..e7fae76 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -1256,6 +1256,8 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio) > return; > } > > + blk_queue_split(q, &bio, q->bio_split); > + > rq = blk_mq_map_request(q, bio, &data); > if (unlikely(!rq)) > return; -- 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/