Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6445334imu; Wed, 14 Nov 2018 01:23:18 -0800 (PST) X-Google-Smtp-Source: AJdET5cd+2jGbLTpF4xeeOsGza2lYXBW9xskuZW/1OeJvXI847f7gTw/QUArHQ+0DiaT2jaap+Mu X-Received: by 2002:a17:902:9681:: with SMTP id n1-v6mr1160693plp.126.1542187398016; Wed, 14 Nov 2018 01:23:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542187397; cv=none; d=google.com; s=arc-20160816; b=tM2MGKwFHeUhThx9EHsMGX4OlvnKpaYSPCmpkAh6WUi6kXTIlKDmIoKyw9bc3+lqkW B/BUdMhtij9+e47AYtnjNroLVdgEY5oiuEDmzglQWlC/KyLE8hc/AkdPLFGdIunmuR9U 6WesUWcgd7/T+N3yPXON6c9st1NR1ToFN2dG1UceuyJGRabZhWrrHI3kiFKJqDKVmMv3 f8t25Z/iuiDUgRVyJBFv3Glb75vumy5yns9ulh41a0QEmvHHbRNXYTN/eyY8iAtIkno4 MqNo/WHnmKtPx8dUCQj0+rf/LQ5ULNZ+JHbo+AolA/RSxVb9DZWc3SAuEfbbUmlN9xUi 38sw== 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; bh=EDzXqgNMuuMlTtDjUwOS6cnQ29KNn85HIj9MJAhZeVQ=; b=osEmzxP2435Wu1B81duqi1DOJjuyZtzne1+Puc46EGYZ9tjI3TkhMgBZ/A0dhrMHH5 7j9Cdb/SObyv3d8v6B6J+uw/v+INmemo/5hx3Hsuz3vLJbjx/Y1m6+waTTq+Q1MrrTRp q4cljFcsmD5YmNaTHkvu5Z8SwsrfRwffT1X/fyAB1OuzpSgZX4ekmMon4aVZaVO50TiA m458cNHG1yrTFn04RnQWJIkWaJ23fJGFG4Yp2dmlk8bpQuYC5SdHR0NTgmt+1JutmML/ CHDjUPM4mqmxKNSg/bKZXis6nudBHOeLqAGyAZ9GmNtqktKRIH0uj+Lp+Hc06h6f/vhE eJyA== 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 b25-v6si6914134pfo.240.2018.11.14.01.23.03; Wed, 14 Nov 2018 01:23:17 -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 S1732533AbeKNTXA (ORCPT + 99 others); Wed, 14 Nov 2018 14:23:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59810 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727558AbeKNTXA (ORCPT ); Wed, 14 Nov 2018 14:23:00 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4DEF9307DAB3; Wed, 14 Nov 2018 09:20:36 +0000 (UTC) Received: from ming.t460p (ovpn-8-18.pek2.redhat.com [10.72.8.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40A9F608F0; Wed, 14 Nov 2018 09:20:28 +0000 (UTC) Date: Wed, 14 Nov 2018 17:20:23 +0800 From: Ming Lei To: Jianchao Wang Cc: axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V7 2/4] blk-mq: fix issue directly case when q is stopped or quiesced Message-ID: <20181114092022.GC20550@ming.t460p> References: <1542185131-15029-1-git-send-email-jianchao.w.wang@oracle.com> <1542185131-15029-3-git-send-email-jianchao.w.wang@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1542185131-15029-3-git-send-email-jianchao.w.wang@oracle.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 14 Nov 2018 09:20:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 14, 2018 at 04:45:29PM +0800, Jianchao Wang wrote: > When try to issue request directly, if the queue is stopped or > quiesced, 'bypass' will be ignored and return BLK_STS_OK to caller > to avoid it dispatch request again. Then the request will be > inserted with blk_mq_sched_insert_request. This is not correct > for dm-rq case where we should avoid to pass through the underlying > path's io scheduler. > > To fix it, use blk_mq_request_bypass_insert to insert the request > to hctx->dispatch when we cannot pass through io scheduler but have > to insert. Not sure if the current behaviour is wrong, or worth of a fix. Bypassing io scheduler for dm-rq is only for sake of performance because there has been io scheduler for dm device already, and we just don't want to schedule these requests twice. Given it can be thought as error handling, there shouldn't be big difference to put request in scheduler queue or ->dispatch list when queue is quiesced or stopped. What matters is that all these requests can be dispatched again after queue switches back. thanks, Ming