From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752911AbdJMRrv (ORCPT ); Fri, 13 Oct 2017 13:47:51 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:61633 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbdJMRrr (ORCPT ); Fri, 13 Oct 2017 13:47:47 -0400 X-IronPort-AV: E=Sophos;i="5.43,371,1503331200"; d="scan'208";a="57593956" From: Bart Van Assche To: "ming.lei@redhat.com" CC: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "hch@infradead.org" , "himanshu.madhani@cavium.com" , "tom81094@gmail.com" , "paolo.valente@linaro.org" , "axboe@kernel.dk" , "linux-scsi@vger.kernel.org" , "oleksandr@natalenko.name" , "john.garry@huawei.com" , "osandov@fb.com" , "loberman@redhat.com" , "james.smart@broadcom.com" Subject: Re: [PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops Thread-Topic: [PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops Thread-Index: AQHTQ4lc2pZDXOhe5U6IuYSs5ux9RaLgjbsAgABdCgCAAPGtgIAAF0GAgAAGiACAAAQCAIAABo2AgAAF6ICAAAT3AA== Date: Fri, 13 Oct 2017 17:47:43 +0000 Message-ID: <1507916862.13345.27.camel@wdc.com> References: <20171012183704.22326-1-ming.lei@redhat.com> <20171012183704.22326-5-ming.lei@redhat.com> <9a741c03-90a3-e583-ddde-0ed71c8570a2@kernel.dk> <20171013001919.GA24715@ming.t460p> <6efdb459-8746-562d-06dc-5b3e172076e1@kernel.dk> <20171013160731.GA30899@ming.t460p> <1507912260.13345.0.camel@wdc.com> <20171013164519.GF30899@ming.t460p> <1507914527.13345.17.camel@wdc.com> <20171013172950.GA32319@ming.t460p> In-Reply-To: <20171013172950.GA32319@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: [63.163.107.201] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1536;20:QHjrXM9dxWEoZsfC8l9rXGE8FqN2UJlb257WLaZBL1HMw4/Ej8jleZmy8LgWztplF4V7ZQgvt7A2yhVN1yL/pgZZ/+Ff1rp9YlleXg64D6oec42qt+bjxxr6jf5G31DI2XY/8OvWdl3SCklwGQ7Q6qywAWQhAFSGvH7+WOVMNYE= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 4c419b8d-073e-4ab1-5933-08d51262820d 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)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(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)(39860400002)(376002)(346002)(199003)(24454002)(377424004)(189002)(305945005)(8676002)(3280700002)(7736002)(316002)(93886005)(54356999)(54906003)(72206003)(103116003)(478600001)(53936002)(101416001)(14454004)(99286003)(86362001)(2501003)(2906002)(66066001)(6512007)(6506006)(3660700001)(25786009)(6436002)(189998001)(8936002)(68736007)(105586002)(7416002)(102836003)(50986999)(33646002)(4326008)(39060400002)(6916009)(2950100002)(36756003)(6486002)(3846002)(5660300001)(106356001)(81156014)(5640700003)(76176999)(97736004)(6246003)(2900100001)(77096006)(6116002)(2351001)(4001150100001)(229853002)(81166006)(142923001);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: <59B6EA3A0E12B7428147CE4C685DCC66@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2017 17:47:43.9238 (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 v9DHluiU023189 On Sat, 2017-10-14 at 01:29 +0800, Ming Lei wrote: > ->can_queue is size of the whole tag space shared by all LUNs, looks it isn't > reasonable to increase cmd_per_lun to .can_queue. Sorry but I disagree. Setting cmd_per_lun to a value lower than can_queue will result in suboptimal performance if there is only a single LUN per SCSI host. If there are multiple LUNs per SCSI host then the blk-mq core tracks the number of active LUNs through the blk_mq_tags.active_queues variable. See also hctx_may_queue(). The comment above that function is as follows: /* * For shared tag users, we track the number of currently active users * and attempt to provide a fair share of the tag depth for each of them. */ BTW, the ib_srp initiator driver sets cmd_per_lun to can_queue and is able to achieve more than one million IOPS even in tests with multiple LUNs per SCSI host. Bart.