Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1160277ybh; Tue, 10 Mar 2020 16:10:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vviMFQTqI0BRD+v2L93u5hkkbWHev7+g9xAfp3TKiEFt0vI6YUDH5/RgRHx1ncINhVArOIe X-Received: by 2002:a9d:a68:: with SMTP id 95mr87518otg.87.1583881821639; Tue, 10 Mar 2020 16:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583881821; cv=none; d=google.com; s=arc-20160816; b=Mv0PhgTwpUqqq/hrNQvhUZkI9nsQPQdJTO278nArM6xFfFZWOsWPh8eEj0Y+TlZ+7/ y0IULynxJMZ56USNuhVUi8jwlUZ7RT9NB4WqAAxGUkfz/OC1nkey2Q/eb0Lx0Dt1DQQj VqIny9y+8DqxpNMWRnWOMkELdX3q8xUGTJb181EmF5bdtlPG47dwFUbfgTEbByzv95ay okRRsRXCXPVVr+8wS8IAounU6m9r6lWWx6bVPx3VBtB3dw8KyYIwiGPjvY15U7Mt4KSG ZYw83DJstL7svJrVYkIJjATIlNgT6t+rui263svzoYb2lmBnAPFbsxToEmUP1tZGKpuS YOmQ== 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:dkim-signature; bh=wkPE+IhNE5fdZSVJ5cOurXqU2RwW85UEqdhYtpKuSmI=; b=iGl9dGV55LVzD3fi9Pogh3fUvhZw8/4JR5zIsPMSDHXAB3TEtXHaqIbvFF9aT6+seg knuThNPoD8cqCOr8ygS2nORp2NDveaRq0AUhwnxkwSGhwPt4zcJrj4WwbDbM6Q8eQph6 VB9PmB1VWNQhhUZ/FjKu5mjQo4E0Y5WDyf/gUYr8kd3Vje9Leu56HBooZkP6ca2mJs11 ASzmm6ggFzSlq8t8ga2YFgKFFJHKmfNonjGBWHX66QcppRWufM8DaStjRncTlAqp8zT8 8vM6hx307cwu7FGoKJrQu6oME+Qo8hrUjmtEmcTGYw+dNaQcJyudcZ/opLlWbDRIhlEV XL+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=P7OIjeCd; 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=pass (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 h11si62599otg.171.2020.03.10.16.10.09; Tue, 10 Mar 2020 16:10:21 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=P7OIjeCd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727695AbgCJXJD (ORCPT + 99 others); Tue, 10 Mar 2020 19:09:03 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35239 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727648AbgCJXJC (ORCPT ); Tue, 10 Mar 2020 19:09:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583881742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wkPE+IhNE5fdZSVJ5cOurXqU2RwW85UEqdhYtpKuSmI=; b=P7OIjeCdhomfAZCkqNQpxSWIXl4mIvMk7O7JYCkEJFE7SazXFBjoy1NNlGokG+4s2cfTQs tZHqXJRneG8zoWZqBprCrqjznuEP/7KidhBG5eP14oEqyrGbpazdOYyK+2DM25L4IVUCls 03e5+FMEV7rsOIpaFpCiWvTwwYUoFuI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-ai_V4I1sODC8ESQzccoL5A-1; Tue, 10 Mar 2020 19:08:58 -0400 X-MC-Unique: ai_V4I1sODC8ESQzccoL5A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E5DFA184C810; Tue, 10 Mar 2020 23:08:50 +0000 (UTC) Received: from ming.t460p (ovpn-8-17.pek2.redhat.com [10.72.8.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B50BB10013A1; Tue, 10 Mar 2020 23:08:40 +0000 (UTC) Date: Wed, 11 Mar 2020 07:08:35 +0800 From: Ming Lei To: John Garry Cc: axboe@kernel.dk, jejb@linux.ibm.com, martin.petersen@oracle.com, hare@suse.de, bvanassche@acm.org, hch@infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, virtualization@lists.linux-foundation.org, esc.storagedev@microsemi.com, chenxiang66@hisilicon.com, Hannes Reinecke Subject: Re: [PATCH RFC v2 01/24] scsi: add 'nr_reserved_cmds' field to the SCSI host template Message-ID: <20200310230835.GA16056@ming.t460p> References: <1583857550-12049-1-git-send-email-john.garry@huawei.com> <1583857550-12049-2-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1583857550-12049-2-git-send-email-john.garry@huawei.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 12:25:27AM +0800, John Garry wrote: > From: Hannes Reinecke > > Add a new field 'nr_reserved_cmds' to the SCSI host template to > instruct the block layer to set aside a tag space for reserved > commands. > > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/scsi_lib.c | 1 + > include/scsi/scsi_host.h | 6 ++++++ > 2 files changed, 7 insertions(+) > > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > index 610ee41fa54c..2967325df7a0 100644 > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -1896,6 +1896,7 @@ int scsi_mq_setup_tags(struct Scsi_Host *shost) > shost->tag_set.ops = &scsi_mq_ops_no_commit; > shost->tag_set.nr_hw_queues = shost->nr_hw_queues ? : 1; > shost->tag_set.queue_depth = shost->can_queue; > + shost->tag_set.reserved_tags = shost->nr_reserved_cmds; You reserve tags for special usage, meantime the whole queue depth isn't increased, that means the tags for IO request is decreased given reserved tags can't be used for IO, so IO performance may be effected. If not the case, please explain a bit in commit log. Thanks, Ming