Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2214304pxb; Mon, 11 Jan 2021 04:11:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyAnrTJvhmZxn+zCpKkgSSlL8Ivou1ZWklEh4awOhwJKSwZTeZHVYToq+cphdHDm+4FnDt X-Received: by 2002:aa7:cdc3:: with SMTP id h3mr13682412edw.52.1610367108065; Mon, 11 Jan 2021 04:11:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610367108; cv=none; d=google.com; s=arc-20160816; b=fi4rkt00SxUchqIJdKirazQDbhhUXcB/4cqKHl2vStpVS7/P4VVbB7rYIVGzo9ggKm UROQHU79mRX/2Hk/F0Ak0hUrTFBpDjeZH1WPd6ZIl9Re4/eL9pCVvK/XI+zZx7yVeo6Q CKCdhGh62xVPvwSVmO07JVOOl46OKyEzacElTtc7lNJe9veudF0qvLWenfj3vCmehQwy uncYLyYzuZRbpllguEtpvIC/xBTq61v69SMDRt+Tuwis58k0AbR1ZxtoQqPjLj3WTAaZ fVHnd4Hie4jwcBs+8oUndFaiA5j1Mx6mkqMSEUSbZuAbW7LxA+DjlzU8A5u0xPpseHdo XLJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=DV+kUmEbQxoi1tqBPv4XGVHZKA2+45dxk/cCuROZrw0=; b=ket1m+sR04HyHU5Kpqe59ENz6mC7mBo+XgoMXoD5gy61zPGRSjdoxFFP58h57P2g6Y TWB3NHOD1w8wTs9pJbRuEMLdUYR9gz1wVJyCF5DAXXprf4AhRH7VCbcCbEecGsAr/ohP KqOndGw7ljvlFUZlm6eE51Be8/JRFTxsiA7oq0whfl10RZmCDc5U7s/jhfmnRoIAuIL8 JfE/a3HO1navLkzCmOJQxRUZV+htuFCa36fWcFGqejwzf66aERdQiU53PZ2EcqhaRvY/ RG7ywsltJyUFjDai0+0Smax952guReNeYCmGaY+KPJlK2e8xX5vMBjq5ceqYsKBhEX1T IsZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n9si6969482edi.179.2021.01.11.04.11.23; Mon, 11 Jan 2021 04:11:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726541AbhAKMHu (ORCPT + 99 others); Mon, 11 Jan 2021 07:07:50 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2302 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbhAKMHt (ORCPT ); Mon, 11 Jan 2021 07:07:49 -0500 Received: from fraeml703-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DDsnR6hZLz67Zyf; Mon, 11 Jan 2021 20:04:11 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml703-chm.china.huawei.com (10.206.15.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Mon, 11 Jan 2021 13:07:07 +0100 Received: from [10.210.171.188] (10.210.171.188) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2106.2; Mon, 11 Jan 2021 12:07:05 +0000 Subject: Re: [RFC/RFT PATCH] scsi: pm8001: Expose HW queues for pm80xx hw To: Jinpu Wang , Viswas G CC: "James E.J. Bottomley" , "Martin K. Petersen" , , , Radha Ramachandran , , , , Linux SCSI Mailinglist , open list , Hannes Reinecke , Kashyap Desai , References: <1609845423-110410-1-git-send-email-john.garry@huawei.com> From: John Garry Message-ID: Date: Mon, 11 Jan 2021 12:05:59 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.210.171.188] X-ClientProxiedBy: lhreml703-chm.china.huawei.com (10.201.108.52) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/01/2021 11:57, Jinpu Wang wrote: > Hi John, > > > On Tue, Jan 5, 2021 at 12:21 PM John Garry wrote: >> >> In commit 05c6c029a44d ("scsi: pm80xx: Increase number of supported >> queues"), support for 80xx chip was improved by enabling multiple HW >> queues. >> >> In this, like other SCSI MQ HBA drivers, the HW queues were not exposed >> to upper layer, and instead the driver managed the queues internally. >> >> However, this management duplicates blk-mq code. In addition, the HW queue >> management is sub-optimal for a system where the number of CPUs exceeds >> the HW queues - this is because queues are selected in a round-robin >> fashion, when it would be better to make adjacent CPUs submit on the same >> queue. And finally, the affinity of the completion queue interrupts is not >> set to mirror the cpu<->HQ queue mapping, which is suboptimal. >> >> As such, for when MSIX is supported, expose HW queues to upper layer. Flag >> PCI_IRQ_AFFINITY is set for allocating the MSIX vectors to automatically >> assign affinity for the completion queue interrupts. >> >> Signed-off-by: John Garry >> >> --- >> I sent as an RFC/RFT as I have no HW to test. In addition, since HW queue >> #0 is used always for internal commands (like in send_task_abort()), if >> all CPUs associated with HW queue #0 are offlined, the interrupt for that >> queue will be shutdown, and no CPUs would be available to service any >> internal commands completion. To solve that, we need [0] merged first and >> switch over to use the new API. But we can still test performance in the >> meantime. >> >> I assume someone else is making the change to use the request tag for IO >> tag management. >> >> [0] https://lore.kernel.org/linux-scsi/47ba045e-a490-198b-1744-529f97192d3b@suse.de/ > Thanks for the patch, maybe Viswas can help to test? > That's what I am hoping for :) Thanks! >