scsi: lpfc: Rework locking on SCSI io completion
A scsi host lock is taken on every io completion to check whether the abort handler is waiting on the io completion. This is an expensive lock to take on all completion when rarely in an abort condition. Replace scsi host lock with command-specific lock. Synchronize completion and abort paths by new cmd lock. Ensure all flag changing and nulling of context pointers taken under lock. When adding lock to task management abort, realized it was missing other synchronization locks. Added that synchronization to match normal paths. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
b1684a0b42
commit
c2017260ee
@@ -4160,6 +4160,7 @@ lpfc_new_io_buf(struct lpfc_hba *phba, int num_to_alloc)
|
||||
lpfc_ncmd->dma_sgl = lpfc_ncmd->data;
|
||||
lpfc_ncmd->dma_phys_sgl = lpfc_ncmd->dma_handle;
|
||||
lpfc_ncmd->cur_iocbq.context1 = lpfc_ncmd;
|
||||
spin_lock_init(&lpfc_ncmd->buf_lock);
|
||||
|
||||
/* add the nvme buffer to a post list */
|
||||
list_add_tail(&lpfc_ncmd->list, &post_nblist);
|
||||
|
Reference in New Issue
Block a user