From patchwork Mon Oct 26 10:48:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 318964 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp561209ilc; Mon, 26 Oct 2020 03:52:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXFdWzLgkxhVar5mj19Lfbee85uWWRYl8wGR9PlVNxj3g0RT5Y2goVByYC/RQrNgiboRFA X-Received: by 2002:a05:6402:3045:: with SMTP id bu5mr15423137edb.232.1603709548671; Mon, 26 Oct 2020 03:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603709548; cv=none; d=google.com; s=arc-20160816; b=BbFfaZilhXMrmcWkuEfys0SPplRoVKbm4aYxY8KT8C7VMe+420zPHZ6r+thBJCeMiJ qHaN3lsGIIBygzj6x3AZAAREJy26J0kacf9bVPQenks65YNZRmkfkp3lN/wRXagxL6g2 EP5+PwahYIvRD49qO5GfQh0VKOT7Cqr1gBUZgtluNFwlzlSgIs1trxVEfqUpraNF1N8v TzIX5G4CTDXLptZ14Wuh91tslq1oPUz8SkKiacNj9Jxfa7KAoztJ7pDPMGHOu3/pY5Nf kruFHWOkwTUDEfDNxYBd0lNypbSjqNaSNL5w/kGx06ucs0qCHO5mMsClpCBPlTqH6reD MIHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=w6J1eqV11HaB55TWRtZ4Y0MorszrrhjogjEcB3OM84k=; b=zo/TGF2slv2+qTgvRoqTpnnmIyvKORIVqa07FLwMdpZRn3i9PsMCED/4y4JUxOzVsS zakoJ5DvXqku7Q5QV9+0EN3voM3f2RYt6IhgToXw5MlEyFG0uN0dwMGFWWLgzp0lUnI/ Tr5qoYwkgIzcS2pTcQzovo8ulcWvPaKzSv3IA4+Hsl+En6YK/EVtjqWoejnaxy0m0cxS EdzEjuO6/PfbA6i0uhHYtSRFmbSyZBhWMocYPrALEvWI+3AUv1fGsfJwKuZ2wNiLHjYT 7OdVnlFTWBCOOgUaqBZ4DUq9kcfb8bn07lJHIY1umwM07svwLCYPAdd+D1iPpkODNEQO 9DCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-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 u18si6455612edo.394.2020.10.26.03.52.28 for ; Mon, 26 Oct 2020 03:52:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-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-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1771753AbgJZKwX (ORCPT ); Mon, 26 Oct 2020 06:52:23 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:3488 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1771850AbgJZKwV (ORCPT ); Mon, 26 Oct 2020 06:52:21 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CKWr81nlhzhZ37; Mon, 26 Oct 2020 18:52:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Mon, 26 Oct 2020 18:52:09 +0800 From: John Garry To: , CC: , , , John Garry Subject: [RESEND PATCH] scsi: hisi_sas: Stop using queue #0 always for v2 hw Date: Mon, 26 Oct 2020 18:48:33 +0800 Message-ID: <1603709313-185482-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In commit 8d98416a55eb ("scsi: hisi_sas: Switch v3 hw to MQ"), the dispatch function was changed to choose the delivery queue based on the request tag HW queue index. This heavily degrades performance for v2 hw, since the HW queues are not exposed there, and, as such, HW queue #0 is used for every command. Revert to previous behaviour for when nr_hw_queues is not set, that being to choose the HW queue based on target device index. Fixes: 8d98416a55eb ("scsi: hisi_sas: Switch v3 hw to MQ") Signed-off-by: John Garry --- Please include as a v5.10 fix, thanks! -- 2.26.2 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index a994c7b8d26f..fd980a86aa21 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -444,7 +444,7 @@ static int hisi_sas_task_prep(struct sas_task *task, } } - if (scmd) { + if (scmd && hisi_hba->shost->nr_hw_queues) { unsigned int dq_index; u32 blk_tag;