Received: by 10.223.176.46 with SMTP id f43csp1374726wra; Fri, 19 Jan 2018 10:34:43 -0800 (PST) X-Google-Smtp-Source: ACJfBosoUUE0KG9zl+bdYKZPHhkbE26PupxfM/B9okxyH+MCLZ5ksjW+JuZe2wR3Btmgnew0SqwF X-Received: by 10.98.212.26 with SMTP id a26mr33200940pfh.38.1516386883691; Fri, 19 Jan 2018 10:34:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516386883; cv=none; d=google.com; s=arc-20160816; b=qrMuZ9GKGZtIW3VbIUKAhDQsDxg+xoNf0KMl8kTWettrljM5hIDfomFJCh4AFVToy9 HR3gTuCOPodtg/0C8Pq/sX9aqpbzc2o5k2RUX1VGypy9ECzo4SS/oWzdTbhYuMvfc4AR lP+q5i5X9gPgeMp+ARza7/cz3QWKFoUoYICpN8buD+XFnpomytmAgNwRHBSFOHRVhCVS tBc1BzMHhU8S3XFynzKa9eu+NOFBKfhNSGLEqBKnwqOs6Y2KQn/j51fNSKjVcD2/Yz1C pLBxxnhR8jgraMBxnc1t21WPtW+C7NeFHESAExc/C3B3/MqMOdm7gzwfAGYjedXiGtY1 kSEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=5mQF+hqEdMxOS6umGroRWGR9bOwJAM8o7PmMnyA66G0=; b=jK1kEZmuTxROB0weNS3A65Tc7P9v7jmhRUhnlpL2ussMfBSxx/5QAnEkoK7NuW975L vX/yZXqx5JRIKJmthQjBetMmVGrApDI6CTPCjmG4klQS4CvFcxRoYDRVXvvjxb15s+jt t06RKZfilRdIulQ42c5AEjrnYGVj9xZ5AvDShsgz8bM4TbhSOPbcEDtTCW96D3TBknaj 6Jk0Z0BFbdU93Xcnh/AovZsnOsmLlELjZC15Qn9+lUY0Leil6IBM6aApFFeGRRrGT7E2 EQtrhLHoZMJTwHzLwSfisqbvJUo/NtcLy4O6BB3HBOukiXN6u6tz4dZxdTkgN0+MRqT6 pHAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si8452328pgn.653.2018.01.19.10.34.27; Fri, 19 Jan 2018 10:34:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932321AbeASSdq (ORCPT + 99 others); Fri, 19 Jan 2018 13:33:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41746 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755830AbeASSdi (ORCPT ); Fri, 19 Jan 2018 13:33:38 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9CC037854B; Fri, 19 Jan 2018 18:33:38 +0000 (UTC) Received: from localhost (unknown [10.18.25.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 263E1600D3; Fri, 19 Jan 2018 18:33:34 +0000 (UTC) Date: Fri, 19 Jan 2018 13:33:33 -0500 From: Mike Snitzer To: Jens Axboe Cc: Ming Lei , Bart Van Assche , "dm-devel@redhat.com" , "hch@infradead.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "osandov@fb.com" Subject: Re: [RFC PATCH] blk-mq: fixup RESTART when queue becomes idle Message-ID: <20180119183333.GA29937@redhat.com> References: <20180119072623.GB25369@ming.t460p> <047f68ec-f51b-190f-2f89-f413325c2540@kernel.dk> <20180119154047.GB14827@ming.t460p> <540e1239-c415-766b-d4ff-bb0b7f3517a7@kernel.dk> <20180119160518.GC14827@ming.t460p> <4a5c049f-0fab-bbaf-bfe2-eb5bca73f2c8@kernel.dk> <20180119162618.GD14827@ming.t460p> <1f072086-533e-4b75-d0e3-9e621b2120d8@kernel.dk> <20180119163736.GE14827@ming.t460p> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 19 Jan 2018 18:33:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 19 2018 at 12:38pm -0500, Jens Axboe wrote: > On 1/19/18 9:37 AM, Ming Lei wrote: > > On Fri, Jan 19, 2018 at 09:27:46AM -0700, Jens Axboe wrote: > >> > >> There are no pending requests for this case, nothing to restart the > >> queue. When you fail that blk_get_request(), you are idle, nothing > >> is pending. > > > > I think we needn't worry about that, once a device is attached to > > dm-rq, it can't be mounted any more, and usually user don't use the device > > directly and by dm-mpath at the same time. > > Here's an example of that, using my current block tree (merged into > master). The setup is dm-mpath on top of null_blk, the latter having > just a single request. Both are mq devices. > > Fio direct 4k random reads on dm_mq: ~250K iops > > Start dd on underlying device (or partition on same device), just doing > sequential reads. > > Fio direct 4k random reads on dm_mq with dd running: 9 iops > > No schedulers involved. > > https://i.imgur.com/WTDnnwE.gif FYI, your tree doesn't have these dm-4.16 changes (which are needed to make Ming's blk-mq chnages that are in your tree, commit 396eaf21e et al, have Ming's desired effect on DM): https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.16&id=050af08ffb1b62af69196d61c22a0755f9a3cdbd https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.16&id=459b54019cfeb7330ed4863ad40f78489e0ff23d https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.16&id=ec3eaf9a673106f66606896aed6ddd20180b02ec Fact that you're seeing such shit results without dm-4.16 commit ec3eaf9a67 (that reverts older commit 6077c2d706) means: yeap, this is really awful, let's fix it! But it is a different flavor of awful because the dm-rq.c:map_request() will handle the DM_MAPIO_DELAY_REQUEUE result from the null_blk's blk_get_request() failure using dm_mq_delay_requeue_request() against the dm-mq mpath device: blk_mq_requeue_request(rq, false); __dm_mq_kick_requeue_list(rq->q, msecs); So begs the question: why are we stalling _exactly_? (you may have it all figured out, as your gif implies.. but I'm not there yet). Might be interesting to see how your same test behaves without all of the churn we've staged for 4.16, e.g. against v4.15-rc8 Mike