From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753192AbdJMXQS (ORCPT ); Fri, 13 Oct 2017 19:16:18 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:8062 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751081AbdJMXQP (ORCPT ); Fri, 13 Oct 2017 19:16:15 -0400 X-IronPort-AV: E=Sophos;i="5.43,373,1503331200"; d="scan'208";a="58275173" From: Bart Van Assche To: "hch@infradead.org" , "linux-block@vger.kernel.org" , "axboe@fb.com" , "ming.lei@redhat.com" CC: "linux-kernel@vger.kernel.org" , "tom81094@gmail.com" , "paolo.valente@linaro.org" , Bart Van Assche , "linux-scsi@vger.kernel.org" , "oleksandr@natalenko.name" , "john.garry@huawei.com" , "osandov@fb.com" , "loberman@redhat.com" Subject: Re: [PATCH V9 6/7] SCSI: allow to pass null rq to scsi_prep_state_check() Thread-Topic: [PATCH V9 6/7] SCSI: allow to pass null rq to scsi_prep_state_check() Thread-Index: AQHTRE4dGvI2+YbO1kyNYn4aWjKfU6LiaeeA Date: Fri, 13 Oct 2017 23:16:12 +0000 Message-ID: <1507936571.13345.51.camel@wdc.com> References: <20171013180532.29304-1-ming.lei@redhat.com> <20171013180532.29304-7-ming.lei@redhat.com> In-Reply-To: <20171013180532.29304-7-ming.lei@redhat.com> 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: [63.163.107.201] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1536;20:oSjKAyfWCxY7mOqL/OLjYRqp8IObG2GCPdcBg9yewmCZGiLk8I3UFH/Se74WLIrJhW9kiL5K6oIAgoNoyzbftAfimSply3/ZSfYcGr9VfLs3d8GyKHKML9kdBC6wii2J3Q6MtBUhlAiDOi6n1e2p/L585vJq2MjfcLlCH1w/zqk= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-correlation-id: ea840fef-6382-4198-2734-08d512906575 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075);SRVR:CY1PR0401MB1536; x-ms-traffictypediagnostic: CY1PR0401MB1536: wdcipoutbound: EOP-TRUE x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123564025)(20161123558100)(20161123562025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0401MB1536;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0401MB1536; x-forefront-prvs: 04599F3534 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(346002)(376002)(39860400002)(199003)(24454002)(377424004)(189002)(305945005)(8676002)(7736002)(316002)(54356999)(3280700002)(54906003)(72206003)(103116003)(478600001)(53936002)(86362001)(101416001)(99286003)(14454004)(2906002)(2501003)(6512007)(66066001)(25786009)(3660700001)(189998001)(6436002)(8936002)(68736007)(2201001)(110136005)(105586002)(7416002)(50986999)(33646002)(4326008)(39060400002)(2950100002)(36756003)(6506006)(5660300001)(3846002)(6486002)(81156014)(106356001)(102836003)(97736004)(76176999)(6246003)(2900100001)(6116002)(77096006)(229853002)(4001150100001)(81166006);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1536;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <7EAD39FA101A304C96E059B7641BE44E@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2017 23:16:12.8154 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1536 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 v9DNGpAT010408 On Sat, 2017-10-14 at 02:05 +0800, Ming Lei wrote: > In the following patch, we will implement scsi_get_budget() > which need to call scsi_prep_state_check() when rq isn't > dequeued yet. My understanding is that this change is only needed because scsi_mq_get_budget() calls scsi_prep_state_check() with the req argument set to NULL. Since scsi_prep_state_check() tests for sdev states other than SDEV_RUNNING and since the purpose of this series is to optimize performance for the case SDEV_RUNNING I'm not sure it's a good idea to make scsi_mq_get_budget() call scsi_prep_state_check(). And if scsi_mq_get_budget() wouldn't call scsi_prep_state_check() then this patch is not necessary. Bart.