Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752774AbdLGVMB (ORCPT ); Thu, 7 Dec 2017 16:12:01 -0500 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:28008 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752142AbdLGVL5 (ORCPT ); Thu, 7 Dec 2017 16:11:57 -0500 X-IronPort-AV: E=Sophos;i="5.45,374,1508774400"; d="scan'208";a="64727081" From: Bart Van Assche To: "ming.lei@redhat.com" CC: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "hch@infradead.org" , "martin.petersen@oracle.com" , "linux-scsi@vger.kernel.org" , "axboe@fb.com" , "hare@suse.com" , "holger@applied-asynchrony.com" , "jejb@linux.vnet.ibm.com" Subject: Re: [PATCH] SCSI: run queue if SCSI device queue isn't ready and queue is idle Thread-Topic: [PATCH] SCSI: run queue if SCSI device queue isn't ready and queue is idle Thread-Index: AQHTbZ4g7T3yQq9yCkKeO51Qk7DLeaM060uAgAAFpYCAAJ2AAIAA7uSAgACdpACAAUnOgA== Date: Thu, 7 Dec 2017 21:11:54 +0000 Message-ID: <1512681113.2624.33.camel@wdc.com> References: <20171205075256.10319-1-ming.lei@redhat.com> <1512490099.2660.6.camel@sandisk.com> <20171205162825.GA23788@ming.t460p> <20171206015212.GB26512@ming.t460p> <1512576435.3297.3.camel@wdc.com> <20171207013122.GA10214@ming.t460p> In-Reply-To: <20171207013122.GA10214@ming.t460p> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bart.VanAssche@wdc.com; x-originating-ip: [199.255.44.171] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1535;20:vyIbFzU3HktIVB1wjZYJ+8y7ApOcF1mB9JRETGJSckrfMamYPWISU8nlyBtjgVC/b7/jBSZubsE7NUzRkMYB7zXysZ91dj8XSzOMP0HoaLKHelPeNQqMjZzHXc/p5ID50gVqqhsnU52lZPzABNhPWGv5FEn0M5kUDNlNThUIStg= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: a52c5219-c0eb-49f5-b202-08d53db724da x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603286);SRVR:CY1PR0401MB1535; x-ms-traffictypediagnostic: CY1PR0401MB1535: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(3231022)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(6072148)(201708071742011);SRVR:CY1PR0401MB1535;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CY1PR0401MB1535; x-forefront-prvs: 05143A8241 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(376002)(346002)(366004)(189003)(199004)(24454002)(377424004)(97736004)(86362001)(6116002)(68736007)(5660300001)(102836003)(3846002)(2351001)(6916009)(2900100001)(25786009)(2950100002)(66066001)(106356001)(105586002)(72206003)(54906003)(305945005)(6512007)(14454004)(93886005)(7736002)(7416002)(6486002)(77096006)(5640700003)(316002)(76176011)(3660700001)(8936002)(229853002)(53936002)(99286004)(3280700002)(36756003)(2501003)(2906002)(478600001)(33646002)(103116003)(8676002)(81166006)(81156014)(101416001)(6506006)(6436002)(4326008)(6246003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1535;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <107468BAFD96F149B5DD9B0B8FF05ECB@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: a52c5219-c0eb-49f5-b202-08d53db724da X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2017 21:11:54.8008 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1535 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id vB7LC7Gu026177 Content-Length: 619 Lines: 13 On Thu, 2017-12-07 at 09:31 +0800, Ming Lei wrote: > But if you always call blk_mq_sched_mark_restart_hctx() before a new > dispatch, that may affect performance on NVMe which may never trigger > BLK_STS_RESOURCE. Hmm ... only the SCSI core implements .get_budget() and .put_budget() and I proposed to insert a blk_mq_sched_mark_restart_hctx() call under "if (q->mq_ops->get_budget)". In other words, I proposed to insert a blk_mq_sched_mark_restart_hctx() call in a code path that is never triggered by the NVMe driver. So I don't see how the change I proposed could affect the performance of the NVMe driver? Bart.