From patchwork Wed May 9 15:10:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 135297 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp5763208lji; Wed, 9 May 2018 08:14:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqa4pCbwoVoYLP5Kv5fbk18rPKFwdIt+GXBASUYdY2+e0ETy6n+f81sGT3nJ+f7+BSxwCZ0 X-Received: by 2002:a65:6249:: with SMTP id q9-v6mr19541336pgv.216.1525878887542; Wed, 09 May 2018 08:14:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525878887; cv=none; d=google.com; s=arc-20160816; b=oLdjzPgJopSJkMW/uw6R2e0HXLhR8KyfDCsYintisSqn+PcNMQyJVgThKrZTrk31Wq +GzJKT+apcWOlAXSD0rklJNZZQYWMLod6XOXOLDP6n02pVe6zf7jeZGxhj8tAgJBRBdd Vi4u6hBlAt7mzAVM+USwzCHGkDJCn2NtnMPxA/rLjEI+wO1Kb5ZS0WeXGxU9ZDXUHw1x 5ck19hLKuAGqmYg0Mr4HkfIJHXIyQTGwr9j9esvsaSYjuTSsEh2ysrhiw/nB7j/Uv8Wt WnySnb/KKbF5mYsJM9D/oD9rWfk6v9NBzIBs4iRnaMuS6KVNDrkVAuxS718SxLZ116Fw Zn0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=GST5kademf9YQK+wxH+1Y8V+KoKR7/pdT8uR5MwfJyk=; b=xmy6jBTHwHiCGoX6uf/wpem75uXEeb3+Q6YGQKPnQ0DSuTnELDo1+H3G/jVQhKI+dW 1pXWZyCyPhYyiDdWk8lvsYsq1zCxgFBcxU7RURuxVtij36Ta78ubTIAR6JsgpM/CJRy1 xHWsYzqsqcF1cuAS3BQQaLjIUkUBh0nlmJEti+0kKmAHB3WCO0/9vWd5/YCMdGN0ojDz fRCRrPAuVgxGIhF4jyybTTCSgoCOLq6Ro1aiLqiP12OlWTCUWj2qDi2ChMMvqMMg712E 84yszFDqcnKb8G/548qYRaYr47u+3QtIh56Yv5VTeefCp7DXBg95HbncePNaOvMzagVd mTOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si25911585plk.28.2018.05.09.08.14.46; Wed, 09 May 2018 08:14:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964985AbeEIPOo (ORCPT + 29 others); Wed, 9 May 2018 11:14:44 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:47090 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S964836AbeEIPMO (ORCPT ); Wed, 9 May 2018 11:12:14 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 30501D6DF6139; Wed, 9 May 2018 23:12:08 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.361.1; Wed, 9 May 2018 23:11:59 +0800 From: John Garry To: , CC: , , , John Garry Subject: [PATCH 0/6] hisi_sas: improve DQ locking Date: Wed, 9 May 2018 23:10:44 +0800 Message-ID: <1525878650-213087-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset introduces some patches to much improve DQ lockout for sending commands to the HW. Currently we lockout the complete DQ when building and sending a task to the HW. The reason we did this was because once we allocate a slot in the DQ to use, if we fail the send the slot then the slot must be reused. We cannot simply forget about the slot and allow subsequent slots in the DQ to be used. To improve this and reduce this DQ lockout, we change the order in which we allocate and build a slot. We must now do any steps *which may fail* before allocating the slot. So this means that once we allocate the slot we cannot fail to send it. By doing this we can greatly reduce the periods in which we lock the DQ for building and sending a slot, allowing more parallelism in sending commands to HW. Overall this DQ locking improvement has shown to improve performance, and also will make MQ perform better if ever turned on. Xiang Chen (5): scsi: hisi_sas: relocate smp sg map scsi: hisi_sas: make return type of prep functions void scsi: hisi_sas: allocate slot buffer earlier scsi: hisi_sas: Don't lock DQ for complete task sending scsi: hisi_sas: Use device lock to protect slot alloc/free Xiaofei Tan (1): scsi: hisi_sas: add check of device in hisi_sas_task_exec() drivers/scsi/hisi_sas/hisi_sas.h | 12 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 264 ++++++++++++++++++--------------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 88 ++++------- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 109 +++++--------- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 107 +++++-------- 5 files changed, 248 insertions(+), 332 deletions(-) -- 1.9.1