Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756442AbcJ1P3S (ORCPT ); Fri, 28 Oct 2016 11:29:18 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:36321 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754431AbcJ1P3O (ORCPT ); Fri, 28 Oct 2016 11:29:14 -0400 Date: Fri, 28 Oct 2016 08:29:08 -0700 From: Christoph Hellwig To: Linus Walleij Cc: Jens Axboe , Ulf Hansson , Paolo Valente , Christoph Hellwig , Arnd Bergmann , Bart Van Assche , Jan Kara , Tejun Heo , linux-block@vger.kernel.org, Linux-Kernal , Mark Brown , Hannes Reinecke , Grant Likely , James Bottomley , Bartlomiej Zolnierkiewicz Subject: Re: [PATCH 00/14] introduce the BFQ-v0 I/O scheduler as an extra scheduler Message-ID: <20161028152908.GA21341@infradead.org> References: <38156FA7-9A66-44DC-8D0C-28F149D1E49B@linaro.org> <09fc1e06-3fd6-b13d-0dd9-0edfb55b01d1@kernel.dk> <15ee2d0e-2d3a-81e2-9f83-f875e41bf388@kernel.dk> <1ac9b794-7e7f-0748-e4c8-a13034aecbc3@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1863 Lines: 35 On Fri, Oct 28, 2016 at 11:32:21AM +0200, Linus Walleij wrote: > So I'm not just complaining by the way, I'm trying to fix this. Also > Bartlomiej from Samsung has done some stabs at switching MMC/SD > to blk-mq. I just rebased my latest stab at a na?ve switch to blk-mq > to v4.9-rc2 with these results. > > The patch to enable MQ looks like this: > https://git.kernel.org/cgit/linux/kernel/git/linusw/linux-stericsson.git/commit/?h=mmc-mq&id=8f79b527e2e854071d8da019451da68d4753f71d > > I run these tests directly after boot with cold caches. The results > are consistent: I ran the same commands 10 times in a row. A couple comments from a quick look over the patch: In the changelog you complain: ". Lack of front- and back-end merging in the MQ block layer creating several small requests instead of a few large ones." In blk-mq merging is controller by the BLK_MQ_F_SHOULD_MERGE and BLK_MQ_F_SG_MERGE flags. You set the former, but not the latter. BLK_MQ_F_SG_MERGE controls wether multiple physical contiguous pages get merged into a single segment. For a dd after a fresh boot that is probably very common. Except for the polarity of the merge flags the basic merge functionality between the legacy and blk-mq path should be the same, and if they aren't you've found a bug we need to address. You also say that you disable the pipelining. How much of a performance gain did this feature give when added? How much does just removing that on it's own cost you? While I think that features is rather messy and should be avoided if possible I don't see how it's impossible to implement in blk-mq. If you just increase your queue depth and use the old scheme you should get it - if you currently can't handle the second command for some reason (i.e. the special request magic) you can just return BLK_MQ_RQ_QUEUE_BUSY from the queue_rq function.