Received: by 10.223.176.46 with SMTP id f43csp652248wra; Thu, 18 Jan 2018 23:35:43 -0800 (PST) X-Google-Smtp-Source: ACJfBov5Mka3uvmGSBUHywWsgSGA6AKhquIGQrBESvxSOPxujxdVPteNpPj1drjYr/cFc78mQ4GX X-Received: by 2002:a17:902:6881:: with SMTP id i1-v6mr1160121plk.323.1516347343539; Thu, 18 Jan 2018 23:35:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516347343; cv=none; d=google.com; s=arc-20160816; b=PKcNp8CzJDkPm6ZKtymPSfmra50f3zupixaqa4ZLrXLWQokfBApuejXkRbuchaZYbf +PDqOy/L/6glkIPQ0V8BTDfpEv8/5SoDABCRBvqYnbD3Hj7B31aWkcHMWpDQm2ZADw+p IUl1jSmTvCWgnXip/i+hlZfbYs077w0lqaMpEak/u5XHKuO4ZTt+1ULBnQOQliWFbq8I YxxBlFEKai5anDXnCAAmiBMuUzvR3CHbMKV3tSWd61ALBo3wrBohRb2y6F0zbJbXqZEf 3GgoU043AnmOf8WTboDo/R1Pp845rF0lz3ULDTiYD2TOKla+xrREguYf5DTXsQ+QMJYv 7F+Q== 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=SnVPziF11F1Roq3aTN7lVCPXGYBZpHsKF6R8TZQr0E8=; b=qhclhuq2SoMOqkSRZc14V2fHiVzmoVkJEu6IhzH70+0E8IK3F6ZlHaFaxWxrB7REQO qs/2n6Rlf54BgbGPnyt1b7GzlvEijjQV8gpx42ikJlFOAmf1vuEfoTFx5LGetQlvZSrr OO0jZTdABSIyOKXodtTuIQAnU0jDcJ6GyqSou9sF9Rt9jZ0fNE3IDwQzKkikm38horRF BFhoiOC4etrQdGR/xfepuARYpBj+V63cEAgOa5NIwmpJoVc4jsq4Hw3uif4MKbpNxp+o u5uHzLjVTSkCb4MpjDqxRcpL+9Jk/ASh6qElBhKMktkVDPiKN45M4OWpDdw37zBlUAGd eUpg== 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 n184si7841297pga.162.2018.01.18.23.35.29; Thu, 18 Jan 2018 23:35: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 S1753548AbeASHep (ORCPT + 99 others); Fri, 19 Jan 2018 02:34:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50338 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbeASHeh (ORCPT ); Fri, 19 Jan 2018 02:34:37 -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 2AB7D80478; Fri, 19 Jan 2018 07:34:37 +0000 (UTC) Received: from ming.t460p (ovpn-12-90.pek2.redhat.com [10.72.12.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 87F7460A9D; Fri, 19 Jan 2018 07:34:27 +0000 (UTC) Date: Fri, 19 Jan 2018 15:34:23 +0800 From: Ming Lei To: Bart Van Assche Cc: "axboe@kernel.dk" , "dm-devel@redhat.com" , "hch@infradead.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "osandov@fb.com" , "snitzer@redhat.com" Subject: Re: [RFC PATCH] blk-mq: fixup RESTART when queue becomes idle Message-ID: <20180119073423.GC25369@ming.t460p> References: <20180118024124.8079-1-ming.lei@redhat.com> <20180118170353.GB19734@redhat.com> <1516296056.2676.23.camel@wdc.com> <20180118183039.GA20121@redhat.com> <1516301278.2676.35.camel@wdc.com> <20180119023212.GA25413@ming.t460p> <1516338585.4077.1.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516338585.4077.1.camel@wdc.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.28]); Fri, 19 Jan 2018 07:34:37 +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 05:09:46AM +0000, Bart Van Assche wrote: > On Fri, 2018-01-19 at 10:32 +0800, Ming Lei wrote: > > Now most of times both NVMe and SCSI won't return BLK_STS_RESOURCE, and > > it should be DM-only which returns STS_RESOURCE so often. > > That's wrong at least for SCSI. See also https://marc.info/?l=linux-block&m=151578329417076. > > For other scenario's, e.g. if a SCSI initiator submits a > SCSI request over a fabric and the SCSI target replies with "BUSY" then the Could you explain a bit when SCSI target replies with BUSY very often? Inside initiator, we have limited the max per-LUN requests and per-host requests already before calling .queue_rq(). > SCSI core will end the I/O request with status BLK_STS_RESOURCE after the > maximum number of retries has been reached (see also scsi_io_completion()). > In that last case, if a SCSI target sends a "BUSY" reply over the wire back > to the initiator, there is no other approach for the SCSI initiator to > figure out whether it can queue another request than to resubmit the > request. The worst possible strategy is to resubmit a request immediately > because that will cause a significant fraction of the fabric bandwidth to > be used just for replying "BUSY" to requests that can't be processed > immediately. -- Ming