Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14208177rwb; Sun, 27 Nov 2022 19:56:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf5mVfnhSVDNSQ5NwOUYSvc2gJAonSYIZOOMwuNLEAoLEGwEgPMNRXxziXnHADyhWre5QO1J X-Received: by 2002:a65:4c85:0:b0:46f:59bd:6125 with SMTP id m5-20020a654c85000000b0046f59bd6125mr43943902pgt.147.1669607785639; Sun, 27 Nov 2022 19:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669607785; cv=none; d=google.com; s=arc-20160816; b=vL8M1REKKP2X8aB7n7S100kuSW4jzmFNtfevJHOc19M3AR3V6aFPH7Q6/+dnDVgLJv HNZdWj93VTstaTWZvVde8mC+rdo9mqUr4g224CXqnRBmVYKk6v2THHldIGru+3cElLFB gvc4Le3ASO0PdLkeTmN/4ZHjM753qJ9129u++6G8O84g7QTikGILLJvm4MTT/8fO6MIY CyupAT5o6jCWE5XneQ7+p+hTNdpffwJDKKfOmtLEP2rTmCa4qtXegXejg0t9F2IMMhiB ZIXL8oU3WBcrWFoqtUHDb9/xLnbu84dZKsyp2FBSfzhfl5H8gXqiuyUmcs/iF1ct8Q+z eqhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9szJ/bHUVM/RqeT4MKHPahkxnQImAqd4WFTZsdRbYws=; b=S3jaCcq5G3L3YCEi7B59UcliGqni//vaFYsMfNu4w5Vm7YcQr+0auUIsYfhiqxiuhW q13CQ+yErn8a3VdyMmmIkwH62Y4UfmhBlfWEqk92JQqA5IceKtWifAvz6OqULNry84fq NDV7BP8Zg64UGLgLqjm+a620dnZ41MtDbry9bkF4SAOE0JmOb6eIhmOHtwsF4ZKOsAFH kHKYjdQ+jytmqsUEfjHHkJiaOaPZSDmQgO22EmYoKG7WB9YzUWFwbNx1l1H4xySgk/6Z FvyYw9DCOX1tURmB5jniM7Ca/8gnnVKyyU/YWuVm8Nd9Xg64ESezri1TvbHOxkX31iMU bBIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cQDkc8S3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e23-20020a656897000000b0041183daa0ffsi10813737pgt.761.2022.11.27.19.56.14; Sun, 27 Nov 2022 19:56:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cQDkc8S3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229807AbiK1D27 (ORCPT + 84 others); Sun, 27 Nov 2022 22:28:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbiK1D26 (ORCPT ); Sun, 27 Nov 2022 22:28:58 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE550C740 for ; Sun, 27 Nov 2022 19:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669606083; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9szJ/bHUVM/RqeT4MKHPahkxnQImAqd4WFTZsdRbYws=; b=cQDkc8S3I5jh0vW82rvN4si9Q787TnFYm0d1AjVLHALj3T+a2kw36YH2SDDb2DKflPSzwg a23QSHgKOBcIgEAUZGnNfhDbvlM07+R2blYBfPe4j19E6KuxD4hTtwfBpoblcE6BCmoIHR CZ+e2OybQYR/PkkTLpv42LEpATDLpV4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648-RI9nIoAHPwqdd8p2323KfA-1; Sun, 27 Nov 2022 22:28:00 -0500 X-MC-Unique: RI9nIoAHPwqdd8p2323KfA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D0ED6811E67; Mon, 28 Nov 2022 03:27:59 +0000 (UTC) Received: from T590 (ovpn-8-18.pek2.redhat.com [10.72.8.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 42E12492B05; Mon, 28 Nov 2022 03:27:54 +0000 (UTC) Date: Mon, 28 Nov 2022 11:27:49 +0800 From: Ming Lei To: Yu Kuai Cc: jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, "yukuai (C)" Subject: Re: [PATCH RFC] scsi: core: remove unsed 'restarts' from scsi_device Message-ID: References: <20221118113052.1324140-1-yukuai1@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 26, 2022 at 04:54:46PM +0800, Yu Kuai wrote: > Hi, > > 在 2022/11/18 19:30, Yu Kuai 写道: > > From: Yu Kuai > > > > During code review, I found that 'restarts' is not useful anymore after > > the following commits: > > > > 1) commit ab3cee3762e5 ("blk-mq: In blk_mq_dispatch_rq_list() "no budget" > > is a reason to kick") > > 2) commit d3b38596875d ("blk-mq: run queue no matter whether the request > > is the last request") > > 3) commit 673235f91531 ("scsi: core: Fix race between handling STS_RESOURCE > > and completion") > > > > Now that if get budget ever failed, block layer will make sure to > > trigger new run queue for the hctx. Hence there is no need to run queue > > from scsi layer in this case. > > But scsi_run_queue_async() needs to run all hw queue because budget is actually LUN/request queue wide. > > Does anyone has suggestions about this patch? > > More info why I tried to remove this: > > while testing megaraid with 4 nvme with none elevator, the default > queue_depth is 128, while I test it with fio 128 jobs and 1 iodepth, > bw is about 4Gib/s, however, if I test with 128 jobs and 2 iodepth, > bw is decreased to about 0.8Gib/s, and with this patch applied, > bw can stay 4Gib/s in the later case. What is .can_queue and nr_hw_queues in your setting? thanks, Ming