scsi: hisi_sas: Don't lock DQ for complete task sending
authorXiang Chen <chenxiang66@hisilicon.com>
Wed, 9 May 2018 15:10:48 +0000 (23:10 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 15:22:09 +0000 (11:22 -0400)
commitfa222db0b036899cd4020a380568699ffb1de08d
tree60ddc348aa3d3b0aa5b49e97e79a592e138947a7
parent3de0026dad6b8e83d8a699aef92638c50ba966f7
scsi: hisi_sas: Don't lock DQ for complete task sending

Currently we lock the DQ to protect whole delivery process.  So this
stops us building slots for the same queue in parallel, and can affect
performance.

To optimise it, only lock the DQ during special periods, specifically
when allocating a slot from the DQ and when delivering a slot to the HW.

This approach is now safe, thanks to the previous patches to ensure that
we always deliver a slot to the HW once allocated.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c